perf: 更新demo

This commit is contained in:
kailong321200875 2023-08-26 07:42:49 +08:00
parent b6ee4e5d48
commit 2c99cd20f0
1 changed files with 12 additions and 2 deletions

View File

@ -442,6 +442,15 @@ const treeSelectData = [
}
]
//
const getTreeSelectData = () => {
return new Promise((resolve) => {
setTimeout(() => {
resolve(treeSelectData)
}, 3000)
})
}
let id = 0
const imageUrl = ref('')
@ -1533,8 +1542,9 @@ const schema = reactive<FormSchema[]>([
label: `${t('formDemo.treeSelect')}`,
component: 'TreeSelect',
// option
optionApi: () => {
return treeSelectData
optionApi: async () => {
const res = await getTreeSelectData()
return res
}
},
{