diff --git a/frontend/src/assets/style/global.less b/frontend/src/assets/style/global.less index dbe4e94db7..dc6e6daa7d 100644 --- a/frontend/src/assets/style/global.less +++ b/frontend/src/assets/style/global.less @@ -159,11 +159,15 @@ body { color: var(--color-text-1); } .ms-params-popover-value { + @apply overflow-y-auto; + .ms-scroll-bar(); + min-width: 100px; max-width: 280px; + max-height: 300px; font-size: 12px; - line-height: 16px; color: var(--color-text-1); + line-height: 16px; } /* 表格必填按钮 button */ diff --git a/frontend/src/components/pure/ms-form-table/index.vue b/frontend/src/components/pure/ms-form-table/index.vue index b2b0d873ec..fe79f97273 100644 --- a/frontend/src/components/pure/ms-form-table/index.vue +++ b/frontend/src/components/pure/ms-form-table/index.vue @@ -229,7 +229,7 @@ import MsIcon from '@/components/pure/ms-icon-font/index.vue'; import MsBaseTable from '@/components/pure/ms-table/base-table.vue'; - import type { MsTableColumnData } from '@/components/pure/ms-table/type'; + import type { MsTableColumnData, MsTableProps } from '@/components/pure/ms-table/type'; import useTable from '@/components/pure/ms-table/useTable'; import MsTableMoreAction from '@/components/pure/ms-table-more-action/index.vue'; import MsTagsInput from '@/components/pure/ms-tags-input/index.vue'; @@ -332,7 +332,7 @@ } } - const { propsRes, propsEvent } = useTable(() => Promise.resolve([]), { + const tableProps = ref>>>({ firstColumnWidth: 32, tableKey: props.showSetting ? props.tableKey : undefined, scroll: props.scroll, @@ -346,6 +346,8 @@ showPagination: false, rowSelection: props.selectable ? undefined : props.rowSelection, }); + + const { propsRes, propsEvent } = useTable(() => Promise.resolve([]), tableProps.value); const selectedKeys = computed(() => propsRes.value.data.filter((e) => e.enable).map((e) => e.id)); propsEvent.value.rowSelectChange = (record: Record) => { propsRes.value.data = propsRes.value.data.map((e) => { diff --git a/frontend/src/components/pure/ms-json-schema/index.vue b/frontend/src/components/pure/ms-json-schema/index.vue index 4ab51b6732..e9d9f20472 100644 --- a/frontend/src/components/pure/ms-json-schema/index.vue +++ b/frontend/src/components/pure/ms-json-schema/index.vue @@ -309,6 +309,7 @@ :width="600" :title="t('ms.json.schema.advancedSettings')" :ok-text="t('common.save')" + :footer="!props.disabled" @confirm="applySetting" > @@ -606,6 +607,7 @@ width: 32, }; }); + // 初始化根节点 watchEffect(() => { if (data.value.length === 0) { diff --git a/frontend/src/views/api-test/components/requestComposition/body.vue b/frontend/src/views/api-test/components/requestComposition/body.vue index e56e675472..01612c5633 100644 --- a/frontend/src/views/api-test/components/requestComposition/body.vue +++ b/frontend/src/views/api-test/components/requestComposition/body.vue @@ -96,7 +96,7 @@ ? 'font-medium !text-[rgb(var(--primary-5))]' : '!text-[var(--color-text-4)]' " - @click="innerParams.jsonBody.enableJsonSchema = true" + @click="handleChangeJsonType('Schema')" >Schema @@ -108,7 +108,7 @@ ? 'font-medium !text-[rgb(var(--primary-5))]' : '!text-[var(--color-text-4)]' " - @click="innerParams.jsonBody.enableJsonSchema = false" + @click="handleChangeJsonType('Json')" >Json @@ -147,11 +147,12 @@ >