Skip to content

Commit a455447

Browse files
committed
fix: 修复组件和页面的错误
1 parent ee265e0 commit a455447

File tree

6 files changed

+9
-12
lines changed

6 files changed

+9
-12
lines changed

src/components/calendar/body/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const defaultProps: Partial<AtCalendarBodyProps> = {
3030
generateDate: Date.now()
3131
}
3232

33-
export default class AtCalendarBody extends Taro.Component<
33+
export default class AtCalendarBody extends React.Component<
3434
AtCalendarBodyProps,
3535
Readonly<AtCalendarBodyState>
3636
> {

src/components/calendar/controller/index.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@ import {
66
AtCalendarControllerState
77
} from 'types/calendar'
88
import { Picker, Text, View } from '@tarojs/components'
9-
import Taro from '@tarojs/taro'
109

11-
export default class AtCalendarController extends Taro.Component<
10+
export default class AtCalendarController extends React.Component<
1211
AtCalendarControllerProps,
1312
AtCalendarControllerState
1413
> {

src/components/calendar/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const defaultProps: AtCalendarDefaultProps = {
2727
monthFormat: 'YYYY年MM月'
2828
}
2929

30-
export default class AtCalendar extends Taro.Component<
30+
export default class AtCalendar extends React.Component<
3131
AtCalendarProps,
3232
Readonly<AtCalendarState>
3333
> {

src/components/loading/index.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,7 @@ export default class AtLoading extends React.Component<AtLoadingProps> {
2121
}
2222
const colorStyle = {
2323
border: color ? `1px solid ${color}` : '',
24-
'border-color': color
25-
? `${color} transparent transparent transparent`
26-
: ''
24+
borderColor: color ? `${color} transparent transparent transparent` : ''
2725
}
2826
const ringStyle = Object.assign({}, colorStyle, sizeStyle)
2927

src/components/tabs/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export default class AtTabs extends React.Component<AtTabsProps, AtTabsState> {
4949
case Taro.ENV_TYPE.SWAN: {
5050
const index = Math.max(idx - 1, 0)
5151
this.setState({
52-
_scrollIntoView: `tab${index}`
52+
_scrollIntoView: `tab${this._tabId}${index}`
5353
})
5454
break
5555
}
@@ -185,7 +185,7 @@ export default class AtTabs extends React.Component<AtTabsProps, AtTabsState> {
185185
return (
186186
<View
187187
className={itemCls}
188-
id={`tab${idx}`}
188+
id={`tab${this._tabId}${idx}`}
189189
key={item.title}
190190
onClick={this.handleClick.bind(this, idx)}
191191
>

src/pages/index/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react'
2-
import { Image, Text, View } from '@tarojs/components'
2+
import { CommonEvent, Image, Text, View } from '@tarojs/components'
33
import Taro, { ShareAppMessageReturn } from '@tarojs/taro'
44
import iconAction from '../../assets/images/icon-list-action.png'
55
import iconBasic from '../../assets/images/icon-list-basic.png'
@@ -85,7 +85,7 @@ export default class Index extends React.Component<{}, IndexState> {
8585
}
8686
}
8787

88-
private gotoPanel = (id: string): void => {
88+
private gotoPanel = (e: CommonEvent, id: string): void => {
8989
Taro.navigateTo({
9090
url: `/pages/panel/index?id=${id.toLowerCase()}`
9191
})
@@ -108,7 +108,7 @@ export default class Index extends React.Component<{}, IndexState> {
108108
data-id={item.id}
109109
data-name={item.title}
110110
data-list={item.subpages}
111-
onTap={this.gotoPanel(item.id)}
111+
onTap={(e: CommonEvent): void => this.gotoPanel(e, item.id)}
112112
>
113113
<View className='module-list__icon'>
114114
<Image src={item.icon} className='img' mode='widthFix' />

0 commit comments

Comments
 (0)