2021-12-29 16:44:43 +00:00
|
|
|
::: anchor
|
|
|
|
:::
|
|
|
|
|
2021-10-25 17:13:23 +00:00
|
|
|
::: title 基础使用
|
2021-10-19 14:28:44 +00:00
|
|
|
:::
|
|
|
|
|
2022-02-24 09:56:05 +00:00
|
|
|
::: describe 常用于行数据的交互筛选,在浩瀚的业务需求中,值得一用。
|
|
|
|
:::
|
|
|
|
|
|
|
|
::: title 基础使用
|
|
|
|
:::
|
|
|
|
|
2022-02-01 19:27:34 +00:00
|
|
|
::: demo 使用 `lay-transfer` 标签, 创建穿梭框
|
2021-10-10 15:42:05 +00:00
|
|
|
|
|
|
|
<template>
|
2021-10-14 10:35:09 +00:00
|
|
|
<lay-transfer :dataSource="dataSource1"></lay-transfer>
|
2021-10-10 15:42:05 +00:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import { ref } from 'vue'
|
|
|
|
|
|
|
|
export default {
|
|
|
|
setup() {
|
|
|
|
|
2021-10-14 10:35:09 +00:00
|
|
|
const dataSource1 = [{id:'1', title:'易大师'},{id:'2', title:'战争之王'}]
|
2021-10-12 01:30:27 +00:00
|
|
|
|
2021-10-10 15:42:05 +00:00
|
|
|
return {
|
2021-10-14 10:35:09 +00:00
|
|
|
dataSource1
|
2021-10-10 15:42:05 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
2021-10-12 03:30:07 +00:00
|
|
|
:::
|
2021-10-14 10:35:09 +00:00
|
|
|
|
2021-10-25 17:13:23 +00:00
|
|
|
::: title 指定标题
|
2021-10-19 14:28:44 +00:00
|
|
|
:::
|
|
|
|
|
2021-10-14 10:35:09 +00:00
|
|
|
::: demo
|
|
|
|
|
|
|
|
<template>
|
|
|
|
<lay-transfer :dataSource="dataSource2" :title="title"></lay-transfer>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import { ref } from 'vue'
|
|
|
|
|
|
|
|
export default {
|
|
|
|
setup() {
|
|
|
|
|
|
|
|
const dataSource2 = [{id:'1', title:'易大师'},{id:'2', title:'战争之王'}]
|
|
|
|
const title = ['我喜欢的','我不喜欢的']
|
|
|
|
|
|
|
|
return {
|
|
|
|
dataSource2,
|
|
|
|
title
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
:::
|
|
|
|
|
2021-10-25 17:13:23 +00:00
|
|
|
::: title 使用插槽
|
2021-10-20 12:46:55 +00:00
|
|
|
:::
|
|
|
|
|
|
|
|
::: demo
|
|
|
|
|
|
|
|
<template>
|
2022-03-17 09:08:31 +00:00
|
|
|
<lay-transfer :dataSource="dataSource3">
|
2021-10-20 12:46:55 +00:00
|
|
|
<template v-slot:item="{ data }">
|
|
|
|
{{data.id}}
|
|
|
|
</template>
|
|
|
|
</lay-transfer>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import { ref } from 'vue'
|
|
|
|
|
|
|
|
export default {
|
|
|
|
setup() {
|
|
|
|
|
2022-03-17 09:08:31 +00:00
|
|
|
const dataSource3 = [{id:'1', title:'易大师'},{id:'2', title:'战争之王'}]
|
2021-10-20 12:46:55 +00:00
|
|
|
|
|
|
|
return {
|
2022-03-17 09:08:31 +00:00
|
|
|
dataSource3
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
:::
|
|
|
|
|
|
|
|
|
|
|
|
::: title 开启搜索
|
|
|
|
:::
|
|
|
|
|
|
|
|
::: demo
|
|
|
|
|
|
|
|
<template>
|
|
|
|
<lay-transfer :dataSource="dataSource5" showSearch="true"></lay-transfer>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import { ref } from 'vue'
|
|
|
|
|
|
|
|
export default {
|
|
|
|
setup() {
|
|
|
|
|
|
|
|
const dataSource5 = [
|
|
|
|
{id:'1', title:'无影剑'},
|
|
|
|
{id:'2', title:'逸龙剑'},
|
|
|
|
{id:'3', title:'精灵之语'},
|
|
|
|
{id:'4', title:'十字斩刀-斗'},
|
|
|
|
{id:'5', title:'落炎魔杖'},
|
|
|
|
{id:'6', title:'石中剑'},
|
|
|
|
{id:'7', title:'屠戮之刃'}
|
|
|
|
]
|
|
|
|
|
|
|
|
return {
|
|
|
|
dataSource5
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
:::
|
|
|
|
|
|
|
|
::: title 海量数据
|
|
|
|
:::
|
|
|
|
|
|
|
|
::: demo
|
|
|
|
|
|
|
|
<template>
|
|
|
|
<lay-transfer :dataSource="dataSource4"></lay-transfer>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import { ref } from 'vue'
|
|
|
|
|
|
|
|
export default {
|
|
|
|
setup() {
|
|
|
|
|
|
|
|
const dataSource4 = [
|
|
|
|
{id:'1', title:'无影剑'},
|
|
|
|
{id:'2', title:'逸龙剑'},
|
|
|
|
{id:'3', title:'精灵之语'},
|
|
|
|
{id:'4', title:'十字斩刀-斗'},
|
|
|
|
{id:'5', title:'落炎魔杖'},
|
|
|
|
{id:'6', title:'石中剑'},
|
|
|
|
{id:'7', title:'屠戮之刃'}
|
|
|
|
]
|
|
|
|
|
|
|
|
return {
|
|
|
|
dataSource4
|
2021-10-20 12:46:55 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
2021-10-14 10:35:09 +00:00
|
|
|
|
|
|
|
:::
|
|
|
|
|
2022-01-09 17:17:03 +00:00
|
|
|
::: title Transfer 属性
|
2021-10-20 12:46:55 +00:00
|
|
|
:::
|
|
|
|
|
2021-11-07 07:55:08 +00:00
|
|
|
::: table
|
|
|
|
|
2021-10-25 17:14:17 +00:00
|
|
|
| Name | Description | Accepted Values |
|
|
|
|
| ---------- | ----------- | --------------- |
|
|
|
|
| dataSource | 数据来源 | -- |
|
|
|
|
| title | 标题 | -- |
|
|
|
|
| id | 主键 | -- |
|
2022-03-23 20:23:24 +00:00
|
|
|
| showSearch | 开启搜索 | -- |
|
2021-10-20 12:46:55 +00:00
|
|
|
|
2021-11-07 07:55:08 +00:00
|
|
|
:::
|
|
|
|
|
2022-01-09 17:17:03 +00:00
|
|
|
::: title Transfer 插槽
|
2021-10-20 12:46:55 +00:00
|
|
|
:::
|
|
|
|
|
2021-11-07 07:55:08 +00:00
|
|
|
::: table
|
|
|
|
|
2021-10-25 17:14:17 +00:00
|
|
|
| Name | Description | Accepted Values |
|
|
|
|
| ---- | ----------- | --------------- |
|
|
|
|
| item | 列表项 | { data } |
|
2021-11-07 07:55:08 +00:00
|
|
|
|
2021-11-07 07:56:24 +00:00
|
|
|
:::
|
2021-12-16 09:57:59 +00:00
|
|
|
|
2022-03-29 23:44:37 +00:00
|
|
|
|
2022-01-12 06:19:06 +00:00
|
|
|
|
|
|
|
::: previousNext transfer
|
2021-12-16 09:57:59 +00:00
|
|
|
:::
|