fix: 配置参数输入框充满

This commit is contained in:
TsMask
2023-11-06 17:28:57 +08:00
parent 33f16f6173
commit 0580fdf941
4 changed files with 203 additions and 185 deletions

View File

@@ -11,7 +11,7 @@ VITE_APP_NAME = "核心网管理平台"
VITE_APP_CODE = "CoreNet" VITE_APP_CODE = "CoreNet"
# 应用版本 # 应用版本
VITE_APP_VERSION = "1.23.0" VITE_APP_VERSION = "2.2311.7"
# 接口基础URL地址-不带/后缀 # 接口基础URL地址-不带/后缀
VITE_API_BASE_URL = "/omc-api" VITE_API_BASE_URL = "/omc-api"

View File

@@ -11,7 +11,7 @@ VITE_APP_NAME = "核心网管理平台"
VITE_APP_CODE = "CoreNet" VITE_APP_CODE = "CoreNet"
# 应用版本 # 应用版本
VITE_APP_VERSION = "1.23.1101" VITE_APP_VERSION = "2.2311.7.1106"
# 接口基础URL地址-不带/后缀 # 接口基础URL地址-不带/后缀
VITE_API_BASE_URL = "/omc-api" VITE_API_BASE_URL = "/omc-api"

View File

@@ -1148,7 +1148,6 @@ onMounted(() => {
" "
class="editable-cell__input-wrapper" class="editable-cell__input-wrapper"
> >
<a-space :size="16" align="center" direction="horizontal">
<a-input <a-input
v-if=" v-if="
['string', 'ipv6', 'ipv4', 'regex'].includes( ['string', 'ipv6', 'ipv4', 'regex'].includes(
@@ -1162,7 +1161,7 @@ onMounted(() => {
v-model:value="tableState.editRecord['value']" v-model:value="tableState.editRecord['value']"
:min="0" :min="0"
:max="65535" :max="65535"
style="min-width: 180px;" style="width: 100%"
></a-input-number> ></a-input-number>
<a-switch <a-switch
v-else-if="record['type'] === 'bool'" v-else-if="record['type'] === 'bool'"
@@ -1174,7 +1173,7 @@ onMounted(() => {
v-else-if="record['type'] === 'enum'" v-else-if="record['type'] === 'enum'"
v-model:value="tableState.editRecord['value']" v-model:value="tableState.editRecord['value']"
:allow-clear="true" :allow-clear="true"
style="min-width: 180px;" style="width: 100%"
> >
<a-select-option <a-select-option
:value="+v" :value="+v"
@@ -1185,17 +1184,26 @@ onMounted(() => {
</a-select-option> </a-select-option>
</a-select> </a-select>
<a-space :size="16" align="center">
<a-popconfirm <a-popconfirm
title="确认更新该属性值吗?" title="确认更新该属性值吗?"
placement="top" placement="top"
@confirm="listEditOk()" @confirm="listEditOk()"
> >
<CheckOutlined class="editable-cell__icon-edit" /> <a-button
type="text"
class="editable-cell__icon-edit"
>
<template #icon><CheckOutlined /></template>
</a-button>
</a-popconfirm> </a-popconfirm>
<CloseOutlined <a-button
type="text"
class="editable-cell__icon-edit" class="editable-cell__icon-edit"
@click="listEditClose()" @click="listEditClose()"
/> >
<template #icon><CloseOutlined /></template>
</a-button>
</a-space> </a-space>
</div> </div>
<div v-else class="editable-cell__text-wrapper"> <div v-else class="editable-cell__text-wrapper">
@@ -1269,18 +1277,23 @@ onMounted(() => {
placement="left" placement="left"
@confirm="arrayEditOk()" @confirm="arrayEditOk()"
> >
<CheckOutlined class="editable-cell__icon-edit" /> <a-button type="text" class="editable-cell__icon-edit">
<template #icon><CheckOutlined /></template>
</a-button>
</a-popconfirm> </a-popconfirm>
</a-tooltip> </a-tooltip>
<a-tooltip> <a-tooltip>
<template #title>取消</template> <template #title>取消</template>
<CloseOutlined <a-button
type="text"
class="editable-cell__icon-edit" class="editable-cell__icon-edit"
@click="arrayEditClose()" @click.prevent="arrayEditClose()"
/> >
<template #icon><CloseOutlined /></template>
</a-button>
</a-tooltip> </a-tooltip>
</a-space> </a-space>
<a-space :size="8" align="center" v-else> <a-space :size="16" align="center" v-else>
<a-tooltip> <a-tooltip>
<template #title>{{ t('common.editText') }}</template> <template #title>{{ t('common.editText') }}</template>
<a-button type="link" @click.prevent="arrayEdit(record)"> <a-button type="link" @click.prevent="arrayEdit(record)">
@@ -1312,7 +1325,6 @@ onMounted(() => {
" "
class="editable-cell__input-wrapper" class="editable-cell__input-wrapper"
> >
<a-space :size="16" align="center" direction="horizontal">
<a-input <a-input
v-if=" v-if="
['string', 'ipv6', 'ipv4', 'regex'].includes( ['string', 'ipv6', 'ipv4', 'regex'].includes(
@@ -1346,7 +1358,7 @@ onMounted(() => {
v-model:value=" v-model:value="
tableState.editRecord[text.name]['value'] tableState.editRecord[text.name]['value']
" "
style="min-width: 180px;" style="width: 100%"
> >
<a-select-option <a-select-option
:value="+v" :value="+v"
@@ -1356,7 +1368,6 @@ onMounted(() => {
{{ k }} {{ k }}
</a-select-option> </a-select-option>
</a-select> </a-select>
</a-space>
</div> </div>
<a-button <a-button
type="link" type="link"
@@ -1430,15 +1441,23 @@ onMounted(() => {
placement="left" placement="left"
@confirm="arrayChildEditOk()" @confirm="arrayChildEditOk()"
> >
<CheckOutlined class="editable-cell__icon-edit" /> <a-button
type="text"
class="editable-cell__icon-edit"
>
<template #icon><CheckOutlined /></template>
</a-button>
</a-popconfirm> </a-popconfirm>
</a-tooltip> </a-tooltip>
<a-tooltip> <a-tooltip>
<template #title>取消</template> <template #title>取消</template>
<CloseOutlined <a-button
type="text"
class="editable-cell__icon-edit" class="editable-cell__icon-edit"
@click="arrayChildEditClose()" @click.prevent="arrayChildEditClose()"
/> >
<template #icon><CloseOutlined /></template>
</a-button>
</a-tooltip> </a-tooltip>
</a-space> </a-space>
<a-space :size="8" align="center" v-else> <a-space :size="8" align="center" v-else>
@@ -1478,11 +1497,6 @@ onMounted(() => {
column.dataIndex column.dataIndex
" "
class="editable-cell__input-wrapper" class="editable-cell__input-wrapper"
>
<a-space
:size="16"
align="center"
direction="horizontal"
> >
<a-input <a-input
v-if=" v-if="
@@ -1495,7 +1509,7 @@ onMounted(() => {
'value' 'value'
] ]
" "
style="width: 100%;" style="width: 100%"
></a-input> ></a-input>
<a-input-number <a-input-number
v-else-if="text['type'] === 'int'" v-else-if="text['type'] === 'int'"
@@ -1506,7 +1520,7 @@ onMounted(() => {
" "
:min="0" :min="0"
:max="65535" :max="65535"
style="width: 100%;" style="width: 100%"
></a-input-number> ></a-input-number>
<a-switch <a-switch
v-else-if="text['type'] === 'bool'" v-else-if="text['type'] === 'bool'"
@@ -1526,7 +1540,7 @@ onMounted(() => {
] ]
" "
:allow-clear="true" :allow-clear="true"
style="min-width: 180px;" style="width: 100%"
> >
<a-select-option <a-select-option
:value="+v" :value="+v"
@@ -1536,7 +1550,6 @@ onMounted(() => {
{{ k }} {{ k }}
</a-select-option> </a-select-option>
</a-select> </a-select>
</a-space>
</div> </div>
<a-button <a-button
type="link" type="link"
@@ -1583,5 +1596,10 @@ onMounted(() => {
&__text-wrapper:hover &__icon { &__text-wrapper:hover &__icon {
display: inline-block; display: inline-block;
} }
&__input-wrapper {
display: flex;
justify-content: start;
align-items: center;
}
} }
</style> </style>

View File

@@ -1429,7 +1429,7 @@ let modalArrayChildState: ModalArrayChildStateType = reactive({
</a-space> </a-space>
</div> </div>
<div v-else class="editable-cell__text-wrapper"> <div v-else class="editable-cell__text-wrapper">
{{ `${text}` || '&nbsp;' }} {{ `${record.value}` || '&nbsp;' }}
<EditOutlined <EditOutlined
class="editable-cell__icon" class="editable-cell__icon"
v-if="record.access !== 'read'" v-if="record.access !== 'read'"
@@ -1490,7 +1490,6 @@ let modalArrayChildState: ModalArrayChildStateType = reactive({
" "
class="editable-cell__input-wrapper" class="editable-cell__input-wrapper"
> >
<a-space :size="16" align="center" direction="horizontal">
<a-input <a-input
v-if=" v-if="
['string', 'ipv6', 'ipv4', 'regex'].includes( ['string', 'ipv6', 'ipv4', 'regex'].includes(
@@ -1498,12 +1497,14 @@ let modalArrayChildState: ModalArrayChildStateType = reactive({
) )
" "
v-model:value="state.editRecord[item.name]['value']" v-model:value="state.editRecord[item.name]['value']"
style="width: 100%"
></a-input> ></a-input>
<a-input-number <a-input-number
v-else-if="item['type'] === 'int'" v-else-if="item['type'] === 'int'"
v-model:value="state.editRecord[item.name]['value']" v-model:value="state.editRecord[item.name]['value']"
:min="0" :min="0"
:max="65535" :max="65535"
style="width: 100%"
></a-input-number> ></a-input-number>
<a-switch <a-switch
v-else-if="item['type'] === 'bool'" v-else-if="item['type'] === 'bool'"
@@ -1525,7 +1526,6 @@ let modalArrayChildState: ModalArrayChildStateType = reactive({
{{ k }} {{ k }}
</a-select-option> </a-select-option>
</a-select> </a-select>
</a-space>
</div> </div>
<a-button <a-button
type="link" type="link"