@tmagic/form 1.3.0-alpha.6 → 1.3.0-alpha.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.3.0-alpha.6",
2
+ "version": "1.3.0-alpha.8",
3
3
  "name": "@tmagic/form",
4
4
  "type": "module",
5
5
  "sideEffects": [
@@ -36,8 +36,8 @@
36
36
  },
37
37
  "dependencies": {
38
38
  "@element-plus/icons-vue": "^2.0.9",
39
- "@tmagic/design": "1.3.0-alpha.6",
40
- "@tmagic/utils": "1.3.0-alpha.6",
39
+ "@tmagic/design": "1.3.0-alpha.8",
40
+ "@tmagic/utils": "1.3.0-alpha.8",
41
41
  "lodash-es": "^4.17.21",
42
42
  "sortablejs": "^1.14.0",
43
43
  "vue": "^3.3.4"
@@ -25,7 +25,7 @@
25
25
  @addDiffCount="onAddDiffCount()"
26
26
  ></MFieldsGroupListItem>
27
27
 
28
- <TMagicButton @click="addHandler" size="small" :disabled="disabled" v-if="addable">添加组</TMagicButton>
28
+ <TMagicButton @click="addHandler" size="small" :disabled="disabled" v-if="addable">新增</TMagicButton>
29
29
 
30
30
  <TMagicButton :icon="Grid" size="small" @click="toggleMode" v-if="config.enableToggleMode">切换为表格</TMagicButton>
31
31
  </div>
@@ -43,7 +43,7 @@
43
43
  </template>
44
44
 
45
45
  <script setup lang="ts">
46
- import { computed, inject, ref, watchEffect } from 'vue';
46
+ import { computed, inject, ref } from 'vue';
47
47
  import { CaretBottom, CaretRight, CaretTop, Delete } from '@element-plus/icons-vue';
48
48
 
49
49
  import { TMagicButton, TMagicIcon } from '@tmagic/design';
@@ -73,11 +73,7 @@ const props = defineProps<{
73
73
  const emit = defineEmits(['swap-item', 'remove-item', 'change', 'addDiffCount']);
74
74
 
75
75
  const mForm = inject<FormState | undefined>('mForm');
76
- const expand = ref(false);
77
-
78
- watchEffect(() => {
79
- expand.value = props.config.expandAll || !props.index;
80
- });
76
+ const expand = ref(props.config.expandAll || !props.index);
81
77
 
82
78
  const rowConfig = computed(() => ({
83
79
  type: 'row',
@@ -122,7 +122,7 @@
122
122
  </TMagicTooltip>
123
123
  <slot></slot>
124
124
  <TMagicButton v-if="addable" size="small" type="primary" :disabled="disabled" plain @click="newHandler()"
125
- >添加</TMagicButton
125
+ >新增一行</TMagicButton
126
126
  >
127
127
  &nbsp;
128
128
  <TMagicButton