fix: 🐛 修复添加用户bug
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import * as api from './api';
|
||||
import { dict, UserPageQuery, AddReq, DelReq, EditReq, compute, CreateCrudOptionsProps, CreateCrudOptionsRet } from '@fast-crud/fast-crud';
|
||||
import { dictionary } from '/@/utils/dictionary';
|
||||
import {inject, nextTick, ref} from 'vue';
|
||||
import { inject, nextTick, ref } from 'vue';
|
||||
import { successMessage } from '/@/utils/message';
|
||||
|
||||
export const createCrudOptions = function ({ crudExpose, context }: CreateCrudOptionsProps): CreateCrudOptionsRet {
|
||||
@@ -20,8 +20,7 @@ export const createCrudOptions = function ({ crudExpose, context }: CreateCrudOp
|
||||
};
|
||||
|
||||
//权限判定
|
||||
const hasPermissions = inject("$hasPermissions")
|
||||
|
||||
const hasPermissions = inject('$hasPermissions');
|
||||
|
||||
return {
|
||||
crudOptions: {
|
||||
@@ -32,7 +31,7 @@ export const createCrudOptions = function ({ crudExpose, context }: CreateCrudOp
|
||||
delRequest,
|
||||
},
|
||||
rowHandle: {
|
||||
fixed:'right',
|
||||
fixed: 'right',
|
||||
width: 200,
|
||||
buttons: {
|
||||
view: {
|
||||
@@ -41,17 +40,17 @@ export const createCrudOptions = function ({ crudExpose, context }: CreateCrudOp
|
||||
edit: {
|
||||
iconRight: 'Edit',
|
||||
type: 'text',
|
||||
show:hasPermissions('dictonary:Update')
|
||||
show: hasPermissions('dictionary:Update'),
|
||||
},
|
||||
remove: {
|
||||
iconRight: 'Delete',
|
||||
type: 'text',
|
||||
show:hasPermissions('dictonary:Delete')
|
||||
show: hasPermissions('dictionary:Delete'),
|
||||
},
|
||||
custom: {
|
||||
text: '字典配置',
|
||||
type: 'text',
|
||||
show:hasPermissions('dictonary:Update'),
|
||||
show: hasPermissions('dictionary:Update'),
|
||||
tooltip: {
|
||||
placement: 'top',
|
||||
content: '字典配置',
|
||||
@@ -120,7 +119,7 @@ export const createCrudOptions = function ({ crudExpose, context }: CreateCrudOp
|
||||
},
|
||||
},
|
||||
type: 'input',
|
||||
column:{
|
||||
column: {
|
||||
minWidth: 120,
|
||||
},
|
||||
form: {
|
||||
@@ -147,7 +146,7 @@ export const createCrudOptions = function ({ crudExpose, context }: CreateCrudOp
|
||||
},
|
||||
},
|
||||
type: 'input',
|
||||
column:{
|
||||
column: {
|
||||
minWidth: 120,
|
||||
},
|
||||
form: {
|
||||
@@ -197,7 +196,7 @@ export const createCrudOptions = function ({ crudExpose, context }: CreateCrudOp
|
||||
sort: {
|
||||
title: '排序',
|
||||
type: 'number',
|
||||
column:{
|
||||
column: {
|
||||
minWidth: 80,
|
||||
},
|
||||
form: {
|
||||
|
||||
Reference in New Issue
Block a user