Skip to content

Commit

Permalink
doc: update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
1587315093 committed Jun 29, 2023
1 parent 017bef1 commit 8d1cf9f
Showing 1 changed file with 3 additions and 21 deletions.
24 changes: 3 additions & 21 deletions src/components/cascader-view/demos/demo1.tsx
Original file line number Diff line number Diff line change
@@ -1,28 +1,11 @@
import React, { useState } from 'react'
import { CascaderView, Button } from 'antd-mobile'
import { CascaderView } from 'antd-mobile'
import { DemoBlock } from 'demos'

import { options, sameValueOptions } from '../../cascader/demos/data'

const list1 = [
{
label: '西湖区',
value: '西湖区',
},
{
label: '上城区',
value: '上城区',
},
{
label: '余杭区',
value: '余杭区',
disabled: true,
},
]

export default () => {
const [value, setValue] = useState<string[]>([])
const [list, setList] = useState<any[]>([])

return (
<>
Expand Down Expand Up @@ -53,9 +36,8 @@ export default () => {
}}
/>
</DemoBlock>
<DemoBlock title='开启loding并且options为空时会开启骨架屏' padding='0'>
<CascaderView options={list} loading={!list.length} />
<Button onClick={() => setList(list1)}>push数据</Button>
<DemoBlock title='开启骨架屏' padding='0'>
<CascaderView options={options} loading />
</DemoBlock>
</>
)
Expand Down

0 comments on commit 8d1cf9f

Please sign in to comment.