cnhis-design-vue 3.1.35-beta.2 → 3.1.35-beta.3

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.
@@ -16,6 +16,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
16
16
  const linebarField = useConfigurationField().generateFieldListByKeys(null, [
17
17
  EditAbleField.NAME,
18
18
  EditAbleField.LAYOUT_WIDTH_ENUM,
19
+ EditAbleField.NOTES,
19
20
  EditAbleField.DEFAULT_EXPAND,
20
21
  EditAbleField.FOLD
21
22
  ]);
@@ -60,7 +60,13 @@ function useConfigurationField() {
60
60
  const htmlMap = new Map([
61
61
  [
62
62
  "LINE_BAR",
63
- [EditAbleField.NAME, EditAbleField.LAYOUT_WIDTH_ENUM, EditAbleField.DEFAULT_EXPAND, EditAbleField.FOLD]
63
+ [
64
+ EditAbleField.NAME,
65
+ EditAbleField.LAYOUT_WIDTH_ENUM,
66
+ EditAbleField.NOTES,
67
+ EditAbleField.DEFAULT_EXPAND,
68
+ EditAbleField.FOLD
69
+ ]
64
70
  ],
65
71
  ...["NEWLINE", "COMPLEX", "COMBINATION"].map(
66
72
  (key) => [key, [EditAbleField.NAME, EditAbleField.LAYOUT_WIDTH_ENUM]]
@@ -55,7 +55,11 @@ const script = defineComponent({
55
55
  currentGroupNum.value++;
56
56
  }
57
57
  async function removeGroup(idx) {
58
- currentGroupNum.value--;
58
+ if (currentGroupNum.value > 1) {
59
+ currentGroupNum.value--;
60
+ } else {
61
+ field.value.insert(idx + 1, {});
62
+ }
59
63
  await field.value.remove(idx);
60
64
  }
61
65
  const collector = inject(InjectionBusinessCollector);
@@ -86,7 +90,7 @@ const script = defineComponent({
86
90
  }, [createVNode(RecursionField, {
87
91
  "schema": createObjSchema(schemaAdaptor(props.getProperties())),
88
92
  "name": idx
89
- }, null), idx === 0 ? null : createVNode(NButton, {
93
+ }, null), createVNode(NButton, {
90
94
  "text": true,
91
95
  "type": "error",
92
96
  "class": "form-render__combinationClose",
@@ -101,8 +101,12 @@ const script = defineComponent({
101
101
  emitChange();
102
102
  }
103
103
  function removeGroup(idx) {
104
- combinationData.value.splice(idx, 1);
105
- formRenderRefs.value.splice(idx, 1);
104
+ if (combinationData.value.length > 1) {
105
+ combinationData.value.splice(idx, 1);
106
+ formRenderRefs.value.splice(idx, 1);
107
+ } else {
108
+ combinationData.value.splice(idx, 1, {});
109
+ }
106
110
  emitChange();
107
111
  }
108
112
  const maxGroupNum = computed(() => {
@@ -155,7 +159,7 @@ const script = defineComponent({
155
159
  "ref": (_ref) => setFormRenderRef(idx, _ref),
156
160
  "fieldList": props.getProperties(),
157
161
  "onFormChange": (payload) => onChange(idx, payload)
158
- }, null), idx === 0 ? null : createVNode(NButton, {
162
+ }, null), createVNode(NButton, {
159
163
  "text": true,
160
164
  "class": "form-render__combinationClose",
161
165
  "type": "error",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cnhis-design-vue",
3
- "version": "3.1.35-beta.2",
3
+ "version": "3.1.35-beta.3",
4
4
  "license": "ISC",
5
5
  "module": "./es/components/index.js",
6
6
  "main": "./es/components/index.js",
@@ -61,5 +61,5 @@
61
61
  "iOS 7",
62
62
  "last 3 iOS versions"
63
63
  ],
64
- "gitHead": "a1be69b8ff574fb2912943cd4c04526b411f6e6a"
64
+ "gitHead": "5969382201cfb54a8e27eb2ecc418487a647e112"
65
65
  }