cnhis-design-vue 3.1.17-beta.8 → 3.1.17-beta.9

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.
@@ -1,7 +1,8 @@
1
- import { defineComponent, ref, computed, onMounted, createVNode, mergeProps } from 'vue';
1
+ import { defineComponent, computed, createVNode, mergeProps } from 'vue';
2
2
  import { generateTimeFormat } from '../../../../../src/utils';
3
3
  import { isFunction } from 'lodash-es';
4
4
  import { NDatePicker } from 'naive-ui';
5
+ import { useCommon } from './useCommon.js';
5
6
 
6
7
  var EditDate = defineComponent({
7
8
  name: "EditDate",
@@ -28,8 +29,10 @@ var EditDate = defineComponent({
28
29
  attrs,
29
30
  emit
30
31
  }) {
31
- const dateRef = ref(null);
32
- const isShow = ref(false);
32
+ const {
33
+ formRef,
34
+ isShow
35
+ } = useCommon(props, attrs);
33
36
  const onConfirm = (value) => {
34
37
  emit("formChange", {
35
38
  value,
@@ -126,15 +129,8 @@ var EditDate = defineComponent({
126
129
  if (config.type.includes("time")) {
127
130
  config.isTimeDisabled = customDateDisabledDecorator(props.col.isTimeDisabled) || isTimeDisabled;
128
131
  }
129
- onMounted(() => {
130
- var _a;
131
- if (attrs.editTrigger !== "manual") {
132
- (_a = dateRef.value) == null ? void 0 : _a.focus();
133
- isShow.value = true;
134
- }
135
- });
136
132
  return () => createVNode(NDatePicker, mergeProps({
137
- "ref": dateRef,
133
+ "ref": formRef,
138
134
  "show": isShow.value,
139
135
  "onUpdate:show": ($event) => isShow.value = $event
140
136
  }, attrs, config, {
@@ -1,5 +1,6 @@
1
- import { defineComponent, ref, onMounted, createVNode, mergeProps } from 'vue';
1
+ import { defineComponent, ref, createVNode, mergeProps } from 'vue';
2
2
  import { NInput, NInputNumber } from 'naive-ui';
3
+ import { useCommon } from './useCommon.js';
3
4
 
4
5
  var EditInput = defineComponent({
5
6
  name: "EditInput",
@@ -31,8 +32,10 @@ var EditInput = defineComponent({
31
32
  attrs,
32
33
  emit
33
34
  }) {
35
+ const {
36
+ formRef
37
+ } = useCommon(props, attrs);
34
38
  const __value = ref(attrs.value);
35
- const inputRef = ref(null);
36
39
  const onUpdateValue = (value) => {
37
40
  emit("formChange", {
38
41
  value,
@@ -53,20 +56,14 @@ var EditInput = defineComponent({
53
56
  placeholder: props.col.placeholder || "\u8BF7\u8F93\u5165",
54
57
  ...props.col.componentProps || {}
55
58
  };
56
- onMounted(() => {
57
- var _a;
58
- if (attrs.editTrigger !== "manual") {
59
- (_a = inputRef.value) == null ? void 0 : _a.focus();
60
- }
61
- });
62
59
  return () => props.type === "input" ? createVNode(NInput, mergeProps({
63
- "ref": inputRef
60
+ "ref": formRef
64
61
  }, attrs, config, {
65
62
  "value": __value.value,
66
63
  "onUpdate:value": ($event) => __value.value = $event,
67
64
  "onBlur": onBlur
68
65
  }), null) : createVNode(NInputNumber, mergeProps({
69
- "ref": inputRef
66
+ "ref": formRef
70
67
  }, attrs, config, {
71
68
  "onUpdateValue": onUpdateValue
72
69
  }), null);
@@ -1,6 +1,7 @@
1
- import { defineComponent, ref, reactive, onMounted, createVNode, mergeProps } from 'vue';
1
+ import { defineComponent, reactive, createVNode, mergeProps } from 'vue';
2
2
  import { NSelect } from 'naive-ui';
3
3
  import vexutils from '../../../../../src/utils/vexutils';
4
+ import { useCommon } from './useCommon.js';
4
5
 
5
6
  var EditSelect = defineComponent({
6
7
  name: "EditSelect",
@@ -28,8 +29,10 @@ var EditSelect = defineComponent({
28
29
  slots,
29
30
  emit
30
31
  }) {
31
- const selectRef = ref(null);
32
- const isShow = ref(false);
32
+ const {
33
+ formRef,
34
+ isShow
35
+ } = useCommon(props, attrs);
33
36
  const state = reactive({
34
37
  options: [],
35
38
  loading: false,
@@ -79,13 +82,8 @@ var EditSelect = defineComponent({
79
82
  }
80
83
  };
81
84
  init();
82
- onMounted(() => {
83
- var _a;
84
- (_a = selectRef.value) == null ? void 0 : _a.focus();
85
- isShow.value = true;
86
- });
87
85
  return () => createVNode(NSelect, mergeProps({
88
- "ref": selectRef,
86
+ "ref": formRef,
89
87
  "show": isShow.value,
90
88
  "onUpdate:show": ($event) => isShow.value = $event
91
89
  }, attrs, state.config, {
@@ -1,5 +1,6 @@
1
- import { defineComponent, ref, onMounted, createVNode, mergeProps } from 'vue';
1
+ import { defineComponent, createVNode, mergeProps } from 'vue';
2
2
  import { NTimePicker } from 'naive-ui';
3
+ import { useCommon } from './useCommon.js';
3
4
 
4
5
  var editTime = defineComponent({
5
6
  name: "EditTime",
@@ -30,8 +31,10 @@ var editTime = defineComponent({
30
31
  attrs,
31
32
  emit
32
33
  }) {
33
- const timeRef = ref(null);
34
- const isShow = ref(false);
34
+ const {
35
+ formRef,
36
+ isShow
37
+ } = useCommon(props, attrs);
35
38
  const onUpdateValue = (value) => {
36
39
  emit("formChange", {
37
40
  value,
@@ -46,15 +49,8 @@ var editTime = defineComponent({
46
49
  format: props.col.valueFormat || "yyyy-MM-dd HH:mm:ss",
47
50
  ...props.col.componentProps || {}
48
51
  };
49
- onMounted(() => {
50
- var _a;
51
- if (attrs.editTrigger !== "manual") {
52
- (_a = timeRef.value) == null ? void 0 : _a.focus();
53
- isShow.value = true;
54
- }
55
- });
56
52
  return () => createVNode(NTimePicker, mergeProps({
57
- "ref": timeRef,
53
+ "ref": formRef,
58
54
  "show": isShow.value,
59
55
  "onUpdate:show": ($event) => isShow.value = $event
60
56
  }, attrs, config, {
@@ -0,0 +1,4 @@
1
+ export declare const useCommon: (props: any, attrs: any) => {
2
+ formRef: import("vue").Ref<HTMLElement | null>;
3
+ isShow: import("vue").Ref<boolean>;
4
+ };
@@ -0,0 +1,19 @@
1
+ import { ref, onMounted } from 'vue';
2
+
3
+ const useCommon = (props, attrs) => {
4
+ const formRef = ref(null);
5
+ const isShow = ref(false);
6
+ onMounted(() => {
7
+ var _a;
8
+ if (attrs.editTrigger !== "manual") {
9
+ (_a = formRef.value) == null ? void 0 : _a.focus();
10
+ isShow.value = true;
11
+ }
12
+ });
13
+ return {
14
+ formRef,
15
+ isShow
16
+ };
17
+ };
18
+
19
+ export { useCommon };
@@ -52,6 +52,9 @@ declare const ButtonPrint: SFCWithInstall<import("vue").DefineComponent<{
52
52
  default: string;
53
53
  type: StringConstructor;
54
54
  };
55
+ token: {
56
+ type: StringConstructor;
57
+ };
55
58
  }, {
56
59
  $message: import("naive-ui").MessageApi;
57
60
  printInstance: any;
@@ -107,6 +110,9 @@ declare const ButtonPrint: SFCWithInstall<import("vue").DefineComponent<{
107
110
  default: string;
108
111
  type: StringConstructor;
109
112
  };
113
+ token: {
114
+ type: StringConstructor;
115
+ };
110
116
  }>> & {
111
117
  onError?: ((...args: any[]) => any) | undefined;
112
118
  onClickoutside?: ((...args: any[]) => any) | undefined;
@@ -7356,6 +7362,9 @@ declare const ButtonPrint: SFCWithInstall<import("vue").DefineComponent<{
7356
7362
  default: string;
7357
7363
  type: StringConstructor;
7358
7364
  };
7365
+ token: {
7366
+ type: StringConstructor;
7367
+ };
7359
7368
  }>> & {
7360
7369
  onError?: ((...args: any[]) => any) | undefined;
7361
7370
  onClickoutside?: ((...args: any[]) => any) | undefined;
@@ -53,6 +53,9 @@ declare const _default: import("vue").DefineComponent<{
53
53
  default: string;
54
54
  type: StringConstructor;
55
55
  };
56
+ token: {
57
+ type: StringConstructor;
58
+ };
56
59
  }, {
57
60
  $message: import("naive-ui").MessageApi;
58
61
  printInstance: any;
@@ -111,6 +114,9 @@ declare const _default: import("vue").DefineComponent<{
111
114
  default: string;
112
115
  type: StringConstructor;
113
116
  };
117
+ token: {
118
+ type: StringConstructor;
119
+ };
114
120
  }>> & {
115
121
  onError?: ((...args: any[]) => any) | undefined;
116
122
  onClickoutside?: ((...args: any[]) => any) | undefined;
@@ -7363,6 +7369,9 @@ declare const _default: import("vue").DefineComponent<{
7363
7369
  default: string;
7364
7370
  type: StringConstructor;
7365
7371
  };
7372
+ token: {
7373
+ type: StringConstructor;
7374
+ };
7366
7375
  }>> & {
7367
7376
  onError?: ((...args: any[]) => any) | undefined;
7368
7377
  onClickoutside?: ((...args: any[]) => any) | undefined;
@@ -59,6 +59,9 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
59
59
  noDataMsg: {
60
60
  default: "\u8BF7\u9009\u4E2D\u9700\u8981\u6253\u5370\u7684\u6570\u636E",
61
61
  type: String
62
+ },
63
+ token: {
64
+ type: String
62
65
  }
63
66
  },
64
67
  emits: ["success", "error", "clickoutside"],
@@ -136,7 +139,12 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
136
139
  const getPrintParams = (index = 0) => {
137
140
  var _a;
138
141
  const params = ((_a = props.printParams) == null ? void 0 : _a.length) ? props.printParams[index] : state.printParams[index];
139
- return JSON.stringify(params);
142
+ return JSON.stringify({
143
+ ...params || {},
144
+ ...props.token ? {
145
+ token: props.token
146
+ } : {}
147
+ });
140
148
  };
141
149
  const getOnceParams = () => {
142
150
  var _a, _b;
@@ -176,22 +184,22 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
176
184
  prevFnError();
177
185
  return Promise.reject();
178
186
  }).then(() => {
187
+ const queryParams = {
188
+ formatId: state.currentFormatId,
189
+ templateId: getTemplateIdByFormatId.value
190
+ };
179
191
  if (props.strategy === "MULTI") {
180
192
  for (let i = 0; i < state.printParams.length; i++) {
181
- const queryParams = {
182
- formatId: state.currentFormatId,
183
- templateId: getTemplateIdByFormatId.value,
193
+ printInstance.printDirect({
194
+ ...queryParams,
184
195
  params: getPrintParams(i)
185
- };
186
- printInstance.printDirect(queryParams, callLocalServicesSuccessCbTmp, callLocalServicesErrorCb);
196
+ }, callLocalServicesSuccessCbTmp, callLocalServicesErrorCb);
187
197
  }
188
198
  } else {
189
- const queryParams = {
190
- formatId: state.currentFormatId,
191
- templateId: getTemplateIdByFormatId.value,
199
+ printInstance.printDirect({
200
+ ...queryParams,
192
201
  params: getOnceParams()
193
- };
194
- printInstance.printDirect(queryParams, (res) => {
202
+ }, (res) => {
195
203
  callLocalServicesSuccessCb(res, "print");
196
204
  }, callLocalServicesErrorCb);
197
205
  }
@@ -42,6 +42,7 @@ declare const FieldSet: SFCWithInstall<import("vue").DefineComponent<{
42
42
  onOnSave?: ((...args: any[]) => any) | undefined;
43
43
  onOnClose?: ((...args: any[]) => any) | undefined;
44
44
  }>>;
45
+ initFields: () => any[];
45
46
  realityFields: import("vue").ComputedRef<any[]>;
46
47
  state: {
47
48
  spinning: boolean;
@@ -87,6 +88,7 @@ declare const FieldSet: SFCWithInstall<import("vue").DefineComponent<{
87
88
  getTableFields: () => any[];
88
89
  handleFieldSave: () => void;
89
90
  onCancle: () => void;
91
+ reset: () => void;
90
92
  calculateCheck: (key: string) => boolean;
91
93
  handleAllCheck: (e: boolean, key: string) => void;
92
94
  handleFieldClick: (item: {
@@ -12,21 +12,21 @@ const _hoisted_3 = /* @__PURE__ */ createElementVNode("span", {
12
12
  const _hoisted_4 = /* @__PURE__ */ createElementVNode("span", { class: "width-large" }, "\u6240\u6709\u5B57\u6BB5", -1);
13
13
  const _hoisted_5 = { class: "width-show" };
14
14
  const _hoisted_6 = /* @__PURE__ */ createTextVNode(" \u663E\u793A ");
15
- const _hoisted_7 = { class: "width-show" };
16
- const _hoisted_8 = /* @__PURE__ */ createTextVNode(" \u6392\u5E8F ");
17
- const _hoisted_9 = /* @__PURE__ */ createElementVNode("span", { class: "width-showed" }, "\u56FA\u5B9A", -1);
18
- const _hoisted_10 = /* @__PURE__ */ createElementVNode("span", { class: "width-word" }, "\u81EA\u5B9A\u4E49\u6807\u9898", -1);
19
- const _hoisted_11 = /* @__PURE__ */ createElementVNode("span", { class: "width-showed" }, "\u5217\u5BBD", -1);
20
- const _hoisted_12 = {
15
+ const _hoisted_7 = {
21
16
  key: 0,
22
17
  class: "width-show"
23
18
  };
24
- const _hoisted_13 = /* @__PURE__ */ createTextVNode(" \u7F16\u8F91 ");
25
- const _hoisted_14 = {
19
+ const _hoisted_8 = /* @__PURE__ */ createTextVNode(" \u7F16\u8F91 ");
20
+ const _hoisted_9 = {
26
21
  key: 1,
27
22
  class: "width-show"
28
23
  };
29
- const _hoisted_15 = /* @__PURE__ */ createTextVNode(" \u5FC5\u586B ");
24
+ const _hoisted_10 = /* @__PURE__ */ createTextVNode(" \u5FC5\u586B ");
25
+ const _hoisted_11 = { class: "width-show" };
26
+ const _hoisted_12 = /* @__PURE__ */ createTextVNode(" \u6392\u5E8F ");
27
+ const _hoisted_13 = /* @__PURE__ */ createElementVNode("span", { class: "width-showed" }, "\u56FA\u5B9A", -1);
28
+ const _hoisted_14 = /* @__PURE__ */ createElementVNode("span", { class: "width-word" }, "\u81EA\u5B9A\u4E49\u6807\u9898", -1);
29
+ const _hoisted_15 = /* @__PURE__ */ createElementVNode("span", { class: "width-showed" }, "\u5217\u5BBD", -1);
30
30
  const _hoisted_16 = ["onClick"];
31
31
  const _hoisted_17 = { class: "width-show drag-icon-wrap" };
32
32
  const _hoisted_18 = /* @__PURE__ */ createElementVNode("span", {
@@ -37,24 +37,25 @@ const _hoisted_19 = /* @__PURE__ */ createElementVNode("span", null, "\u62D6\u62
37
37
  const _hoisted_20 = /* @__PURE__ */ createElementVNode("span", { style: { "width": "14px", "margin-right": "6px" } }, null, -1);
38
38
  const _hoisted_21 = { class: "width-show" };
39
39
  const _hoisted_22 = { class: "width-show" };
40
- const _hoisted_23 = { class: "width-showed" };
41
- const _hoisted_24 = { class: "width-word" };
42
- const _hoisted_25 = { class: "width-showed" };
43
- const _hoisted_26 = {
40
+ const _hoisted_23 = {
44
41
  key: 0,
45
42
  class: "width-show"
46
43
  };
47
- const _hoisted_27 = {
44
+ const _hoisted_24 = {
48
45
  key: 1,
49
46
  class: "width-show"
50
47
  };
48
+ const _hoisted_25 = { class: "width-showed" };
49
+ const _hoisted_26 = { class: "width-word" };
50
+ const _hoisted_27 = { class: "width-showed" };
51
51
  const _hoisted_28 = {
52
52
  key: 0,
53
53
  class: "check-options"
54
54
  };
55
55
  const _hoisted_29 = { class: "btn-operate" };
56
- const _hoisted_30 = /* @__PURE__ */ createTextVNode("\u53D6\u6D88");
57
- const _hoisted_31 = /* @__PURE__ */ createTextVNode("\u4FDD\u5B58");
56
+ const _hoisted_30 = /* @__PURE__ */ createTextVNode("\u6062\u590D\u9ED8\u8BA4\u8BBE\u7F6E");
57
+ const _hoisted_31 = /* @__PURE__ */ createTextVNode("\u53D6\u6D88");
58
+ const _hoisted_32 = /* @__PURE__ */ createTextVNode("\u4FDD\u5B58");
58
59
  const _sfc_main = /* @__PURE__ */ defineComponent({
59
60
  __name: "FieldSet",
60
61
  props: {
@@ -103,7 +104,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
103
104
  }
104
105
  ];
105
106
  const settingView = ref(null);
106
- const realityFields = computed(() => {
107
+ function initFields() {
107
108
  const result = props.fields ? JSON.parse(JSON.stringify(props.fields)) : [];
108
109
  Object.keys(fieldsMapping).forEach((key) => {
109
110
  result.forEach((item) => {
@@ -117,7 +118,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
117
118
  });
118
119
  });
119
120
  return result;
120
- });
121
+ }
122
+ const realityFields = computed(initFields);
121
123
  const state = reactive({
122
124
  spinning: false,
123
125
  isCustomSearch: true,
@@ -170,6 +172,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
170
172
  const onCancle = () => {
171
173
  emit("onClose");
172
174
  };
175
+ function reset() {
176
+ state.fields = initFields();
177
+ }
173
178
  const calculateCheck = (key) => {
174
179
  if (!state.fields.length)
175
180
  return false;
@@ -235,39 +240,39 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
235
240
  }, null, 8, ["checked"])) : createCommentVNode("v-if", true),
236
241
  _hoisted_6
237
242
  ]),
238
- createCommentVNode(" \u6392\u5E8F "),
239
- createElementVNode("span", _hoisted_7, [
240
- showCheckBox("sort") ? (openBlock(), createBlock(unref(NCheckbox), {
241
- key: 0,
242
- checked: calculateCheck("sort"),
243
- "onUpdate:checked": _cache[1] || (_cache[1] = ($event) => handleAllCheck($event, "sort"))
244
- }, null, 8, ["checked"])) : createCommentVNode("v-if", true),
245
- _hoisted_8
246
- ]),
247
- createCommentVNode(" \u56FA\u5B9A "),
248
- _hoisted_9,
249
- createCommentVNode(" \u81EA\u5B9A\u4E49\u6807\u9898 "),
250
- _hoisted_10,
251
- createCommentVNode(" \u5217\u5BBD "),
252
- _hoisted_11,
253
243
  createCommentVNode(" \u53EF\u7F16\u8F91 "),
254
- __props.isEdit ? (openBlock(), createElementBlock("span", _hoisted_12, [
244
+ __props.isEdit ? (openBlock(), createElementBlock("span", _hoisted_7, [
255
245
  showCheckBox("editable") ? (openBlock(), createBlock(unref(NCheckbox), {
256
246
  key: 0,
257
247
  checked: calculateCheck("editable"),
258
- "onUpdate:checked": _cache[2] || (_cache[2] = ($event) => handleAllCheck($event, "editable"))
248
+ "onUpdate:checked": _cache[1] || (_cache[1] = ($event) => handleAllCheck($event, "editable"))
259
249
  }, null, 8, ["checked"])) : createCommentVNode("v-if", true),
260
- _hoisted_13
250
+ _hoisted_8
261
251
  ])) : createCommentVNode("v-if", true),
262
252
  createCommentVNode(" \u662F\u5426\u5FC5\u586B "),
263
- __props.isEdit ? (openBlock(), createElementBlock("span", _hoisted_14, [
253
+ __props.isEdit ? (openBlock(), createElementBlock("span", _hoisted_9, [
264
254
  showCheckBox("required") ? (openBlock(), createBlock(unref(NCheckbox), {
265
255
  key: 0,
266
256
  checked: calculateCheck("required"),
267
- "onUpdate:checked": _cache[3] || (_cache[3] = ($event) => handleAllCheck($event, "required"))
257
+ "onUpdate:checked": _cache[2] || (_cache[2] = ($event) => handleAllCheck($event, "required"))
258
+ }, null, 8, ["checked"])) : createCommentVNode("v-if", true),
259
+ _hoisted_10
260
+ ])) : createCommentVNode("v-if", true),
261
+ createCommentVNode(" \u6392\u5E8F "),
262
+ createElementVNode("span", _hoisted_11, [
263
+ showCheckBox("sort") ? (openBlock(), createBlock(unref(NCheckbox), {
264
+ key: 0,
265
+ checked: calculateCheck("sort"),
266
+ "onUpdate:checked": _cache[3] || (_cache[3] = ($event) => handleAllCheck($event, "sort"))
268
267
  }, null, 8, ["checked"])) : createCommentVNode("v-if", true),
269
- _hoisted_15
270
- ])) : createCommentVNode("v-if", true)
268
+ _hoisted_12
269
+ ]),
270
+ createCommentVNode(" \u56FA\u5B9A "),
271
+ _hoisted_13,
272
+ createCommentVNode(" \u81EA\u5B9A\u4E49\u6807\u9898 "),
273
+ _hoisted_14,
274
+ createCommentVNode(" \u5217\u5BBD "),
275
+ _hoisted_15
271
276
  ], 2),
272
277
  createElementVNode("div", {
273
278
  ref: "setShow",
@@ -322,8 +327,26 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
322
327
  [vShow, element.id != "0001"]
323
328
  ])
324
329
  ]),
330
+ createCommentVNode(" \u662F\u5426\u53EF\u7F16\u8F91 "),
331
+ __props.isEdit ? (openBlock(), createElementBlock("span", _hoisted_23, [
332
+ withDirectives(createVNode(unref(NCheckbox), {
333
+ checked: element.editable,
334
+ "onUpdate:checked": ($event) => element.editable = $event
335
+ }, null, 8, ["checked", "onUpdate:checked"]), [
336
+ [vShow, element.id != "0001"]
337
+ ])
338
+ ])) : createCommentVNode("v-if", true),
339
+ createCommentVNode(" \u662F\u5426\u5FC5\u586B "),
340
+ __props.isEdit ? (openBlock(), createElementBlock("span", _hoisted_24, [
341
+ withDirectives(createVNode(unref(NCheckbox), {
342
+ checked: element.required,
343
+ "onUpdate:checked": ($event) => element.required = $event
344
+ }, null, 8, ["checked", "onUpdate:checked"]), [
345
+ [vShow, element.id != "0001"]
346
+ ])
347
+ ])) : createCommentVNode("v-if", true),
325
348
  createCommentVNode(" \u56FA\u5B9A "),
326
- createElementVNode("span", _hoisted_23, [
349
+ createElementVNode("span", _hoisted_25, [
327
350
  createVNode(unref(NSelect), {
328
351
  value: element.fixedWay,
329
352
  "onUpdate:value": ($event) => element.fixedWay = $event,
@@ -332,7 +355,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
332
355
  }, null, 8, ["value", "onUpdate:value"])
333
356
  ]),
334
357
  createCommentVNode(" \u81EA\u5B9A\u4E49\u6807\u9898 "),
335
- createElementVNode("span", _hoisted_24, [
358
+ createElementVNode("span", _hoisted_26, [
336
359
  withDirectives(createVNode(unref(NInput), {
337
360
  value: element.alias,
338
361
  "onUpdate:value": ($event) => element.alias = $event,
@@ -342,31 +365,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
342
365
  ])
343
366
  ]),
344
367
  createCommentVNode(" \u5217\u5BBD "),
345
- createElementVNode("span", _hoisted_25, [
368
+ createElementVNode("span", _hoisted_27, [
346
369
  createVNode(unref(NInputNumber), {
347
370
  value: element.columnWidth,
348
371
  "onUpdate:value": ($event) => element.columnWidth = $event,
349
372
  style: { width: "120px" }
350
373
  }, null, 8, ["value", "onUpdate:value"])
351
- ]),
352
- createCommentVNode(" \u662F\u5426\u53EF\u7F16\u8F91 "),
353
- __props.isEdit ? (openBlock(), createElementBlock("span", _hoisted_26, [
354
- withDirectives(createVNode(unref(NCheckbox), {
355
- checked: element.editable,
356
- "onUpdate:checked": ($event) => element.editable = $event
357
- }, null, 8, ["checked", "onUpdate:checked"]), [
358
- [vShow, element.id != "0001"]
359
- ])
360
- ])) : createCommentVNode("v-if", true),
361
- createCommentVNode(" \u662F\u5426\u5FC5\u586B "),
362
- __props.isEdit ? (openBlock(), createElementBlock("span", _hoisted_27, [
363
- withDirectives(createVNode(unref(NCheckbox), {
364
- checked: element.required,
365
- "onUpdate:checked": ($event) => element.required = $event
366
- }, null, 8, ["checked", "onUpdate:checked"]), [
367
- [vShow, element.id != "0001"]
368
- ])
369
- ])) : createCommentVNode("v-if", true)
374
+ ])
370
375
  ], 12, _hoisted_16)
371
376
  ]),
372
377
  _: 1
@@ -378,19 +383,28 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
378
383
  renderSlot(_ctx.$slots, "footer", {}, () => [
379
384
  createVNode(unref(NButton), {
380
385
  style: { "margin-right": "8px" },
381
- onClick: onCancle
386
+ onClick: reset
382
387
  }, {
383
388
  default: withCtx(() => [
384
389
  _hoisted_30
385
390
  ]),
386
391
  _: 1
387
392
  }),
393
+ createVNode(unref(NButton), {
394
+ style: { "margin-right": "8px" },
395
+ onClick: onCancle
396
+ }, {
397
+ default: withCtx(() => [
398
+ _hoisted_31
399
+ ]),
400
+ _: 1
401
+ }),
388
402
  createVNode(unref(NButton), {
389
403
  type: "primary",
390
404
  onClick: handleFieldSave
391
405
  }, {
392
406
  default: withCtx(() => [
393
- _hoisted_31
407
+ _hoisted_32
394
408
  ]),
395
409
  _: 1
396
410
  })
@@ -66,6 +66,7 @@ declare const _default: import("vue").DefineComponent<{
66
66
  onOnSave?: ((...args: any[]) => any) | undefined;
67
67
  onOnClose?: ((...args: any[]) => any) | undefined;
68
68
  }>>;
69
+ initFields: () => any[];
69
70
  realityFields: import("vue").ComputedRef<any[]>;
70
71
  state: Istate;
71
72
  leftStyle: (ele: Ifields) => {
@@ -76,6 +77,7 @@ declare const _default: import("vue").DefineComponent<{
76
77
  getTableFields: () => any[];
77
78
  handleFieldSave: () => void;
78
79
  onCancle: () => void;
80
+ reset: () => void;
79
81
  calculateCheck: (key: string) => boolean;
80
82
  handleAllCheck: (e: boolean, key: string) => void;
81
83
  handleFieldClick: (item: Ifields) => void;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "cnhis-design-vue",
3
3
  "private": false,
4
- "version": "3.1.17-beta.8",
4
+ "version": "3.1.17-beta.9",
5
5
  "license": "ISC",
6
6
  "module": "es/packages/index.js",
7
7
  "main": "es/packages/index.js",