😰代码模板增加行双击事件
This commit is contained in:
parent
ebd71a8538
commit
cb671378b8
@ -206,6 +206,7 @@ import { useUserInfo } from '/@@/stores/userInfo';
|
||||
import { VxeGridInstance, VxeGridListeners, VxeGridPropTypes } from 'vxe-table';
|
||||
import { useVxeTable } from '/@@/hooks/useVxeTableOptionsHook';
|
||||
import { Local } from '/@@/utils/storage';
|
||||
import { auth } from '/@@/utils/authFunction';
|
||||
|
||||
@if(@Model.TableField.Any(x=>x.EffectType == "DatePicker")){
|
||||
@:import { formatDate } from '/@@/utils/formatTime';
|
||||
@ -340,7 +341,7 @@ const checkTableColumnVisible = (tableColumnName: any) => {
|
||||
@if(@Model.TableField.Any(t => t.ColumnName == "CreateTime") && @Model.TableField.Any(t => t.ColumnName == "UpdateTime") && @Model.TableField.Any(t => t.ColumnName == "CreateUserId")){
|
||||
@:{ title: '修改记录', width: 100, showOverflow: 'tooltip', slots: { default: 'row_record' } },
|
||||
}
|
||||
{ title: '操作', fixed: 'right', width: 180, showOverflow: true, slots: { default: 'row_buttons' } },
|
||||
{ field: 'buttons', title: '操作', fixed: 'right', width: 180, showOverflow: true, slots: { default: 'row_buttons' } },
|
||||
],
|
||||
@if(@Model.TableField.Any(x=>x.Statistical == "Y")){
|
||||
@:footerMethod: ({ columns, data }) => {
|
||||
@ -523,6 +524,10 @@ const handleDelete = (row: any) => {
|
||||
state.localPageParam.defaultSort = { field: field, order: order!, descStr: 'desc' };
|
||||
Local.set(localPageParamKey, state.localPageParam);
|
||||
},
|
||||
// 双击行事件
|
||||
async cellDblclick({ row }) {
|
||||
if (auth('@(@Model.LowerClassName)/update')) await handleEdit(row);
|
||||
},
|
||||
};
|
||||
|
||||
@foreach (var column in Model.QueryWhetherList) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user