﻿# nf-transfer-select {#transfer-select}

可搜索的双面板多选选择器，支持弹出／平铺、全选当前搜索结果、禁用项、缺失值回显、字段映射、数量限制、复制、创建值、虚拟列表和插槽。

## 示例 {#examples}

### 空状态/可输入 {#example-1}

### 空状态/可输入
```vue
<template>
  <NfConfigProvider theme="chalk" locale="zh-CN">
<div class="select-demo">
  <div class="select-demo-result"><pre>{{ values }}</pre></div>
  <div class="select-demo-controls">
<NfTransferSelect
     class='nf-transfer-select-demo-container'
     style='width: 300px;'
     allow-create
     placeholder='选项搜索'
     :multiple-limit='3'
     v-model='values'
  >
    <template #prefix><ElIcon><Search /></ElIcon></template>
    <template #empty><NfEmpty style='padding: 20px' /></template>
  </NfTransferSelect>
  </div>
</div>
  </NfConfigProvider>
</template>

<script setup lang="ts">
import { ref } from 'vue'
import { NfConfigProvider, NfTransferSelect, NfEmpty } from '@94ai-plus/common-ui'
import { ElIcon } from 'element-plus'
import { Search } from '@element-plus/icons-vue'

const values = ref([])
</script>

<style scoped>
.select-demo { display: flex; flex-direction: column; gap: 16px; max-width: 100%; }
.select-demo-result > pre { margin: 0; }
.select-demo-controls { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; max-width: 100%; }
.select-demo-controls > * { max-width: 100%; }
</style>
```

### 不合并标签/屏蔽清除/定制渲染标签 {#example-2}

### 不合并标签/屏蔽清除/定制渲染标签
```vue
<template>
  <NfConfigProvider theme="chalk" locale="zh-CN">
<div class='nf-transfer-select-demo-container'>
    <div class="select-demo">
  <div class="select-demo-result"><pre>{{ values }}</pre></div>
  <div class="select-demo-controls">
<NfTransferSelect
      style='width: 450px;'
      :collapse-tags='false'
      autocomplete='on'
      :clearable='false'
      :titles="['左侧面板', '右侧面板']"
      :options='options'
      v-model='values'
      @change="changeValues"
    >
    </NfTransferSelect>
  </div>
</div>

    <ElDivider class="select-demo-divider">上面使用el-select组件浮动来 </ElDivider>
    <ElDivider class="select-demo-divider">下面使用div标签沉下去 </ElDivider>

    <div class="select-demo">
  <div class="select-demo-result"><pre>{{ valuesLand }}</pre></div>
  <div class="select-demo-controls">
<NfTransferSelect
      ref="transferRef"
      style='width: 600px;'
      :collapse-tags='false'
      autocomplete='on'
      :clearable='false'
      :titles="['左侧面板', '右侧面板']"
      :options='options'
      v-model='valuesLand'
      @change="changeValues"
      :copyValType='1'
      @copySuccess="copyCallback"
      :filterable="true"
      :filter-method="filterMethod"
      tag="div"
    >
    </NfTransferSelect>
  </div>
</div>
  </div>
  </NfConfigProvider>
</template>

<script setup lang="ts">
import { ref } from 'vue'
import { NfConfigProvider, NfTransferSelect } from '@94ai-plus/common-ui'
import { ElDivider } from 'element-plus'

const values = ref([])
const valuesLand = ref([])

const options = ref([{
  value: '选项1',
  label: '黄金糕'
}, {
  value: '选项2',
  label: '双皮奶'
}, {
  value: '选项3',
  label: '蚵仔煎'
}, {
  value: '选项4',
  label: '龙须面'
}, {
  value: '选项5',
  label: '北京烤鸭'
}, {
  value: '选项6',
  label: '刀削面'
}, {
  value: '选项7',
  label: '南京烤鸭'
}, {
  value: '选项8',
  label: '甑糕'
}])

const changeValues = () => {
  console.log(values.value)
}
const filterMethod = (query, item) => {
  const queryLower = query.toLowerCase().trim();
  let queryText = (query || '').replace(/\，/g, ',')
  let querySet = null
  if(queryText.includes(',')) {
    querySet = new Set(queryText.split(","))
  }
  if(queryText.includes(',')) {
    return querySet.has(item.label.toString().toLowerCase())
  } else {
    return item.label.toString().toLowerCase().indexOf(queryLower) > -1;
  }
}

const copyCallback = (val) => {
  alert(val)
}
</script>

<style scoped>
.select-demo { display: flex; flex-direction: column; gap: 16px; max-width: 100%; }
.select-demo-result > pre { margin: 0; }
.select-demo-controls { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; max-width: 100%; }
.select-demo-controls > * { max-width: 100%; }
.select-demo-divider { display: flex; align-items: center; gap: 12px; height: auto; border-top: 0; }
.select-demo-divider::before, .select-demo-divider::after { content: ''; flex: 1; min-width: 12px; border-top: 1px solid var(--el-border-color); }
.select-demo-divider :deep(.el-divider__text) { position: static; transform: none; flex: 0 1 auto; min-width: 0; max-width: calc(100% - 48px); padding: 0; text-align: center; white-space: normal; }
</style>
```

### 禁用/有禁用选项 {#example-3}

### 禁用/有禁用选项
```vue
<template>
  <NfConfigProvider theme="chalk" locale="zh-CN">
<div>
    <div class="select-demo">
  <div class="select-demo-result"><pre>{{ values }}</pre></div>
  <div class="select-demo-controls">
<NfTransferSelect
      style='width: 600px;'
      class='nf-transfer-select-demo-container'
      :collapse-tags='false'
      disabled
      v-model='values'
      :clearable='false'
      :options='options'
    >
    </NfTransferSelect>
  </div>
</div>
    <br />
    <br />
    <div class="select-demo">
  <div class="select-demo-result"><pre>{{ values }}</pre></div>
  <div class="select-demo-controls">
<NfTransferSelect
      style='width: 600px;'
      v-model='values'
      class='nf-transfer-select-demo-container'
      :collapse-tags='false'
      autocomplete='on'
      :clearable='false'
      :options='disableOptions'
    >
    </NfTransferSelect>
  </div>
</div>
  </div>
  </NfConfigProvider>
</template>

<script setup lang="ts">
import { ref } from 'vue'
import { NfConfigProvider, NfTransferSelect } from '@94ai-plus/common-ui'

const values = ref([])

const options = ref([{
  value: '选项1',
  label: '黄金糕'
}, {
  value: '选项2',
  label: '双皮奶'
}, {
  value: '选项3',
  label: '蚵仔煎'
}, {
  value: '选项4',
  label: '龙须面'
}, {
  value: '选项5',
  label: '北京烤鸭'
}])
const disableOptions = ref([{
  value: '选项1',
  label: '黄金糕',
  disabled: true
}, {
  value: '选项2',
  label: '双皮奶'
}])
</script>

<style scoped>
.select-demo { display: flex; flex-direction: column; gap: 16px; max-width: 100%; }
.select-demo-result > pre { margin: 0; }
.select-demo-controls { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; max-width: 100%; }
.select-demo-controls > * { max-width: 100%; }
</style>
```

### 扩展插槽 {#example-4}

### 扩展插槽
```vue
<template>
  <NfConfigProvider theme="chalk" locale="zh-CN">
<div class="select-demo">
  <div class="select-demo-result"><pre>{{ values }}</pre></div>
  <div class="select-demo-controls">
<NfTransferSelect
    style="width: 600px"
    class='nf-transfer-select-demo-container'
    :collapse-tags='false'
    v-model="values"
    autocomplete='on'
    :clearable='false'
    :options='options'
  >
    <template #left-footer><ElButton class="left-footer" size="small" style='margin-left: 20px;'>左侧操作</ElButton></template>
    <template #right-footer><ElButton class="right-footer" size="small" style='margin-left: 20px;'>右侧操作</ElButton></template>
  </NfTransferSelect>
  </div>
</div>
  </NfConfigProvider>
</template>

<script setup lang="ts">
import { ref } from 'vue'
import { NfConfigProvider, NfTransferSelect } from '@94ai-plus/common-ui'
import { ElButton } from 'element-plus'

const values = ref([])
const options = ref([{
  value: '选项1',
  label: '黄金糕'
}, {
  value: '选项2',
  label: '双皮奶'
}, {
  value: '选项3',
  label: '蚵仔煎'
}, {
  value: '选项4',
  label: '龙须面'
}, {
  value: '选项5',
  label: '北京烤鸭'
}])
</script>

<style scoped>
.select-demo { display: flex; flex-direction: column; gap: 16px; max-width: 100%; }
.select-demo-result > pre { margin: 0; }
.select-demo-controls { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; max-width: 100%; }
.select-demo-controls > * { max-width: 100%; }
</style>
```

### 默认选中/自定义数据项/定制渲染标签 {#example-5}

### 默认选中/自定义数据项/定制渲染标签
```vue
<template>
  <NfConfigProvider theme="chalk" locale="zh-CN">
<div class='nf-transfer-select-demo-container' >
    <div class="select-demo">
  <div class="select-demo-result"><pre>{{ defaultValues }}</pre></div>
  <div class="select-demo-controls">
<NfTransferSelect
      style="width: 600px"
      :left-render-content="leftRenderContent"
      :right-render-content="rightRenderContent"
      left-filter-placeholder='左侧搜索'
      right-filter-placeholder='右侧搜索'
      :collapse-tags='false'
      :options='options'
      v-model='defaultValues'
    >
    </NfTransferSelect>
  </div>
</div>

    <ElDivider class="select-demo-divider">上面使用el-select组件浮动来 </ElDivider>
    <ElDivider class="select-demo-divider">下面使用div标签沉下去 </ElDivider>

    <div class="select-demo">
  <div class="select-demo-result"><pre>{{ defaultValues }}</pre></div>
  <div class="select-demo-controls">
<NfTransferSelect
      style="width: 600px"
      :left-render-content="leftRenderContent"
      :right-render-content="rightRenderContent"
      left-filter-placeholder='左侧搜索'
      right-filter-placeholder='右侧搜索'
      :collapse-tags='false'
      :options='options'
      v-model='defaultValues'
      tag="div"
    >
    </NfTransferSelect>
  </div>
</div>
  </div>
  </NfConfigProvider>
</template>

<script setup lang="ts">
import { ref } from 'vue'
import { NfConfigProvider, NfTransferSelect } from '@94ai-plus/common-ui'
import { ElDivider } from 'element-plus'
import { Delete } from '@element-plus/icons-vue'

const defaultValues = ref(['选项1'])

const leftRenderContent = (h, option) => {
  return h("span",{class: "xxx"},['左侧' + '-' + option.label]);
}

const rightRenderContent = (h, option) => {
  return h("span",{class: "xxx", style: 'margin-right: 10px;' },['右侧' + '-' + option.label, h(Delete)]);
}

const options = ref([{
  value: '选项1',
  label: '黄金糕'
}, {
  value: '选项2',
  label: '双皮奶'
}, {
  value: '选项3',
  label: '蚵仔煎'
}, {
  value: '选项4',
  label: '龙须面'
}, {
  value: '选项5',
  label: '北京烤鸭'
}])
</script>

<style scoped>
.select-demo { display: flex; flex-direction: column; gap: 16px; max-width: 100%; }
.select-demo-result > pre { margin: 0; }
.select-demo-controls { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; max-width: 100%; }
.select-demo-controls > * { max-width: 100%; }
.select-demo-divider { display: flex; align-items: center; gap: 12px; height: auto; border-top: 0; }
.select-demo-divider::before, .select-demo-divider::after { content: ''; flex: 1; min-width: 12px; border-top: 1px solid var(--el-border-color); }
.select-demo-divider :deep(.el-divider__text) { position: static; transform: none; flex: 0 1 auto; min-width: 0; max-width: calc(100% - 48px); padding: 0; text-align: center; white-space: normal; }
</style>
```

### 默认选中数据缺失/左侧按钮slot {#example-6}

### 默认选中数据缺失/左侧按钮slot
```vue
<template>
  <NfConfigProvider theme="chalk" locale="zh-CN">
<div class='nf-transfer-select-demo-container' >
    <div class="select-demo">
  <div class="select-demo-result"><pre>{{ defaultValues }}</pre></div>
  <div class="select-demo-controls">
<NfTransferSelect
      style="width: 600px"
      left-filter-placeholder='左侧搜索'
      right-filter-placeholder='右侧搜索'
      :collapse-tags='false'
      :options='options'
      v-model='defaultValues'
      @left-item-click="leftItemClick"
      :copyValType='1'
      @copySuccess="copyCallback"
    >
    <template #left-item-button><span>详情</span></template>
    </NfTransferSelect>
  </div>
</div>


  <NfButton type="primary" size="mini" style="margin: 10px 0" @click="options = []" >清空options的值</NfButton>
  </div>
  </NfConfigProvider>
</template>

<script setup lang="ts">
import { ref } from 'vue'
import { NfConfigProvider, NfTransferSelect, NfButton } from '@94ai-plus/common-ui'

const defaultValues = ref(['选项1','选项9','选项10'])

const options = ref([{
  value: '选项1',
  label: '双皮奶-双皮奶'
}, {
  value: '选项2',
  label: '双皮奶-双皮奶-双皮奶-双皮奶-双皮奶-双皮奶-双皮奶-双皮奶双皮奶双皮奶双皮奶双皮奶双皮奶双皮奶双皮奶双皮奶双皮奶双皮奶双皮奶',
}, {
  value: '选项3',
  label: '蚵仔煎'
}, {
  value: '选项4',
  label: '55-11试通用55-11试通用55-11试通用55-11试通用'
}, {
  value: '选项5',
  label: '55-11试通用'
}, {
  value: '选项6',
  label: '双皮奶44'
}, {
  value: '选项7',
  label: '双皮奶777888888'
}])
const leftItemClick = function(value) {
  console.log(value)
}
const copyCallback = (val) => {
  alert(val)
}
</script>

<style scoped>
.select-demo { display: flex; flex-direction: column; gap: 16px; max-width: 100%; }
.select-demo-result > pre { margin: 0; }
.select-demo-controls { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; max-width: 100%; }
.select-demo-controls > * { max-width: 100%; }
</style>
```

### options与前置条件有联动，动态修改提示文案 {#example-7}

### options与前置条件有联动，动态修改提示文案
```vue
<template>
  <NfConfigProvider theme="chalk" locale="zh-CN">
<div class='nf-transfer-select-demo-container' >

    <div class="select-demo">
  <div class="select-demo-result"><pre>{{ defaultValues }}</pre></div>
  <div class="select-demo-controls">
<NfTransferSelect
      ref="transferRef1"
      style="width: 600px"
      left-filter-placeholder='左侧搜索'
      right-filter-placeholder='右侧搜索'
      :collapse-tags='false'
      :options='options'
      :queryRequired="true"
      v-model='defaultValues'
      :preTip="dynamicTip"
      :virtualList="true"
      :copyValType='1'
      tag='div'
    >
    </NfTransferSelect>
  </div>
</div>
    <NfButton type="primary" size="mini" style="margin: 10px 0" @click="setOptions">修改options的值</NfButton>
    <NfButton type="primary" size="mini" style="margin: 10px 0" @click="setOptionsEmpty">修改options的值为空</NfButton>
    <NfButton type="primary" size="mini" style="margin: 10px 0" @click="clearVal">清空选中的穿梭框数据</NfButton>
  </div>
  </NfConfigProvider>
</template>

<script setup lang="ts">
import { ref } from 'vue'
import { NfConfigProvider, NfTransferSelect, NfButton } from '@94ai-plus/common-ui'

const defaultValues = ref(['选项4'])
const dynamicTip = ref('请先选择企业!')
const options = ref([])
const transferRef1 = ref(null)
const setOptions = () => {
  options.value = [
  { value: '选项1', label: '黄金糕' },
  { value: '选项2', label: '双皮奶' },
  { value: '选项3', label: '蚵仔煎' },
  { value: '选项4', label: '龙须面' },
  { value: '选项5', label: '北京烤鸭' },
  { value: '选项6', label: '小笼包' },
  { value: '选项7', label: '麻辣烫' },
  { value: '选项8', label: '酸辣粉' },
  { value: '选项9', label: '重庆火锅' },
  { value: '选项10', label: '兰州拉面' },
  { value: '选项11', label: '扬州炒饭' },
  { value: '选项12', label: '西湖醋鱼' },
  { value: '选项13', label: '东坡肉' },
  { value: '选项14', label: '佛跳墙' },
  { value: '选项15', label: '宫保鸡丁' },
  { value: '选项16', label: '水煮鱼' },
  { value: '选项17', label: '回锅肉' },
  { value: '选项18', label: '麻婆豆腐' },
  { value: '选项19', label: '糖醋排骨' },
  { value: '选项20', label: '红烧狮子头' },
  { value: '选项21', label: '清蒸鲈鱼' },
  { value: '选项22', label: '葱油拌面' },
  { value: '选项23', label: '担担面' },
  { value: '选项24', label: '热干面' },
  { value: '选项25', label: '刀削面' },
  { value: '选项26', label: '臊子面' },
  { value: '选项27', label: '牛肉面' },
  { value: '选项28', label: '炸酱面' },
  { value: '选项29', label: '阳春面' },
  { value: '选项30', label: '云吞面' },
  { value: '选项31', label: '肠粉' },
  { value: '选项32', label: '煲仔饭' },
  { value: '选项33', label: '叉烧包' },
  { value: '选项34', label: '虾饺' },
  { value: '选项35', label: '烧麦' },
  { value: '选项36', label: '糯米鸡' },
  { value: '选项37', label: '萝卜糕' },
  { value: '选项38', label: '凤爪' },
  { value: '选项39', label: '豉汁排骨' },
  { value: '选项40', label: '干炒牛河' },
  { value: '选项41', label: '白切鸡' },
  { value: '选项42', label: '盐焗鸡' },
  { value: '选项43', label: '梅菜扣肉' },
  { value: '选项44', label: '客家酿豆腐' },
  { value: '选项45', label: '三杯鸡' },
  { value: '选项46', label: '蚵仔米线' },
  { value: '选项47', label: '沙县小吃' },
  { value: '选项48', label: '黄焖鸡' },
  { value: '选项49', label: '大盘鸡' },
  { value: '选项50', label: '手抓羊肉' },
  { value: '选项51', label: '羊肉泡馍' },
  { value: '选项52', label: '肉夹馍' },
  { value: '选项53', label: '凉皮' },
  { value: '选项54', label: '驴肉火烧' },
  { value: '选项55', label: '狗不理包子' },
  { value: '选项56', label: '煎饼果子' },
  { value: '选项57', label: '鸡蛋灌饼' },
  { value: '选项58', label: '臭豆腐' },
  { value: '选项59', label: '毛血旺' },
  { value: '选项60', label: '夫妻肺片' }
]
  dynamicTip.value = '请先输入要筛选的内容'
}
const setOptionsEmpty = () => {
  options.value = [
    { value: '选项59', label: '毛血旺' }
  ]
}
// 清空数据
const clearVal = () => {
  defaultValues.value = []
}
</script>

<style scoped>
.select-demo { display: flex; flex-direction: column; gap: 16px; max-width: 100%; }
.select-demo-result > pre { margin: 0; }
.select-demo-controls { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; max-width: 100%; }
.select-demo-controls > * { max-width: 100%; }
</style>
```

## 属性 {#props}

说明沿用 common-ui 的业务含义，默认值和签名以当前 Vue 3 实现为准。兼容属性不等于已启用旧渲染能力。

| 属性 | 说明 | 类型 | 可选值 | 默认值 |
| --- | --- | --- | --- | --- |
| `modelValue / v-model (value)` | 绑定值；兼容 value，Vue 3 推荐 v-model | `OptionValue[]` | — | `[]` |
| `options` | 选择项列表 | `SelectOption[]` | — | `[]` |
| `valueKey` | 作为 value 唯一标识的键名 | `string` | — | `'value'` |
| `labelKey` | 作为 label 的键名 | `string` | — | `'label'` |
| `tag` | 自定义渲染模式；div 为平铺穿梭面板，其余值使用 Popover | `string \| Component` | — | `'el-select'` |
| `disabled` | 是否禁用 | `boolean` | — | `false` |
| `size` | 输入框尺寸，mini / medium 兼容映射为 small / default | `SelectSize` | `small / default / large / mini / medium` | `继承配置` |
| `clearable` | 是否可以清空选项 | `boolean` | — | `true` |
| `collapseTags` | 多选时是否合并展示选中标签 | `boolean` | — | `true` |
| `multipleLimit` | 多选上限，0 表示不限制 | `number` | — | `0` |
| `allowCreate` | 允许创建新条目，需配合 filterable | `boolean` | — | `false` |
| `popperClass` | 下拉框的类名 | `string` | — | `undefined` |
| `reserveKeyword` | 选中后是否保留当前搜索关键词 | `boolean` | — | `false` |
| `popperAppendToBody` | 是否将弹层传送到 body，对应 Element Plus teleported | `boolean` | — | `false` |
| `automaticDropdown` | 不可搜索时，获得焦点是否自动展开 | `boolean` | — | `false` |
| `filterable` | 是否可搜索 | `boolean` | — | `true` |
| `filterMethod` | 自定义搜索方法 | `(query: string, option: Option) => boolean` | — | `undefined` |
| `leftFormat` | 左侧列表顶部勾选状态文案 | `TransferFormat` | — | `{ noChecked: '(${total})', hasChecked: '(${checked}/${total})' }` |
| `rightFormat` | 右侧列表顶部勾选状态文案 | `TransferFormat` | — | `{ noChecked: '(${total})', hasChecked: '(${checked}/${total})' }` |
| `leftRenderContent` | 左侧自定义数据项渲染函数 | `(h, option) => VNodeChild` | — | `undefined` |
| `rightRenderContent` | 右侧自定义数据项渲染函数 | `(h, option) => VNodeChild` | — | `undefined` |
| `targetOrder` | 右侧排序：original 跟随数据源，push 新增在末尾，unshift 新增在开头 | `string` | `original / push / unshift` | `'original'` |
| `placeholder` | 输入框占位文本 | `string` | — | `跟随语言配置` |
| `leftFilterPlaceholder` | 左侧面板搜索占位文本 | `string` | — | `跟随语言配置` |
| `rightFilterPlaceholder` | 右侧面板搜索占位文本 | `string` | — | `跟随语言配置` |
| `titles` | 自定义左右列表标题 | `string[]` | — | `跟随语言配置` |
| `isCheckValid` | 是否检查并标记失效数据 | `boolean` | — | `true` |
| `preTip` | 穿梭框中的提示文案 | `string` | — | `''` |
| `copyValType` | 复制内容类型：1 复制 label，2 复制 value；未设置则关闭复制 | `number \| string` | `1 / 2` | `undefined` |
| `copySucessDesc` | 复制成功的提示文案 | `string` | — | `跟随语言配置` |
| `virtualList` | 是否启用虚拟滚动 | `boolean` | — | `false` |
| `queryRequired` | 输入筛选内容后才显示列表数据 | `boolean` | — | `false` |
| `name` | 输入框原生 name | `string` | — | `undefined` |

## 事件 {#events}

| 事件 | 说明 | 参数 |
| --- | --- | --- |
| `update:modelValue` | 选中值变化，更新 v-model | `(value: OptionValue[])` |
| `update:value` | 选中值变化，保留旧版事件 | `(value: OptionValue[])` |
| `input` | 选中值变化，保留旧版事件 | `(value: OptionValue[])` |
| `change` | 选中值发生变化时触发 | `(value: OptionValue[])` |
| `focus` | 输入框获得焦点时触发 | `(event: FocusEvent)` |
| `blur` | 输入框失去焦点时触发 | `(event: FocusEvent)` |
| `clear` | 点击清空控件时触发 | `()` |
| `remove-tag` | 多选模式下移除标签时触发 | `(value: SelectValue)` |
| `visible-change` | 下拉框出现为 true，隐藏为 false | `(visible: boolean)` |
| `left-check-change` | 左侧勾选变化；参数为最终已选值数组 | `(values: OptionValue[])` |
| `right-check-change` | 右侧勾选变化；参数为本次受影响的有效值数组 | `(values: OptionValue[])` |
| `left-item-click` | 左侧数据项按钮点击，返回完整选项 | `(option: Option)` |
| `copySuccess` | 复制成功，返回复制文本 | `(text: string)` |
| `copyError` | 复制失败，返回错误 | `(error: unknown)` |

## 插槽 {#slots}

| 插槽 | 说明 | 作用域 |
| --- | --- | --- |
| `left-item` | 自定义左侧数据项内容 | `{ option: Option }` |
| `right-item` | 自定义右侧数据项内容 | `{ option: Option }` |
| `left-footer` | 左侧列表底部内容 | — |
| `right-footer` | 右侧列表底部内容 | — |
| `prefix` | 输入框前缀内容 | — |
| `empty` | 无选项时的内容 | — |
| `left-item-button` | 左侧数据项右侧按钮内容；点击触发 left-item-click | — |

## 实例方法与状态 {#methods}

- `cachedValue`
- `optionsData`
- `nfLeftTransferSelect`
- `nfRightTransferSelect`
- `nfTransferSelectFormContainer`
- `clearAll()`
- `removeTag(value)`
- `visibleChange(boolean)`

## 迁移说明 {#migration}

右侧勾选全部表示移除当前过滤结果；左侧取消全选不影响其他搜索结果的已选值。禁用项不受批量操作影响。copyValType=1 复制标签、=2 复制值。left/rightRenderContent 使用 Vue 3 h/VNode。tag="div" 为平铺，其余布局采用公开 Popover API，不再支持任意 Element UI 私有 Select 容器。

`tag="div"` renders inline panels. Disabled options survive bulk removal. `copyValType=1` copies labels; `2` copies keys. Scoped slots receive `{ option }`; render callbacks use Vue 3 `h`.
