diff --git a/src/pages/layout/accordion/index.tsx b/src/pages/layout/accordion/index.tsx index 472c43cbf..cf9aef3ca 100644 --- a/src/pages/layout/accordion/index.tsx +++ b/src/pages/layout/accordion/index.tsx @@ -13,23 +13,23 @@ export default class CardPage extends Taro.Component<{}, CardPageState> { navigationBarTitleText: 'Taro UI' } - public constructor () { + public constructor() { super(...arguments) this.state = { value1: false, value2: true, value3: false, - value4: false, + value4: false } } - private onClick (stateName: string, value: boolean): void { + private onClick(stateName: string, value: boolean): void { this.setState({ [stateName]: value }) } - public render (): JSX.Element { + public render(): JSX.Element { const { value1, value2, value3, value4 } = this.state return ( @@ -41,9 +41,9 @@ export default class CardPage extends Taro.Component<{}, CardPageState> { { /> + + + + + {/* 默认开启 */} + + 默认开启 + + @@ -89,8 +98,8 @@ export default class CardPage extends Taro.Component<{}, CardPageState> { @@ -116,11 +125,11 @@ export default class CardPage extends Taro.Component<{}, CardPageState> {