Skip to content

Commit b792ac5

Browse files
committed
fix(noticebar): 修复 animationData 类型签名问题
1 parent 8d5baea commit b792ac5

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

packages/taro-ui/src/components/noticebar/index.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ export default class AtNoticebar extends React.Component<
2222
this.state = {
2323
show: true,
2424
animElemId,
25-
animationData: [{}],
25+
animationData: {
26+
actions: [{}]
27+
},
2628
dura: 15,
2729
isWEAPP: Taro.getEnv() === Taro.ENV_TYPE.WEAPP,
2830
isALIPAY: Taro.getEnv() === Taro.ENV_TYPE.ALIPAY,

packages/taro-ui/types/noticebar.d.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { MouseEvent, ComponentClass } from 'react'
1+
import { ComponentClass } from 'react'
22
import { CommonEvent } from '@tarojs/components/types/common'
33

44
import AtComponent from './base'
@@ -51,7 +51,9 @@ export interface AtNoticeBarProps extends AtComponent {
5151
export interface AtNoticeBarState {
5252
show: boolean
5353
animElemId: string
54-
animationData: object[]
54+
animationData: {
55+
actions: object[]
56+
}
5557
dura: number
5658
isWEAPP: boolean
5759
isALIPAY: boolean

0 commit comments

Comments
 (0)