3 Star 9 Fork 5

XE / vxe-table-plugin-iview

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

vxe-table-plugin-iview

gitee star npm version npm downloads npm license

基于 vxe-table 表格的适配插件,用于兼容 view-ui-plus 组件库

Compatibility

对应 vxe-table v4 版本

Installing

npm install xe-utils vxe-table@next vxe-table-plugin-iview@next view-ui-plus
// ...
import VXETable from 'vxe-table'
import VXETablePluginIView from 'vxe-table-plugin-iview'
import 'vxe-table-plugin-iview/dist/style.css'
// ...

VXETable.use(VXETablePluginIView)

API

cell-render 默认的渲染器配置项说明

属性 描述 类型 可选值 默认值
name 支持的渲染组件 String Input, AutoComplete, InputNumber, Rate, iSwitch, Button, Buttons
props 渲染组件附加属性,参数请查看被渲染的 Component props Object {}
options 只对 name=Select 有效,下拉组件选项列表 Array []
optionProps 只对 name=Select 有效,下拉组件选项属性参数配置 Object { value: 'value', label: 'label' }
optionGroups 只对 name=ElSelect 有效,下拉组件分组选项列表 Array []
optionGroupProps 只对 name=ElSelect 有效,下拉组件分组选项属性参数配置 Object { options: 'options', label: 'label' }
events 渲染组件附加事件,参数为 ( {row,rowIndex,column,columnIndex}, ...Component arguments ) Object
nativeEvents 渲染组件附加事件,参数为 ( {row,rowIndex,column,columnIndex}, ...Component arguments ) Object

edit-render 可编辑渲染器配置项说明

属性 描述 类型 可选值 默认值
name 支持的渲染组件 String Input, AutoComplete, InputNumber, Select, Cascader, DatePicker, TimePicker, Rate, iSwitch, Button, Buttons
props 渲染组件附加属性,参数请查看被渲染的 Component props Object {}
options 只对 name=Select 有效,下拉组件选项列表 Array []
optionProps 只对 name=Select 有效,下拉组件选项属性参数配置 Object { value: 'value', label: 'label' }
optionGroups 只对 name=ElSelect 有效,下拉组件分组选项列表 Array []
optionGroupProps 只对 name=ElSelect 有效,下拉组件分组选项属性参数配置 Object { options: 'options', label: 'label' }
events 渲染组件附加事件,参数为 ( {row,rowIndex,column,columnIndex}, ...Component arguments ) Object
nativeEvents 渲染组件附加事件,参数为 ( {row,rowIndex,column,columnIndex}, ...Component arguments ) Object

filter-render 筛选渲染器配置项说明

属性 描述 类型 可选值 默认值
name 支持的渲染组件 String Input, AutoComplete, InputNumber, Select, Rate, iSwitch
props 渲染组件附加属性,参数请查看被渲染的 Component props Object {}
options 只对 name=Select 有效,下拉组件选项列表 Array []
optionProps 只对 name=Select 有效,下拉组件选项属性参数配置 Object { value: 'value', label: 'label' }
optionGroups 只对 name=ElSelect 有效,下拉组件分组选项列表 Array []
optionGroupProps 只对 name=ElSelect 有效,下拉组件分组选项属性参数配置 Object { options: 'options', label: 'label' }
events 渲染组件附加事件,参数为 ( {}, ...Component arguments ) Object
nativeEvents 渲染组件附加事件,参数为 ( {}, ...Component arguments ) Object

item-render 表单-项渲染器配置项说明

属性 描述 类型 可选值 默认值
name 支持的渲染组件 String Input, AutoComplete, InputNumber, Select, Rate, iSwitch, Radio, Checkbox, Button, Buttons
props 渲染组件附加属性,参数请查看被渲染的 Component props Object {}
options 只对 name=Select 有效,下拉组件选项列表 Array []
optionProps 只对 name=Select 有效,下拉组件选项属性参数配置 Object { value: 'value', label: 'label' }
optionGroups 只对 name=ElSelect 有效,下拉组件分组选项列表 Array []
optionGroupProps 只对 name=ElSelect 有效,下拉组件分组选项属性参数配置 Object { options: 'options', label: 'label' }
events 渲染组件附加事件,参数为 ( {}, ...Component arguments ) Object
nativeEvents 渲染组件附加事件,参数为 ( {}, ...Component arguments ) Object

Cell demo

<vxe-table
  height="600"
  :data="tableData"
  :edit-config="{trigger: 'click', mode: 'cell'}">
  <vxe-column field="name" title="Name" :edit-render="{}">
    <template #edit="{ row }">
      <i-input v-model="row.name"></i-input>
    </template>
  </vxe-column>
  <vxe-column field="age" title="Age" :edit-render="{}">
    <template #edit="{ row }">
      <i-input-number v-model="row.age"></i-input-number>
    </template>
  </vxe-column>
  <vxe-column field="date" title="Date" width="200" :edit-render="{}">
    <template #edit="{ row }">
      <i-date-picker v-model="row.date" type="date"></i-date-picker>
    </template>
  </vxe-column>
</vxe-table>
export default {
  data () {
    return {
      tableData: [
        { id: 100, name: 'test0', age: 28, sex: '1', date: null },
        { id: 101, name: 'test1', age: 32, sex: '0', date: null },
        { id: 102, name: 'test2', age: 36, sex: '1', date: null }
      ]
    }
  }
}

Filter demo

<vxe-table
  height="600"
  :data="tableData">
  <vxe-column field="name" title="Name"></vxe-column>
  <vxe-column field="age" title="Age"></vxe-column>
  <vxe-column field="date" title="Date" :filters="[{data: []}]" :filter-render="{}">
    <template #filter="{ $panel, column }">
      <i-input type="type" v-for="(option, index) in column.filters" :key="index" v-model="option.data" @input="$panel.changeOption($event, !!option.data, option)"></i-input>
    </template>
  </vxe-column>
</vxe-table>
export default {
  data () {
    return {
      tableData: [
        { id: 100, name: 'test0', age: 28, date: null },
        { id: 101, name: 'test1', age: 32, date: null },
        { id: 102, name: 'test2', age: 36, date: null }
      ]
    }
  }
}

License

MIT © 2019-present, Xu Liangzhan

MIT License Copyright (c) 2019 Xu Liangzhan Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

基于 vxe-table 表格的适配插件,用于兼容 iview、view-design 组件库 展开 收起
JavaScript 等 3 种语言
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
JavaScript
1
https://gitee.com/x-extends/vxe-table-plugin-iview.git
git@gitee.com:x-extends/vxe-table-plugin-iview.git
x-extends
vxe-table-plugin-iview
vxe-table-plugin-iview
master

搜索帮助