mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-09-19 03:55:50 +08:00
fix(form): group-list默认展开
This commit is contained in:
parent
9716aceabf
commit
8ca6b3fbe4
@ -25,7 +25,7 @@
|
||||
@addDiffCount="onAddDiffCount()"
|
||||
></MFieldsGroupListItem>
|
||||
|
||||
<TMagicButton @click="addHandler" size="small" :disabled="disabled" v-if="addable">添加组</TMagicButton>
|
||||
<TMagicButton @click="addHandler" size="small" :disabled="disabled" v-if="addable">新增</TMagicButton>
|
||||
|
||||
<TMagicButton :icon="Grid" size="small" @click="toggleMode" v-if="config.enableToggleMode">切换为表格</TMagicButton>
|
||||
</div>
|
||||
|
@ -43,7 +43,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed, inject, ref, watchEffect } from 'vue';
|
||||
import { computed, inject, ref } from 'vue';
|
||||
import { CaretBottom, CaretRight, CaretTop, Delete } from '@element-plus/icons-vue';
|
||||
|
||||
import { TMagicButton, TMagicIcon } from '@tmagic/design';
|
||||
@ -73,11 +73,7 @@ const props = defineProps<{
|
||||
const emit = defineEmits(['swap-item', 'remove-item', 'change', 'addDiffCount']);
|
||||
|
||||
const mForm = inject<FormState | undefined>('mForm');
|
||||
const expand = ref(false);
|
||||
|
||||
watchEffect(() => {
|
||||
expand.value = props.config.expandAll || !props.index;
|
||||
});
|
||||
const expand = ref(props.config.expandAll || !props.index);
|
||||
|
||||
const rowConfig = computed(() => ({
|
||||
type: 'row',
|
||||
|
@ -122,7 +122,7 @@
|
||||
</TMagicTooltip>
|
||||
<slot></slot>
|
||||
<TMagicButton v-if="addable" size="small" type="primary" :disabled="disabled" plain @click="newHandler()"
|
||||
>添加</TMagicButton
|
||||
>新增一行</TMagicButton
|
||||
>
|
||||
|
||||
<TMagicButton
|
||||
|
Loading…
x
Reference in New Issue
Block a user