perf: 更新demo
This commit is contained in:
parent
b6ee4e5d48
commit
2c99cd20f0
|
@ -442,6 +442,15 @@ const treeSelectData = [
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
// 模拟远程加载
|
||||||
|
const getTreeSelectData = () => {
|
||||||
|
return new Promise((resolve) => {
|
||||||
|
setTimeout(() => {
|
||||||
|
resolve(treeSelectData)
|
||||||
|
}, 3000)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
let id = 0
|
let id = 0
|
||||||
|
|
||||||
const imageUrl = ref('')
|
const imageUrl = ref('')
|
||||||
|
@ -1533,8 +1542,9 @@ const schema = reactive<FormSchema[]>([
|
||||||
label: `${t('formDemo.treeSelect')}`,
|
label: `${t('formDemo.treeSelect')}`,
|
||||||
component: 'TreeSelect',
|
component: 'TreeSelect',
|
||||||
// 远程加载option
|
// 远程加载option
|
||||||
optionApi: () => {
|
optionApi: async () => {
|
||||||
return treeSelectData
|
const res = await getTreeSelectData()
|
||||||
|
return res
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue