diff --git a/src/api/infra/config/index.ts b/src/api/infra/config/index.ts index 5a9bee1b..c6d3772e 100644 --- a/src/api/infra/config/index.ts +++ b/src/api/infra/config/index.ts @@ -1,7 +1,7 @@ import request from '@/config/axios' export interface ConfigVO { - id: number + id: number | undefined category: string name: string key: string @@ -12,13 +12,6 @@ export interface ConfigVO { createTime: Date } -export interface ConfigPageReqVO extends PageParam { - name?: string - key?: string - type?: number - createTime?: Date[] -} - export interface ConfigExportReqVO { name?: string key?: string @@ -27,32 +20,32 @@ export interface ConfigExportReqVO { } // 查询参数列表 -export const getConfigPageApi = (params: ConfigPageReqVO) => { +export const getConfigPage = (params: PageParam) => { return request.get({ url: '/infra/config/page', params }) } // 查询参数详情 -export const getConfigApi = (id: number) => { +export const getConfig = (id: number) => { return request.get({ url: '/infra/config/get?id=' + id }) } // 根据参数键名查询参数值 -export const getConfigKeyApi = (configKey: string) => { +export const getConfigKey = (configKey: string) => { return request.get({ url: '/infra/config/get-value-by-key?key=' + configKey }) } // 新增参数 -export const createConfigApi = (data: ConfigVO) => { +export const createConfig = (data: ConfigVO) => { return request.post({ url: '/infra/config/create', data }) } // 修改参数 -export const updateConfigApi = (data: ConfigVO) => { +export const updateConfig = (data: ConfigVO) => { return request.put({ url: '/infra/config/update', data }) } // 删除参数 -export const deleteConfigApi = (id: number) => { +export const deleteConfig = (id: number) => { return request.delete({ url: '/infra/config/delete?id=' + id }) } diff --git a/src/components/Dialog/src/Dialog.vue b/src/components/Dialog/src/Dialog.vue index 98336fdf..48d5f1c3 100644 --- a/src/components/Dialog/src/Dialog.vue +++ b/src/components/Dialog/src/Dialog.vue @@ -8,8 +8,9 @@ const props = defineProps({ modelValue: propTypes.bool.def(false), title: propTypes.string.def('Dialog'), fullscreen: propTypes.bool.def(true), - maxHeight: propTypes.oneOfType([String, Number]).def('300px'), - width: propTypes.oneOfType([String, Number]).def('40%') + width: propTypes.oneOfType([String, Number]).def('40%'), + scroll: propTypes.bool.def(false), // 是否开启滚动条。如果是的话,按照 maxHeight 设置最大高度 + maxHeight: propTypes.oneOfType([String, Number]).def('300px') }) const getBindValue = computed(() => { @@ -35,6 +36,7 @@ const dialogHeight = ref(isNumber(props.maxHeight) ? `${props.maxHeight}px` : pr watch( () => isFullscreen.value, async (val: boolean) => { + // 计算最大高度 await nextTick() if (val) { const windowHeight = document.documentElement.offsetHeight @@ -80,9 +82,12 @@ const dialogStyle = computed(() => { - + + + +