xacme-change-multiple
v1.0.3
Published
``` 是element table表格复选框变更为简单的单选框实现方式,只需要两步即可实现单选功能, 适用于局部。 ```
Downloads
10
Readme
xacme-change-multiple 介绍
是element table表格复选框变更为简单的单选框实现方式,只需要两步即可实现单选功能, 适用于局部。
安装
npm install xacme-change-multiple --save
初步使用
在组件style标签中导入如下
@import 'xacme-change-multiple/lib/xacme-change-multiple.css';
在组件script中导入如下
import { getCurrentRadio } from 'xacme-change-multiple'
getCurrentRadio(
参数1为elment表格的ref名称,
参数2为回调函数@select方法的值,
参数3为回调函数@select方法的值 )
具体使用栗子
<template>
<!-- 表单的使用变更,定义ref="tableRef", 添加class="x-sun-table"样式 -->
<el-table
ref="tableRef"
class="x-sun-table"
@select="selectChange">
<el-table-column type="selection" width="50"></el-table-column>
...........
</el-table>
</template>
<methods>
方法使用:
selectChange(selection, row) {
const data = getCurrentRadio(this.$refs.tableRef, selection, row);
console.log(data, 此处返还数据随个人处理);
}
</methods>