fix(菜单管理): 🐛 菜单管理

菜单管理的按钮配置
This commit is contained in:
猿小天
2023-03-15 23:39:50 +08:00
parent 21842e19f0
commit b430086916
3 changed files with 8 additions and 14 deletions

View File

@@ -52,12 +52,6 @@ export const createCrudOptions = function ({
align: 'center',
width: '70px',
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: {

View File

@@ -11,11 +11,12 @@
<el-tag>{{ selectOptions.name }}</el-tag>
</div>
</template>
<div style="position: relative">
<fs-page>
<div>
<fs-page style="margin-top: 60px;">
<fs-crud ref="crudRef" v-bind="crudBinding">
</fs-crud>
</fs-page>
</div>
</el-drawer>
</template>
@@ -29,7 +30,7 @@ import * as api from './api'
// 弹窗是否显示
const drawer = ref(false)
// 当前选择的菜单信息
const selectOptions = ref({name:null})
const selectOptions:any = ref({name:null})
//抽屉关闭确认
const handleClose = (done: () => void) => {

View File

@@ -3,8 +3,7 @@ import { dict, PageQuery, AddReq, DelReq, EditReq, CrudExpose, CrudOptions } fro
import { dictionary } from '/@/utils/dictionary';
import { eIconPicker, eIcon } from 'e-icon-picker';
import { useCompute } from '@fast-crud/fast-crud';
import { inject } from 'vue';
import { functions } from 'lodash-es';
import { inject,computed } from 'vue';
import { apiPrefix as menuPrefix } from './api';
import XEUtils from 'xe-utils';
import { request } from '/@/utils/service';
@@ -93,10 +92,10 @@ export const createCrudOptions = function ({ crudExpose, menuButtonRef }: { crud
content: '按钮配置',
},
show: compute(({ row }: any) => {
if (row.web_path && !row.is_link) {
return true && hasPermissions();
if (row.is_catalog) {
return false;
}
return false;
return true;
}),
click: (context: any): void => {
const { row } = context;