fix: 配置参数下拉选择宽度固定

This commit is contained in:
TsMask
2023-11-06 16:38:25 +08:00
parent 5db5c50f73
commit 4e3e07f603
4 changed files with 95 additions and 248 deletions

View File

@@ -1084,11 +1084,7 @@ onMounted(() => {
<a-card :bordered="false" :body-style="{ paddingTop: '0px' }">
<!-- 插槽-卡片左侧侧 -->
<template #title>
<a-space
:size="8"
align="center"
v-if="false"
>
<a-space :size="8" align="center" v-if="false">
<a-popconfirm
placement="topLeft"
title="网元配置重新载入"
@@ -1166,6 +1162,7 @@ onMounted(() => {
v-model:value="tableState.editRecord['value']"
:min="0"
:max="65535"
style="min-width: 180px;"
></a-input-number>
<a-switch
v-else-if="record['type'] === 'bool'"
@@ -1177,6 +1174,7 @@ onMounted(() => {
v-else-if="record['type'] === 'enum'"
v-model:value="tableState.editRecord['value']"
:allow-clear="true"
style="min-width: 180px;"
>
<a-select-option
:value="+v"
@@ -1218,7 +1216,7 @@ onMounted(() => {
v-show="tableState.type === 'array'"
class="table"
row-key="index"
:columns="tableState.arrayColumns"
:columns="tab.method === 'get' ? tableState.arrayColumns.filter((s:any)=>s.key !== 'index') : tableState.arrayColumns"
:loading="tableState.loading"
:data-source="tableState.arrayData"
:size="tableState.size"
@@ -1229,7 +1227,12 @@ onMounted(() => {
v-model:expanded-row-keys="tableState.arrayChildExpandKeys"
>
<template #title>
<a-button type="primary" @click.prevent="arrayAdd" size="small">
<a-button
type="primary"
@click.prevent="arrayAdd"
size="small"
v-if="tab.method !== 'get'"
>
<template #icon> <PlusOutlined /> </template>
{{ t('common.addText') }}
</a-button>
@@ -1319,6 +1322,7 @@ onMounted(() => {
v-model:value="
tableState.editRecord[text.name]['value']
"
style="width: 100%"
></a-input>
<a-input-number
v-else-if="text['type'] === 'int'"
@@ -1327,6 +1331,7 @@ onMounted(() => {
"
:min="0"
:max="65535"
style="width: 100%"
></a-input-number>
<a-switch
v-else-if="text['type'] === 'bool'"
@@ -1340,12 +1345,12 @@ onMounted(() => {
v-else-if="text['type'] === 'enum'"
v-model:value="
tableState.editRecord[text.name]['value']
"
:allow-clear="true"
"
style="min-width: 180px;"
>
<a-select-option
:value="v"
:key="v"
:value="+v"
:key="+v"
v-for="(k, v) in JSON.parse(text['filter'])"
>
{{ k }}
@@ -1490,6 +1495,7 @@ onMounted(() => {
'value'
]
"
style="width: 100%;"
></a-input>
<a-input-number
v-else-if="text['type'] === 'int'"
@@ -1500,6 +1506,7 @@ onMounted(() => {
"
:min="0"
:max="65535"
style="width: 100%;"
></a-input-number>
<a-switch
v-else-if="text['type'] === 'bool'"
@@ -1519,10 +1526,11 @@ onMounted(() => {
]
"
:allow-clear="true"
style="min-width: 180px;"
>
<a-select-option
:value="v"
:key="v"
:value="+v"
:key="+v"
v-for="(k, v) in JSON.parse(text['filter'])"
>
{{ k }}