提交 aef8fdfd 编写于 作者: S shenjizhe

1

上级 bdfbeeda
<template>
<view>
<thirdlucky-data-table @click="onClick" actions="+-" :columns="columns" :datas="datas"></thirdlucky-data-table>
<thirdlucky-data-table actions="+-" :buttons="buttons" :columns="columns" :datas="datas" @selected="onSelected"></thirdlucky-data-table>
</view>
</template>
<script>
export default {
data() {
return {
columns: [
{
name: 'name',
info: '姓名',
},
{
name: 'sex',
info: '性别',
}
],
datas: [{
"name": '张三',
"age": 18,
"sex": ''
},
{
"name": '李四',
"age": 20,
"sex": ''
},
{
"name": '小红',
"age": 17,
"sex": ''
},
]
};
},
methods: {
onClick(rindex, id) {
console.log("点击了:" + id + ";索引:" + rindex);
export default {
data() {
return {
columns: [
{
name: 'name',
info: '姓名'
},
{
name: 'sex',
info: '性别'
}
],
datas: [
{
name: '张三',
age: 18,
sex: ''
},
{
name: '李四',
age: 20,
sex: ''
},
{
name: '小红',
age: 17,
sex: ''
}
],
buttons: [{ id: 'refresh', name: '刷新', color: 'green' }]
};
},
methods: {
onSelected(index, action, data) {
switch (action) {
case 'select':
console.log('选中了一行记录');
break;
case 'add':
console.log('添加了一行记录');
break;
case 'delete':
console.log('点击了删除按钮');
break;
case 'refresh':
console.log('点击了刷新按钮');
break;
}
}
};
}
};
</script>
<style>
</style>
<style></style>
## 1.0.13(2021-11-26)
1. 事件名称变更
2. 快捷按钮和扩展 button
3. 更新了文档
## 1.0.12(2021-11-25)
增加了费控判断
## 1.0.11(2021-11-24)
......
{
"id": "thirdlucky-data-table",
"displayName": "thirdlucky-data-table",
"version": "1.0.12",
"version": "1.0.13",
"description": "数据绑定的 table组件",
"keywords": [
"udatatab"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册