From 66effde1d90fe4cf5da7e4f615a88292ddf755ed Mon Sep 17 00:00:00 2001 From: H0nGzA1 <2505811377@qq.com> Date: Thu, 18 May 2023 00:15:39 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E2=9A=A1=20=E7=94=A8=E6=88=B7-?= =?UTF-8?q?=E9=87=8D=E8=AE=BE=E5=AF=86=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/system/dictionary/subDict/crud.tsx | 2 +- web/src/views/system/user/crud.tsx | 17 +++++++++++++++-- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/web/src/views/system/dictionary/subDict/crud.tsx b/web/src/views/system/dictionary/subDict/crud.tsx index 8ee841c..342d989 100644 --- a/web/src/views/system/dictionary/subDict/crud.tsx +++ b/web/src/views/system/dictionary/subDict/crud.tsx @@ -23,7 +23,7 @@ export const createCrudOptions = function ({crudExpose, context}: CreateCrudOpti return await api.DelObj(row.id); }; const addRequest = async ({form}: AddReq) => { - const data = crudExpose.getSearchFormData() + const data = crudExpose!.getSearchFormData() const parent = data.parent form.parent = parent if (parent) { diff --git a/web/src/views/system/user/crud.tsx b/web/src/views/system/user/crud.tsx index 79de3ed..101ce5c 100644 --- a/web/src/views/system/user/crud.tsx +++ b/web/src/views/system/user/crud.tsx @@ -50,7 +50,7 @@ export const createCrudOptions = function ({ crudExpose }: CreateCrudOptionsProp text:"导出",//按钮文字 title:"导出",//鼠标停留显示的信息 click(){ - return exportRequest(crudExpose.getSearchFormData()) + return exportRequest(crudExpose!.getSearchFormData()) } } } @@ -58,7 +58,7 @@ export const createCrudOptions = function ({ crudExpose }: CreateCrudOptionsProp rowHandle: { //固定右侧 fixed: 'right', - width: 140, + width: 200, buttons: { view: { show: false, @@ -73,6 +73,19 @@ export const createCrudOptions = function ({ crudExpose }: CreateCrudOptionsProp type: 'text', show: hasPermissions('user:Delete'), }, + custom: { + text: '重设密码', + type: 'text', + show: hasPermissions('user:ResetPassword'), + tooltip: { + placement: 'top', + content: '重设密码', + }, + //@ts-ignore + click: (ctx: any) => { + const { row } = ctx; + }, + }, }, }, columns: {