(component): 修复 select 无法异步加载的问题

This commit is contained in:
就眠儀式
2022-09-30 17:06:09 +08:00
parent 1819e88ff0
commit 954e14bff6
4 changed files with 236 additions and 227 deletions

View File

@@ -183,7 +183,7 @@ export default {
::: demo
<template>
<lay-select v-model="selected2" :multiple="true">
<lay-select-option v-for="index of 200" :value="index" :label="index"></lay-select-option>
<lay-select-option v-for="index of count2" :value="index" :label="index"></lay-select-option>
</lay-select>
</template>
@@ -193,9 +193,15 @@ import { ref } from 'vue'
export default {
setup() {
const count2 = ref(0)
const selected2 = ref([1])
setTimeout(() => {
count2.value = 100;
}, 2000);
return {
count2,
selected2
}
}