fix(菜单管理): 🐛 菜单管理
菜单管理的按钮配置
This commit is contained in:
@@ -52,12 +52,6 @@ export const createCrudOptions = function ({
|
|||||||
align: 'center',
|
align: 'center',
|
||||||
width: '70px',
|
width: '70px',
|
||||||
columnSetDisabled: true, //禁止在列设置中选择
|
columnSetDisabled: true, //禁止在列设置中选择
|
||||||
formatter: (context) => {
|
|
||||||
//计算序号,你可以自定义计算规则,此处为翻页累加
|
|
||||||
let index = context.index ?? 1;
|
|
||||||
let pagination = crudExpose.crudBinding.value.pagination;
|
|
||||||
return ((pagination.currentPage ?? 1) - 1) * pagination.pageSize + index + 1;
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
search: {
|
search: {
|
||||||
|
|||||||
@@ -11,11 +11,12 @@
|
|||||||
<el-tag>{{ selectOptions.name }}</el-tag>
|
<el-tag>{{ selectOptions.name }}</el-tag>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<div style="position: relative">
|
<div>
|
||||||
<fs-page>
|
<fs-page style="margin-top: 60px;">
|
||||||
<fs-crud ref="crudRef" v-bind="crudBinding">
|
<fs-crud ref="crudRef" v-bind="crudBinding">
|
||||||
</fs-crud>
|
</fs-crud>
|
||||||
</fs-page>
|
</fs-page>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</el-drawer>
|
</el-drawer>
|
||||||
</template>
|
</template>
|
||||||
@@ -29,7 +30,7 @@ import * as api from './api'
|
|||||||
// 弹窗是否显示
|
// 弹窗是否显示
|
||||||
const drawer = ref(false)
|
const drawer = ref(false)
|
||||||
// 当前选择的菜单信息
|
// 当前选择的菜单信息
|
||||||
const selectOptions = ref({name:null})
|
const selectOptions:any = ref({name:null})
|
||||||
|
|
||||||
//抽屉关闭确认
|
//抽屉关闭确认
|
||||||
const handleClose = (done: () => void) => {
|
const handleClose = (done: () => void) => {
|
||||||
|
|||||||
@@ -3,8 +3,7 @@ import { dict, PageQuery, AddReq, DelReq, EditReq, CrudExpose, CrudOptions } fro
|
|||||||
import { dictionary } from '/@/utils/dictionary';
|
import { dictionary } from '/@/utils/dictionary';
|
||||||
import { eIconPicker, eIcon } from 'e-icon-picker';
|
import { eIconPicker, eIcon } from 'e-icon-picker';
|
||||||
import { useCompute } from '@fast-crud/fast-crud';
|
import { useCompute } from '@fast-crud/fast-crud';
|
||||||
import { inject } from 'vue';
|
import { inject,computed } from 'vue';
|
||||||
import { functions } from 'lodash-es';
|
|
||||||
import { apiPrefix as menuPrefix } from './api';
|
import { apiPrefix as menuPrefix } from './api';
|
||||||
import XEUtils from 'xe-utils';
|
import XEUtils from 'xe-utils';
|
||||||
import { request } from '/@/utils/service';
|
import { request } from '/@/utils/service';
|
||||||
@@ -93,10 +92,10 @@ export const createCrudOptions = function ({ crudExpose, menuButtonRef }: { crud
|
|||||||
content: '按钮配置',
|
content: '按钮配置',
|
||||||
},
|
},
|
||||||
show: compute(({ row }: any) => {
|
show: compute(({ row }: any) => {
|
||||||
if (row.web_path && !row.is_link) {
|
if (row.is_catalog) {
|
||||||
return true && hasPermissions();
|
|
||||||
}
|
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
}),
|
}),
|
||||||
click: (context: any): void => {
|
click: (context: any): void => {
|
||||||
const { row } = context;
|
const { row } = context;
|
||||||
|
|||||||
Reference in New Issue
Block a user