diff --git a/web/src/views/system/menu/components/menuButton/curd.tsx b/web/src/views/system/menu/components/menuButton/crud.tsx similarity index 90% rename from web/src/views/system/menu/components/menuButton/curd.tsx rename to web/src/views/system/menu/components/menuButton/crud.tsx index 7e42c5d..50c79df 100644 --- a/web/src/views/system/menu/components/menuButton/curd.tsx +++ b/web/src/views/system/menu/components/menuButton/crud.tsx @@ -1,17 +1,23 @@ -import { CrudOptions, AddReq, DelReq, EditReq, dict, CrudExpose } from '@fast-crud/fast-crud'; +import { + CrudOptions, + AddReq, + DelReq, + EditReq, + dict, + CrudExpose, + CreateCrudOptionsRet, + CreateCrudOptionsProps, + UserPageQuery, +} from '@fast-crud/fast-crud'; import _ from 'lodash-es'; import * as api from './api'; -import { dictionary } from '/@/utils/dictionary'; - -interface CreateCrudOptionsTypes { - crudOptions: CrudOptions; -} import { request } from '/@/utils/service'; //此处为crudOptions配置 -export const createCrudOptions = function ({ crudExpose, selectOptions }: { crudExpose: CrudExpose; selectOptions: any }): CreateCrudOptionsTypes { - const pageRequest = async (query: any) => { - return await api.GetList({ menu: selectOptions.value.id } as any); +export const createCrudOptions = function ({ crudExpose, context }: CreateCrudOptionsProps): CreateCrudOptionsRet { + const pageRequest = async (query: UserPageQuery) => { + console.log(context!.selectOptions); + return await api.GetList({ menu: context!.selectOptions.value.id } as any); }; const editRequest = async ({ form, row }: EditReq) => { form.id = row.id; diff --git a/web/src/views/system/menu/components/menuButton/index.vue b/web/src/views/system/menu/components/menuButton/index.vue index b65410b..2d00e30 100644 --- a/web/src/views/system/menu/components/menuButton/index.vue +++ b/web/src/views/system/menu/components/menuButton/index.vue @@ -1,83 +1,28 @@ - - - - 当前菜单: - {{ selectOptions.name }} - - - - - - - - + + + diff --git a/web/src/views/system/menu/index.vue b/web/src/views/system/menu/index.vue index 10e4595..aa4c376 100644 --- a/web/src/views/system/menu/index.vue +++ b/web/src/views/system/menu/index.vue @@ -79,16 +79,7 @@ - - - - 全选 - - - - 其他权限 - - + @@ -104,11 +95,15 @@ + + + + + - diff --git a/web/tailwind.config.js b/web/tailwind.config.js index 8d5245a..48cde8a 100644 --- a/web/tailwind.config.js +++ b/web/tailwind.config.js @@ -2,7 +2,11 @@ module.exports = { content: ['./index.html', './src/**/*.{vue,js}'], theme: { - extend: {}, + extend: { + height: { + 'screen/2': '50vh', + }, + }, }, plugins: [], };