import { defineComponent, onMounted, ref } from 'vue' import Select, { Option } from '../src' import './assets/index.less' const LoadingDemo = defineComponent({ name: 'LoadingDemo', setup() { const loading = ref(true) const value = ref(['a10']) const children = ref([]) const onChange = (val: string[], options: any) => { console.log('onChange', val, options) value.value = val } const onSelect = (...args: any[]) => { console.log('onSelect', args) } const loadData = () => { const newChildren: any[] = [] for (let i = 10; i < 36; i += 1) { newChildren.push({ key: i.toString(36) + i, value: i.toString(36) + i, disabled: i === 10, title: `中文${i}`, label: `中文${i}`, }) } loading.value = false children.value = newChildren } onMounted(() => { setTimeout(() => { loadData() }, 2000) }) return () => (

loading load data

) }, }) export default LoadingDemo