|
@@ -1,4 +1,4 @@
|
|
|
-import { AddReq, CreateCrudOptionsProps, CreateCrudOptionsRet, DelReq, dict, EditReq, UserPageQuery } from '@fast-crud/fast-crud';
|
|
|
+import { AddReq, CreateCrudOptionsProps, CreateCrudOptionsRet, DelReq, dict, EditReq, UserPageQuery,compute } from '@fast-crud/fast-crud';
|
|
|
import * as api from './api';
|
|
|
import { auth } from '/@/utils/authFunction';
|
|
|
import { commonCrudConfig } from '/@/utils/commonCrud';
|
|
@@ -31,7 +31,10 @@ export const createCrudOptions = function ({ crudExpose }: CreateCrudOptionsProp
|
|
|
wrapper: {
|
|
|
buttons: {
|
|
|
ok:{
|
|
|
- text:'提交'
|
|
|
+ text:'提交',
|
|
|
+ show:compute((row) => {
|
|
|
+ return row.mode !=='view'
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -48,16 +51,16 @@ export const createCrudOptions = function ({ crudExpose }: CreateCrudOptionsProp
|
|
|
},
|
|
|
rowHandle: {
|
|
|
fixed:'right',
|
|
|
- width: 100,
|
|
|
+ width: 230,
|
|
|
buttons: {
|
|
|
view: {
|
|
|
- type: 'text',
|
|
|
+ show: true,
|
|
|
},
|
|
|
edit: {
|
|
|
- show: false,
|
|
|
+ show: true,
|
|
|
},
|
|
|
remove: {
|
|
|
- show: false,
|
|
|
+ show: true,
|
|
|
},
|
|
|
},
|
|
|
},
|