Transfer 穿梭框 您所在的位置:网站首页 elementui穿梭框分页 Transfer 穿梭框

Transfer 穿梭框

2024-07-01 14:03| 来源: 网络整理| 查看: 265

Transfer 穿梭框 #基础用法 #可搜索过滤 #

在数据很多的情况下,可以对数据进行搜索和过滤。

自定义 #

可以对列表标题文案、按钮文案、数据项的渲染函数、列表底部的勾选状态文案、列表底部的内容区等进行自定义。

数据项属性别名 #

默认情况下,Transfer 仅能识别数据项中的 key、label 和 disabled 字段。 如果你的数据的字段名不同,可以使用 props 属性为它们设置别名。

API #Attributes #属性名说明类型Defaultmodel-value / v-model选中项绑定值object[]dataTransfer 的数据源object[]filterable是否可搜索booleanfalsefilter-placeholder搜索框占位符string—filter-method自定义搜索方法Function—target-order右侧列表元素的排序策略: 若为 original,则保持与数据源相同的顺序; 若为 push,则新加入的元素排在最后; 若为 unshift,则新加入的元素排在最前enumoriginaltitles自定义列表标题object[]button-texts自定义按钮文案object[]render-content自定义数据项渲染函数object—format列表顶部勾选状态文案object{}props数据源的字段别名object—left-default-checked初始状态下左侧列表的已勾选项的 key 数组object[]right-default-checked初始状态下右侧列表的已勾选项的 key 数组object[]validate-event是否触发表单验证booleantrueEvents #插槽名说明Typechange右侧列表元素变化时触发Functionleft-check-change左侧列表元素被用户选中 / 取消选中时触发Functionright-check-change右侧列表元素被用户选中 / 取消选中时触发FunctionSlots #Name说明default自定义数据项的内容, The scope parameter isleft-footer左侧列表底部的内容right-footer右侧列表底部的内容Exposes #Method说明TypeclearQuery清空某个面板的搜索关键词FunctionType Declarations #Show declarationsimport type { h as H, VNode } from 'vue' type TransferKey = string | number type TransferDirection = 'left' | 'right' type TransferDataItem = Record type renderContent = (h: typeof H, option: TransferDataItem) => VNode | VNode[] interface TransferFormat { noChecked?: string hasChecked?: string } interface TransferPropsAlias { label?: string key?: string disabled?: string } 源代码 #

组件 • 文档

贡献者 # 云游君 三咲智子 Jeremy zz qiang kooriookami Hefty LIUCHAO Delyan Haralanov btea msidolphin Aex Zong wzc520pyfm bqy Alan Wang zwgwf Gavin Bios Sun on the field of hope zazzaz Hades-li Henry Ge C.Y.Kun HzLin


【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有