style(form): form-item上的hidden class容易冲突,改成tmagic-form-hidden

This commit is contained in:
roymondchen 2024-09-13 20:25:02 +08:00
parent e5a0fb7eca
commit 4ce3f3e34e
2 changed files with 7 additions and 7 deletions

View File

@ -1,8 +1,8 @@
<template>
<div
v-if="config"
:id="config.id"
:data-magic-id="config.id"
:data-tmagic-id="config.id"
:data-tmagic-form-item-prop="itemProp"
:style="config.tip ? 'display: flex;align-items: baseline;' : ''"
:class="`m-form-container m-container-${type || ''} ${config.className || ''}`"
>
@ -37,7 +37,7 @@
<template v-else-if="type && display && !showDiff">
<TMagicFormItem
:style="config.tip ? 'flex: 1' : ''"
:class="{ hidden: `${itemLabelWidth}` === '0' || !text }"
:class="{ 'tmagic-form-hidden': `${itemLabelWidth}` === '0' || !text }"
:prop="itemProp"
:label-width="itemLabelWidth"
:rules="rule"
@ -93,7 +93,7 @@
<!-- 上次内容 -->
<TMagicFormItem
:style="config.tip ? 'flex: 1' : ''"
:class="{ hidden: `${itemLabelWidth}` === '0' || !text }"
:class="{ 'tmagic-form-hidden': `${itemLabelWidth}` === '0' || !text }"
:prop="itemProp"
:label-width="itemLabelWidth"
:rules="rule"
@ -142,7 +142,7 @@
<!-- 当前内容 -->
<TMagicFormItem
:style="config.tip ? 'flex: 1' : ''"
:class="{ hidden: `${itemLabelWidth}` === '0' || !text }"
:class="{ 'tmagic-form-hidden': `${itemLabelWidth}` === '0' || !text }"
:prop="itemProp"
:label-width="itemLabelWidth"
:rules="rule"

View File

@ -29,13 +29,13 @@
margin-bottom: 10px;
}
.el-form-item.hidden {
.el-form-item.tmagic-form-hidden {
> .el-form-item__label {
display: none;
}
}
.t-form__item.hidden {
.t-form__item.tmagic-form-hidden {
> .t-form__label {
display: none;
}