fix(transfer): 修复穿梭框逻辑, 新增 item 插槽

This commit is contained in:
就眠仪式
2021-10-20 20:46:55 +08:00
parent f568d29499
commit 29531eda88
2 changed files with 57 additions and 14 deletions

View File

@@ -53,11 +53,48 @@ export default {
:::
::: field transfer 属性
::: field 使用插槽
:::
::: demo
<template>
<lay-transfer :dataSource="dataSource1">
<template v-slot:item="{ data }">
{{data.id}}
</template>
</lay-transfer>
</template>
<script>
import { ref } from 'vue'
export default {
setup() {
const dataSource1 = [{id:'1', title:'易大师'},{id:'2', title:'战争之王'}]
return {
dataSource1
}
}
}
</script>
:::
::: field transfer 属性
:::
| Name | Description | Accepted Values |
| -------- | ---- | ----------------------- |
| dataSource | 数据来源 | -- |
| title | 标题 | -- |
| title | 标题 | -- |
| id | 主键 | -- |
::: field transfer 插槽
:::
| Name | Description | Accepted Values |
| -------- | ---- | ----------------------- |
| item | 列表项 | { data } |