From 4d17a7d9dfe03edea28ac7b1096d719917bc5b5e Mon Sep 17 00:00:00 2001 From: victory Date: Wed, 22 Mar 2023 22:39:08 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BC=98=E5=8C=96=E8=A7=92=E8=89=B2?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E7=94=A8=E6=88=B7=E7=AE=A1=E7=90=86=E5=92=8C?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E7=99=BD=E5=90=8D=E5=8D=95=E7=9A=84=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/views/system/role/curd.tsx | 52 ++++++++++--------------- web/src/views/system/user/crud.tsx | 23 ----------- web/src/views/system/whiteList/crud.tsx | 23 +++++++++-- 3 files changed, 40 insertions(+), 58 deletions(-) diff --git a/web/src/views/system/role/curd.tsx b/web/src/views/system/role/curd.tsx index 330b5f7..2655d65 100644 --- a/web/src/views/system/role/curd.tsx +++ b/web/src/views/system/role/curd.tsx @@ -78,18 +78,6 @@ export const createCrudOptions = function ({crudExpose,rolePermission}: {crudExp }, }, }, - search: { - title: '关键词', - column: {show: false}, - type: 'text', - search: {show: true}, - form: { - show: false, - component: { - placeholder: '输入关键词搜索', - }, - }, - }, id: { title: 'ID', type: 'text', @@ -103,7 +91,7 @@ export const createCrudOptions = function ({crudExpose,rolePermission}: {crudExp search: {show: true}, column: { minWidth: 120, - sortable: true, + sortable: "custom", }, form: { rules: [{required: true, message: '角色名称必填'}], @@ -118,7 +106,7 @@ export const createCrudOptions = function ({crudExpose,rolePermission}: {crudExp search: {show: false}, column: { width: 120, - sortable: true, + sortable: "custom", }, form: { rules: [{required: true, message: '权限标识必填'}], @@ -131,9 +119,10 @@ export const createCrudOptions = function ({crudExpose,rolePermission}: {crudExp type: 'number', column: { width: 90, - sortable: true, + sortable: "custom", }, form: { + rules: [{required: true, message: '排序必填'}], value: 1, }, }, @@ -157,9 +146,10 @@ export const createCrudOptions = function ({crudExpose,rolePermission}: {crudExp }), column: { width: 130, - sortable: true, + sortable: "custom", }, form: { + rules: [{required: true, message: '是否管理员必填'}], value: false, }, }, @@ -183,9 +173,10 @@ export const createCrudOptions = function ({crudExpose,rolePermission}: {crudExp }), column: { width: 90, - sortable: true, + sortable: "custom", }, form: { + rules: [{required: true, message: '状态必填'}], value: true, }, }, @@ -195,7 +186,7 @@ export const createCrudOptions = function ({crudExpose,rolePermission}: {crudExp search: {show: false}, column: { width: 170, - sortable: true, + sortable: "custom", }, form: { show: false, @@ -209,7 +200,7 @@ export const createCrudOptions = function ({crudExpose,rolePermission}: {crudExp type: 'text', search: {show: false}, column: { - sortable: true, + sortable: "custom", width: 170, }, form: { @@ -219,18 +210,17 @@ export const createCrudOptions = function ({crudExpose,rolePermission}: {crudExp }, }, }, - - description: { - title: '备注', - type: 'textarea', - search: {show: false}, - form: { - component: { - maxlength: 200, - placeholder: '输入备注', - }, - }, - }, + // description: { + // title: '备注', + // type: 'textarea', + // search: {show: false}, + // form: { + // component: { + // maxlength: 200, + // placeholder: '输入备注', + // }, + // }, + // }, }, }, }; diff --git a/web/src/views/system/user/crud.tsx b/web/src/views/system/user/crud.tsx index c5aac29..3b7cd32 100644 --- a/web/src/views/system/user/crud.tsx +++ b/web/src/views/system/user/crud.tsx @@ -54,29 +54,6 @@ export const createCrudOptions = function ({ crudExpose }: { crudExpose: CrudExp columnSetDisabled: true, //禁止在列设置中选择 }, }, - search: { - title: '关键词', - column: { - show: false - }, - search: { - show: true, - component: { - props: { - clearable: true - }, - placeholder: '请输入关键词' - } - }, - form: { - show: false, - component: { - props: { - clearable: true - } - } - }, - }, username: { title: '账号', search: { diff --git a/web/src/views/system/whiteList/crud.tsx b/web/src/views/system/whiteList/crud.tsx index decf73b..a9d0545 100644 --- a/web/src/views/system/whiteList/crud.tsx +++ b/web/src/views/system/whiteList/crud.tsx @@ -28,6 +28,14 @@ export const createCrudOptions = function ({ crudExpose }: { crudExpose: CrudExp editRequest, delRequest, }, + form: { + col: {span: 24}, + labelWidth: '110px', + wrapper: { + is: 'el-dialog', + width: '600px', + }, + }, columns: { _index: { title: '序号', @@ -70,7 +78,7 @@ export const createCrudOptions = function ({ crudExpose }: { crudExpose: CrudExp }, method: { title: '请求方式', - sortable: true, + sortable: "custom", search: { disabled: false, }, @@ -93,6 +101,10 @@ export const createCrudOptions = function ({ crudExpose }: { crudExpose: CrudExp label: 'DELETE', value: 3, }, + { + label: 'PATCH', + value: 4, + } ], }), form: { @@ -113,7 +125,7 @@ export const createCrudOptions = function ({ crudExpose }: { crudExpose: CrudExp }, url: { title: '接口地址', - sortable: true, + sortable: "custom", search: { disabled: true, }, @@ -155,9 +167,11 @@ export const createCrudOptions = function ({ crudExpose }: { crudExpose: CrudExp class: { yxtInput: true }, }, helper: { - render(h) { - return ; + position: "label", + tooltip: { + placement: "top-start" }, + text: "请正确填写,以免请求时被拦截。匹配单例使用正则,例如:/api/xx/.*?/" }, }, }, @@ -173,6 +187,7 @@ export const createCrudOptions = function ({ crudExpose }: { crudExpose: CrudExp }), form: { value: true, + rules: [{ required: true, message: '必填项' }], component: { span: 12, },