mirror of
https://github.com/element-plus/element-plus.git
synced 2024-11-27 02:01:15 +08:00
29 lines
476 B
Vue
29 lines
476 B
Vue
<template>
|
|
<el-transfer v-model="value" :data="data" />
|
|
</template>
|
|
|
|
<script lang="ts" setup>
|
|
import { ref } from 'vue'
|
|
|
|
interface Option {
|
|
key: number
|
|
label: string
|
|
disabled: boolean
|
|
}
|
|
|
|
const generateData = () => {
|
|
const data: Option[] = []
|
|
for (let i = 1; i <= 15; i++) {
|
|
data.push({
|
|
key: i,
|
|
label: `Option ${i}`,
|
|
disabled: i % 4 === 0,
|
|
})
|
|
}
|
|
return data
|
|
}
|
|
|
|
const data = ref<Option[]>(generateData())
|
|
const value = ref([])
|
|
</script>
|