Skip to content

Commit 6155357

Browse files
author
283591387@qq.com
committed
增加移动端多按钮配置模板
1 parent fc16c30 commit 6155357

File tree

3 files changed

+93
-3
lines changed

3 files changed

+93
-3
lines changed

.Net6版本/VOL.WebApi/Template/Page/app/extension.html

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,11 @@
2424
// //自定义格式化显示,在下面的formatter实现具体逻辑
2525
// //column.formatter=true;
2626

27+
// //开启table单元格点击事件(仅设置this.direction = 'horizontal属性后生效)
28+
// column.click=true;
29+
2730
// //指定字段为date类型不显示时分秒
2831
// //column.type="date";
29-
3032
// //设置列宽度
3133
// //column.width = 70;
3234
// }
@@ -46,6 +48,34 @@
4648
rowClick(index, row, column) { //行点击事件(默认触发编辑)
4749
return true;
4850
},
51+
cellClick(index, row, column) { //单元格击事件(默认触发编辑)
52+
//仅onInited中设置:this.direction = "horizontal", this.columns的字段设置为click=true后生效
53+
return true;
54+
},
55+
rowButtons(index, row) { //列表显示的按钮
56+
//自定义按钮,仅onInited中设置:this.direction = "list"后生效
57+
// return [{
58+
// text: "测试",
59+
// icon: "edit-pen",
60+
// type: "primary",
61+
// plain:true,
62+
// shape:"circle",
63+
// disabled: false
64+
// },{
65+
// text: "删除",
66+
// icon: "trash",
67+
// type: "error",
68+
// plain:true,
69+
// shape:"circle",
70+
// //shape:"",//square、circle
71+
// disabled: false
72+
// }];
73+
},
74+
rowButtonClick(btn,index, row){ //列表显示的按钮点击事件
75+
// if(btn.text=='删除'){
76+
// this.$toast('删除')
77+
// }
78+
},
4979
searchBefore(params){ //查询前
5080
return true;
5181
},

Vue.Net/VOL.WebApi/Template/Page/app/extension.html

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,11 @@
2424
// //自定义格式化显示,在下面的formatter实现具体逻辑
2525
// //column.formatter=true;
2626

27+
// //开启table单元格点击事件(仅设置this.direction = 'horizontal属性后生效)
28+
// column.click=true;
29+
2730
// //指定字段为date类型不显示时分秒
2831
// //column.type="date";
29-
3032
// //设置列宽度
3133
// //column.width = 70;
3234
// }
@@ -46,6 +48,34 @@
4648
rowClick(index, row, column) { //行点击事件(默认触发编辑)
4749
return true;
4850
},
51+
cellClick(index, row, column) { //单元格击事件(默认触发编辑)
52+
//仅onInited中设置:this.direction = "horizontal", this.columns的字段设置为click=true后生效
53+
return true;
54+
},
55+
rowButtons(index, row) { //列表显示的按钮
56+
//自定义按钮,仅onInited中设置:this.direction = "list"后生效
57+
// return [{
58+
// text: "测试",
59+
// icon: "edit-pen",
60+
// type: "primary",
61+
// plain:true,
62+
// shape:"circle",
63+
// disabled: false
64+
// },{
65+
// text: "删除",
66+
// icon: "trash",
67+
// type: "error",
68+
// plain:true,
69+
// shape:"circle",
70+
// //shape:"",//square、circle
71+
// disabled: false
72+
// }];
73+
},
74+
rowButtonClick(btn,index, row){ //列表显示的按钮点击事件
75+
// if(btn.text=='删除'){
76+
// this.$toast('删除')
77+
// }
78+
},
4979
searchBefore(params){ //查询前
5080
return true;
5181
},

开发版dev/Vue.NetCore/Vue.Net/VOL.WebApi/Template/Page/app/extension.html

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,11 @@
2424
// //自定义格式化显示,在下面的formatter实现具体逻辑
2525
// //column.formatter=true;
2626

27+
// //开启table单元格点击事件(仅设置this.direction = 'horizontal属性后生效)
28+
// column.click=true;
29+
2730
// //指定字段为date类型不显示时分秒
2831
// //column.type="date";
29-
3032
// //设置列宽度
3133
// //column.width = 70;
3234
// }
@@ -46,6 +48,34 @@
4648
rowClick(index, row, column) { //行点击事件(默认触发编辑)
4749
return true;
4850
},
51+
cellClick(index, row, column) { //单元格击事件(默认触发编辑)
52+
//仅onInited中设置:this.direction = "horizontal", this.columns的字段设置为click=true后生效
53+
return true;
54+
},
55+
rowButtons(index, row) { //列表显示的按钮
56+
//自定义按钮,仅onInited中设置:this.direction = "list"后生效
57+
// return [{
58+
// text: "测试",
59+
// icon: "edit-pen",
60+
// type: "primary",
61+
// plain:true,
62+
// shape:"circle",
63+
// disabled: false
64+
// },{
65+
// text: "删除",
66+
// icon: "trash",
67+
// type: "error",
68+
// plain:true,
69+
// shape:"circle",
70+
// //shape:"",//square、circle
71+
// disabled: false
72+
// }];
73+
},
74+
rowButtonClick(btn,index, row){ //列表显示的按钮点击事件
75+
// if(btn.text=='删除'){
76+
// this.$toast('删除')
77+
// }
78+
},
4979
searchBefore(params){ //查询前
5080
return true;
5181
},

0 commit comments

Comments
 (0)