mirror of
https://gitee.com/fit2cloud-feizhiyun/MeterSphere.git
synced 2024-12-05 05:29:29 +08:00
fix: schema允许清除格式化选项&卡片组件去除返回
This commit is contained in:
parent
72542e9cc7
commit
be52233bc2
@ -14,7 +14,6 @@
|
||||
>
|
||||
<a-scrollbar v-if="!props.simple" :style="{ overflow: 'auto' }">
|
||||
<div class="ms-card-header" :style="props.headerMinWidth ? { minWidth: `${props.headerMinWidth}px` } : {}">
|
||||
<div v-if="!props.hideBack" class="back-btn" @click="back"><icon-arrow-left /></div>
|
||||
<slot name="headerLeft">
|
||||
<div class="font-medium text-[var(--color-text-000)]">{{ props.title }}</div>
|
||||
<div class="text-[var(--color-text-4)]">{{ props.subTitle }}</div>
|
||||
@ -56,9 +55,9 @@
|
||||
</div>
|
||||
<slot name="footerRight">
|
||||
<div class="flex justify-end gap-[16px]">
|
||||
<a-button :disabled="props.loading" type="secondary" @click="back">{{
|
||||
t('mscard.defaultCancelText')
|
||||
}}</a-button>
|
||||
<a-button :disabled="props.loading" type="secondary" @click="back">
|
||||
{{ t('mscard.defaultCancelText') }}
|
||||
</a-button>
|
||||
<a-button
|
||||
v-if="!props.hideContinue && !props.isEdit"
|
||||
:loading="props.loading"
|
||||
|
@ -252,6 +252,7 @@
|
||||
v-model:model-value="record.format"
|
||||
:options="formatOptions"
|
||||
:disabled="props.disabled"
|
||||
allow-clear
|
||||
class="ms-form-table-input"
|
||||
@change="emitChange('enumValuesInput')"
|
||||
></a-select>
|
||||
@ -460,6 +461,7 @@
|
||||
v-model:model-value="activeRecord.format"
|
||||
:placeholder="t('common.pleaseSelect')"
|
||||
:options="formatOptions"
|
||||
allow-clear
|
||||
@change="handleSettingFormChange"
|
||||
/>
|
||||
</a-form-item>
|
||||
@ -896,6 +898,11 @@
|
||||
// 没有子节点,初始化
|
||||
record.children = [];
|
||||
}
|
||||
if (record.type === 'array') {
|
||||
record.children.forEach((e, i) => {
|
||||
e.title = `${i}`;
|
||||
});
|
||||
}
|
||||
} else {
|
||||
record.children = undefined;
|
||||
}
|
||||
@ -1046,7 +1053,7 @@
|
||||
async function validRepeat(value: string, callback: (error?: string) => void) {
|
||||
if (activeRecord.value.parent) {
|
||||
(activeRecord.value.parent.children as Record<string, any>[])?.forEach((row) => {
|
||||
if (row.title.length && row.title === value) {
|
||||
if (row.title.length && row.title === value && row.id !== activeRecord.value.id) {
|
||||
callback(`${t('ms.json.schema.name')}${t('msFormTable.paramRepeatMessage')}`);
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user