qsyx-element 1.0.1

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.
Files changed (83) hide show
  1. package/dist/es/Button-OBW9FK8V.js +13 -0
  2. package/dist/es/Dialog-lE9CYwyT.js +67 -0
  3. package/dist/es/Form-GllMGZ5L.js +658 -0
  4. package/dist/es/Table-BrzOxcFz.js +122 -0
  5. package/dist/es/cdn/iconfont.css +457 -0
  6. package/dist/es/cdn/luckysheet.css +1 -0
  7. package/dist/es/cdn/luckysheet.umd.js +27 -0
  8. package/dist/es/cdn/plugin.js +1 -0
  9. package/dist/es/cdn/plugins.css +10 -0
  10. package/dist/es/cdn/pluginsCss.css +1 -0
  11. package/dist/es/excelSee-DNbR9hdn.js +346 -0
  12. package/dist/es/exportExcel-rMHaYDUw.js +326 -0
  13. package/dist/es/exportWord-zS-yn0r2.js +615 -0
  14. package/dist/es/imToText-nJqaYhI_.js +38 -0
  15. package/dist/es/index.js +39 -0
  16. package/dist/es/insertExcel-BYsef8on.js +23155 -0
  17. package/dist/es/onlineExcel-DJeuDI97.js +371 -0
  18. package/dist/es/pdfSee-BJvVkNxS.js +113 -0
  19. package/dist/es/utils-DsWIZ76j.js +14 -0
  20. package/dist/es/vendor-P2JMGdqH.js +157444 -0
  21. package/dist/es/wordSee-oMFtPj-S.js +73 -0
  22. package/dist/index.css +1 -0
  23. package/dist/types/components/Button/Button.vue.d.ts +2 -0
  24. package/dist/types/components/Button/index.d.ts +13 -0
  25. package/dist/types/components/Dialog/Dialog.vue.d.ts +35 -0
  26. package/dist/types/components/Dialog/index.d.ts +60 -0
  27. package/dist/types/components/Form/Form.vue.d.ts +34 -0
  28. package/dist/types/components/Table/Table.vue.d.ts +30 -0
  29. package/dist/types/components/Table/index.d.ts +43 -0
  30. package/dist/types/components/excelSee/color.d.ts +2 -0
  31. package/dist/types/components/excelSee/excel.d.ts +7 -0
  32. package/dist/types/components/excelSee/hack.d.ts +1 -0
  33. package/dist/types/components/excelSee/index.d.ts +1 -0
  34. package/dist/types/components/excelSee/media.d.ts +2 -0
  35. package/dist/types/components/exportExcel/index.d.ts +53 -0
  36. package/dist/types/components/exportExcel/index.vue.d.ts +22 -0
  37. package/dist/types/components/exportWord/index.d.ts +86 -0
  38. package/dist/types/components/exportWord/index.vue.d.ts +37 -0
  39. package/dist/types/components/exportWordEcharts/index.d.ts +1 -0
  40. package/dist/types/components/exportWordImage/index.d.ts +1 -0
  41. package/dist/types/components/foundationComponents/qsyxCheckBox/index.d.ts +83 -0
  42. package/dist/types/components/foundationComponents/qsyxCheckBox/index.vue.d.ts +25 -0
  43. package/dist/types/components/foundationComponents/qsyxDate/index.d.ts +67 -0
  44. package/dist/types/components/foundationComponents/qsyxDate/index.vue.d.ts +23 -0
  45. package/dist/types/components/foundationComponents/qsyxDateInterval/index.d.ts +67 -0
  46. package/dist/types/components/foundationComponents/qsyxDateInterval/index.vue.d.ts +23 -0
  47. package/dist/types/components/foundationComponents/qsyxInput/index.d.ts +83 -0
  48. package/dist/types/components/foundationComponents/qsyxInput/index.vue.d.ts +25 -0
  49. package/dist/types/components/foundationComponents/qsyxInputMoney/index.d.ts +67 -0
  50. package/dist/types/components/foundationComponents/qsyxInputMoney/index.vue.d.ts +23 -0
  51. package/dist/types/components/foundationComponents/qsyxRadio/index.d.ts +83 -0
  52. package/dist/types/components/foundationComponents/qsyxRadio/index.vue.d.ts +25 -0
  53. package/dist/types/components/foundationComponents/qsyxSelect/index.d.ts +99 -0
  54. package/dist/types/components/foundationComponents/qsyxSelect/index.vue.d.ts +27 -0
  55. package/dist/types/components/foundationComponents/qsyxTextArea/index.d.ts +83 -0
  56. package/dist/types/components/foundationComponents/qsyxTextArea/index.vue.d.ts +25 -0
  57. package/dist/types/components/imToText/index.d.ts +1 -0
  58. package/dist/types/components/index.d.ts +22 -0
  59. package/dist/types/components/insertExcel/index.d.ts +39 -0
  60. package/dist/types/components/insertExcel/index.vue.d.ts +14 -0
  61. package/dist/types/components/onlineExcel/export.d.ts +2 -0
  62. package/dist/types/components/onlineExcel/index.d.ts +1 -0
  63. package/dist/types/components/onlineExcel/is.d.ts +2 -0
  64. package/dist/types/components/pdfSee/index.d.ts +1 -0
  65. package/dist/types/components/pdfSee/pdf.d.ts +1 -0
  66. package/dist/types/components/pdfSee/worker.d.ts +1 -0
  67. package/dist/types/components/utils/baseToFile.d.ts +6 -0
  68. package/dist/types/components/utils/debounceRef.d.ts +1 -0
  69. package/dist/types/components/utils/downloadFile.d.ts +2 -0
  70. package/dist/types/components/utils/exportWord.d.ts +14 -0
  71. package/dist/types/components/utils/htmlToPdf.d.ts +4 -0
  72. package/dist/types/components/utils/index.d.ts +0 -0
  73. package/dist/types/components/utils/showMsg.d.ts +2 -0
  74. package/dist/types/components/utils/test.d.ts +1 -0
  75. package/dist/types/components/utils/url.d.ts +2 -0
  76. package/dist/types/components/wordSee/docx.d.ts +7 -0
  77. package/dist/types/components/wordSee/index.d.ts +1 -0
  78. package/dist/types/core/index.d.ts +4 -0
  79. package/dist/types/utils/index.d.ts +1 -0
  80. package/dist/types/utils/install.d.ts +6 -0
  81. package/dist/umd/index.css +1 -0
  82. package/dist/umd/index.umd.cjs +668 -0
  83. package/package.json +45 -0
@@ -0,0 +1,658 @@
1
+ import { defineComponent, ref, computed, watch, openBlock, createElementBlock, createVNode, unref, normalizeStyle, withCtx, Fragment, renderList, createBlock, createTextVNode, toDisplayString, onMounted, createCommentVNode } from "vue";
2
+ import { a as ElCheckboxGroup, b as ElCheckbox, c as ElDatePicker, d as ElInput, e as ElRadioGroup, f as ElRadio, g as ElSelect, h as ElOption, i as ElForm, j as ElCol, k as ElFormItem } from "./vendor-P2JMGdqH.js";
3
+ import { w as withInstall } from "./utils-DsWIZ76j.js";
4
+ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
5
+ name: "QsyxCheckBox",
6
+ __name: "index",
7
+ props: {
8
+ valueText: {},
9
+ item: {},
10
+ items: {}
11
+ },
12
+ emits: ["changeFormValue", "changeFormItems`"],
13
+ setup(__props, { emit: __emit }) {
14
+ const emit = __emit, attr = ref([]), props = __props, newProps = computed(() => props), changeProps = () => {
15
+ if (newPerson.valueText = attr.value, emit("changeFormValue", props.item.code, attr.value), props.item.script && eval(props.item.script), props.item.dictionary) {
16
+ const t = props.item.dictionary[0].api.replace("+attr.value", attr.value), e = axios.get(t);
17
+ e && emit("changeFormItems", props.item.dictionary[0].code, e), props.item.otherData && emit("changeFormItems", props.item.dictionary[0].code, props.item.otherData);
18
+ }
19
+ if (props.item.dictionary1) {
20
+ const t = props.item.dictionary1[0].api, e = axios.get(t);
21
+ e && emit("changeFormItems", props.item.dictionary1[0].code, e), props.item.otherData && emit("changeFormItems", props.item.dictionary1[0].code, props.item.otherData);
22
+ }
23
+ };
24
+ let handler = {
25
+ get: function(t, e, o) {
26
+ if (e !== "__v_isRef")
27
+ return t[e];
28
+ },
29
+ set: function(t, e, o, n) {
30
+ return t[e] = o, !0;
31
+ }
32
+ };
33
+ var newPerson = new Proxy(newProps, handler);
34
+ return watch(() => props.valueText, () => {
35
+ attr.value = props.valueText;
36
+ }, {
37
+ immediate: !0
38
+ }), (t, e) => (openBlock(), createElementBlock("div", null, [
39
+ createVNode(unref(ElCheckboxGroup), {
40
+ modelValue: attr.value,
41
+ "onUpdate:modelValue": e[0] || (e[0] = (o) => attr.value = o),
42
+ style: normalizeStyle(props.item.style ? props.item.style : "width:100%")
43
+ }, {
44
+ default: withCtx(() => [
45
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(props.items, (o, n) => (openBlock(), createBlock(unref(ElCheckbox), {
46
+ key: n,
47
+ label: o.label,
48
+ value: o.value,
49
+ onChange: changeProps
50
+ }, null, 8, ["label", "value"]))), 128))
51
+ ]),
52
+ _: 1
53
+ }, 8, ["modelValue", "style"])
54
+ ]));
55
+ }
56
+ }), _sfc_main$7 = /* @__PURE__ */ defineComponent({
57
+ name: "QsyxDatePicker",
58
+ __name: "index",
59
+ props: {
60
+ valueText: {},
61
+ item: {}
62
+ },
63
+ emits: ["changeFormValue", "changeFormItems`"],
64
+ setup(__props, { emit: __emit }) {
65
+ const emit = __emit, attr = ref(""), props = __props, newProps = computed(() => props), changeProps = () => {
66
+ if (newPerson.valueText = attr.value, emit("changeFormValue", props.item.code, attr.value), props.item.script && eval(props.item.script), props.item.dictionary) {
67
+ const t = props.item.dictionary[0].api.replace("+attr.value", attr.value), e = axios.get(t);
68
+ e && emit("changeFormItems", e), props.item.otherData && emit("changeFormItems", props.item.dictionary[0].code, props.item.otherData);
69
+ }
70
+ if (props.item.dictionary1) {
71
+ const t = props.item.dictionary1[0].api, e = axios.get(t);
72
+ e && emit("changeFormItems", props.item.dictionary1[0].code, e), props.item.otherData && emit("changeFormItems", props.item.dictionary1[0].code, props.item.otherData);
73
+ }
74
+ };
75
+ let handler = {
76
+ get: function(t, e, o) {
77
+ if (e !== "__v_isRef")
78
+ return t[e];
79
+ },
80
+ set: function(t, e, o, n) {
81
+ return t[e] = o, !0;
82
+ }
83
+ };
84
+ var newPerson = new Proxy(newProps, handler);
85
+ return watch(() => props.valueText, () => {
86
+ attr.value = props.valueText;
87
+ }, {
88
+ immediate: !0
89
+ }), (t, e) => (openBlock(), createElementBlock("div", null, [
90
+ createVNode(unref(ElDatePicker), {
91
+ modelValue: attr.value,
92
+ "onUpdate:modelValue": e[0] || (e[0] = (o) => attr.value = o),
93
+ type: props.type,
94
+ placeholder: props.type,
95
+ size: props.size ? props.size : "medium",
96
+ onChange: changeProps,
97
+ format: props.format ? props.format : "",
98
+ "value-format": props.valueFormat ? props.valueFormat : "YYYYMMDDHHmmss"
99
+ }, null, 8, ["modelValue", "type", "placeholder", "size", "format", "value-format"])
100
+ ]));
101
+ }
102
+ }), _sfc_main$6 = /* @__PURE__ */ defineComponent({
103
+ name: "QsyxDateInterval",
104
+ __name: "index",
105
+ props: {
106
+ valueText: {},
107
+ item: {}
108
+ },
109
+ emits: ["changeFormValue", "changeFormItems`"],
110
+ setup(__props, { emit: __emit }) {
111
+ const defaultTime = ref([
112
+ new Date(2e3, 0, 0, -24, 0, 0),
113
+ new Date(2e3, 0, 0, 23, 59, 59)
114
+ ]), emit = __emit, attr = ref(""), props = __props, newProps = computed(() => props), changeProps = () => {
115
+ if (newPerson.valueText = attr.value, emit("changeFormValue", props.item.code, attr.value), props.item.script && eval(props.item.script), props.item.dictionary) {
116
+ const t = props.item.dictionary[0].api.replace("+attr.value", attr.value), e = axios.get(t);
117
+ e && emit("changeFormItems", props.item.dictionary[0].code, e), props.item.otherData && emit("changeFormItems", props.item.dictionary[0].code, props.item.otherData);
118
+ }
119
+ if (props.item.dictionary1) {
120
+ const t = props.item.dictionary1[0].api, e = axios.get(t);
121
+ e && emit("changeFormItems", props.item.dictionary1[0].code, e), props.item.otherData && emit("changeFormItems", props.item.dictionary1[0].code, props.item.otherData);
122
+ }
123
+ };
124
+ let handler = {
125
+ get: function(t, e, o) {
126
+ if (e !== "__v_isRef")
127
+ return t[e];
128
+ },
129
+ set: function(t, e, o, n) {
130
+ return t[e] = o, !0;
131
+ }
132
+ };
133
+ var newPerson = new Proxy(newProps, handler);
134
+ return watch(() => props.valueText, () => {
135
+ attr.value = props.valueText;
136
+ }, {
137
+ immediate: !0
138
+ }), (t, e) => (openBlock(), createElementBlock("div", null, [
139
+ createVNode(unref(ElDatePicker), {
140
+ modelValue: attr.value,
141
+ "onUpdate:modelValue": e[0] || (e[0] = (o) => attr.value = o),
142
+ "default-time": defaultTime.value,
143
+ "range-separator": "-",
144
+ "value-format": props.valueFormat ? props.valueFormat : "YYYYMMDDHHmmss",
145
+ type: "daterange",
146
+ placeholder: "",
147
+ onChange: changeProps
148
+ }, null, 8, ["modelValue", "default-time", "value-format"])
149
+ ]));
150
+ }
151
+ }), _sfc_main$5 = /* @__PURE__ */ defineComponent({
152
+ name: "QsyxInput",
153
+ __name: "index",
154
+ props: {
155
+ valueText: {},
156
+ item: {},
157
+ form: {}
158
+ },
159
+ emits: ["changeFormValue", "changeFormItems`"],
160
+ setup(__props, { emit: __emit }) {
161
+ const emit = __emit, attr = ref(""), props = __props, newProps = computed(() => props), changeProps = () => {
162
+ if (newPerson.valueText = attr.value, emit("changeFormValue", props.item.code, attr.value), props.item.script && eval(props.item.script), props.item.dictionary) {
163
+ const t = props.item.dictionary[0].api.replace("+attr.value", attr.value), e = axios.get(t);
164
+ e && emit("changeFormItems", props.item.dictionary[0].code, e), props.item.otherData && emit("changeFormItems", props.item.dictionary[0].code, props.item.otherData);
165
+ }
166
+ if (props.item.dictionary1) {
167
+ const t = props.item.dictionary1[0].api, e = axios.get(t);
168
+ e && emit("changeFormItems", props.item.dictionary1[0].code, e), props.item.otherData && emit("changeFormItems", props.item.dictionary1[0].code, props.item.otherData);
169
+ }
170
+ };
171
+ let handler = {
172
+ get: function(t, e, o) {
173
+ if (e !== "__v_isRef")
174
+ return t[e];
175
+ },
176
+ set: function(t, e, o, n) {
177
+ return t[e] = o, !0;
178
+ }
179
+ };
180
+ var newPerson = new Proxy(newProps, handler);
181
+ return watch(() => props.valueText, () => {
182
+ attr.value = props.valueText;
183
+ }, {
184
+ immediate: !0
185
+ }), (t, e) => (openBlock(), createElementBlock("div", null, [
186
+ createVNode(unref(ElInput), {
187
+ modelValue: attr.value,
188
+ "onUpdate:modelValue": e[0] || (e[0] = (o) => attr.value = o),
189
+ placeholder: "",
190
+ onInput: changeProps
191
+ }, null, 8, ["modelValue"])
192
+ ]));
193
+ }
194
+ }), _sfc_main$4 = /* @__PURE__ */ defineComponent({
195
+ name: "QsyxInputMoney",
196
+ __name: "index",
197
+ props: {
198
+ valueText: {},
199
+ item: {}
200
+ },
201
+ emits: ["changeFormValue", "changeFormItems`"],
202
+ setup(__props, { emit: __emit }) {
203
+ const emit = __emit, attr = ref(""), props = __props, newProps = computed(() => props), changeProps = () => {
204
+ if (newPerson.valueText = attr.value, emit("changeFormValue", props.item.code, attr.value), props.item.script && eval(props.item.script), props.item.dictionary) {
205
+ const t = props.item.dictionary[0].api.replace("+attr.value", attr.value), e = axios.get(t);
206
+ e && emit("changeFormItems", props.item.dictionary[0].code, e), props.item.otherData && emit("changeFormItems", props.item.dictionary[0].code, props.item.otherData);
207
+ }
208
+ if (props.item.dictionary1) {
209
+ const t = props.item.dictionary1[0].api, e = axios.get(t);
210
+ e && emit("changeFormItems", props.item.dictionary1[0].code, e), props.item.otherData && emit("changeFormItems", props.item.dictionary1[0].code, props.item.otherData);
211
+ }
212
+ };
213
+ let handler = {
214
+ get: function(t, e, o) {
215
+ if (e !== "__v_isRef")
216
+ return t[e];
217
+ },
218
+ set: function(t, e, o, n) {
219
+ return t[e] = o, !0;
220
+ }
221
+ };
222
+ var newPerson = new Proxy(newProps, handler);
223
+ return watch(() => props.valueText, () => {
224
+ attr.value = props.valueText;
225
+ }, {
226
+ immediate: !0
227
+ }), (t, e) => (openBlock(), createElementBlock("div", null, [
228
+ createVNode(unref(ElInput), {
229
+ modelValue: attr.value,
230
+ "onUpdate:modelValue": e[0] || (e[0] = (o) => attr.value = o),
231
+ placeholder: "",
232
+ type: "number",
233
+ onInput: changeProps
234
+ }, null, 8, ["modelValue"])
235
+ ]));
236
+ }
237
+ }), _sfc_main$3 = /* @__PURE__ */ defineComponent({
238
+ name: "QsyxRadio",
239
+ __name: "index",
240
+ props: {
241
+ valueText: {},
242
+ item: {},
243
+ items: {}
244
+ },
245
+ emits: ["changeFormValue", "changeFormItems`"],
246
+ setup(__props, { emit: __emit }) {
247
+ const emit = __emit, attr = ref(""), props = __props, newProps = computed(() => props), changeProps = () => {
248
+ if (newPerson.valueText = attr.value, emit("changeFormValue", props.item.code, attr.value), props.item.script && eval(props.item.script), props.item.dictionary) {
249
+ const t = props.item.dictionary[0].api.replace("+attr.value", attr.value), e = axios.get(t);
250
+ e && emit("changeFormItems", props.item.dictionary[0].code, e), props.item.otherData && emit("changeFormItems", props.item.dictionary[0].code, props.item.otherData);
251
+ }
252
+ if (props.item.dictionary1) {
253
+ const t = props.item.dictionary1[0].api, e = axios.get(t);
254
+ e && emit("changeFormItems", props.item.dictionary1[0].code, e), props.item.otherData && emit("changeFormItems", props.item.dictionary1[0].code, props.item.otherData);
255
+ }
256
+ };
257
+ let handler = {
258
+ get: function(t, e, o) {
259
+ if (e !== "__v_isRef")
260
+ return t[e];
261
+ },
262
+ set: function(t, e, o, n) {
263
+ return t[e] = o, !0;
264
+ }
265
+ };
266
+ var newPerson = new Proxy(newProps, handler);
267
+ return watch(() => props.valueText, () => {
268
+ attr.value = props.valueText;
269
+ }, {
270
+ immediate: !0
271
+ }), (t, e) => (openBlock(), createElementBlock("div", null, [
272
+ createVNode(unref(ElRadioGroup), {
273
+ modelValue: attr.value,
274
+ "onUpdate:modelValue": e[0] || (e[0] = (o) => attr.value = o),
275
+ onChange: changeProps
276
+ }, {
277
+ default: withCtx(() => [
278
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(props.items, (o, n) => (openBlock(), createBlock(unref(ElRadio), {
279
+ key: n,
280
+ value: o.value
281
+ }, {
282
+ default: withCtx(() => [
283
+ createTextVNode(toDisplayString(o.label), 1)
284
+ ]),
285
+ _: 2
286
+ }, 1032, ["value"]))), 128))
287
+ ]),
288
+ _: 1
289
+ }, 8, ["modelValue"])
290
+ ]));
291
+ }
292
+ }), _sfc_main$2 = /* @__PURE__ */ defineComponent({
293
+ name: "QsyxSelect",
294
+ __name: "index",
295
+ props: {
296
+ valueText: {},
297
+ item: {},
298
+ items: {},
299
+ style1: {}
300
+ },
301
+ emits: ["changeFormValue", "changeFormItems"],
302
+ setup(__props, { emit: __emit }) {
303
+ const emit = __emit, attr = ref(""), props = __props, newProps = computed(() => props), valueToLabel = (t) => {
304
+ let e = "";
305
+ if (props.items && props.items.length)
306
+ for (let o = 0; o < props.items.length; o++)
307
+ props.items[o].value === t && (e = props.items[o].label);
308
+ return e;
309
+ }, changeProps = () => {
310
+ if (newPerson.valueText = attr.value, emit("changeFormValue", props.item.code, attr.value), emit("changeFormValue", props.item.code + "Label", valueToLabel(attr.value)), props.item.script && eval(props.item.script), props.item.dictionary) {
311
+ const t = props.item.dictionary[0].api.replace("+attr.value", attr.value), e = axios.get(t);
312
+ e && emit("changeFormItems", props.item.dictionary[0].code, e), props.item.otherData && emit("changeFormItems", props.item.dictionary[0].code, props.item.otherData);
313
+ }
314
+ if (props.item.dictionary1) {
315
+ const t = props.item.dictionary1[0].api, e = axios.get(t);
316
+ e && emit("changeFormItems", props.item.dictionary1[0].code, e), props.item.otherData && emit("changeFormItems", props.item.dictionary1[0].code, props.item.otherData);
317
+ }
318
+ };
319
+ let handler = {
320
+ get: function(t, e, o) {
321
+ if (e !== "__v_isRef")
322
+ return t[e];
323
+ },
324
+ set: function(t, e, o, n) {
325
+ return t[e] = o, !0;
326
+ }
327
+ };
328
+ var newPerson = new Proxy(newProps, handler);
329
+ return watch(() => props.valueText, () => {
330
+ attr.value = props.valueText;
331
+ }, {
332
+ immediate: !0
333
+ }), (t, e) => (openBlock(), createElementBlock("div", null, [
334
+ createVNode(unref(ElSelect), {
335
+ modelValue: attr.value,
336
+ "onUpdate:modelValue": e[0] || (e[0] = (o) => attr.value = o),
337
+ onChange: changeProps,
338
+ style: normalizeStyle(props.style1 ? props.style1 : ""),
339
+ class: "width"
340
+ }, {
341
+ default: withCtx(() => [
342
+ props.items ? (openBlock(!0), createElementBlock(Fragment, { key: 0 }, renderList(props.items, (o, n) => (openBlock(), createBlock(unref(ElOption), {
343
+ key: n,
344
+ value: o.value,
345
+ label: o.label
346
+ }, null, 8, ["value", "label"]))), 128)) : (openBlock(!0), createElementBlock(Fragment, { key: 1 }, renderList(props.items, (o, n) => (openBlock(), createBlock(unref(ElOption), {
347
+ key: n,
348
+ value: o.value,
349
+ label: o.label
350
+ }, null, 8, ["value", "label"]))), 128))
351
+ ]),
352
+ _: 1
353
+ }, 8, ["modelValue", "style"])
354
+ ]));
355
+ }
356
+ }), _export_sfc = (t, e) => {
357
+ const o = t.__vccOpts || t;
358
+ for (const [n, m] of e)
359
+ o[n] = m;
360
+ return o;
361
+ }, QsyxSelect = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-54e0f337"]]), _sfc_main$1 = /* @__PURE__ */ defineComponent({
362
+ name: "QsyxTextarea",
363
+ __name: "index",
364
+ props: {
365
+ valueText: {},
366
+ item: {},
367
+ style1: {}
368
+ },
369
+ emits: ["changeFormValue", "changeFormItems`"],
370
+ setup(__props, { emit: __emit }) {
371
+ const emit = __emit, attr = ref(""), props = __props, newProps = computed(() => props), changeProps = () => {
372
+ if (newPerson.valueText = attr.value, emit("changeFormValue", props.item.code, attr.value), props.item.script && eval(props.item.script), props.item.dictionary) {
373
+ const t = props.item.dictionary[0].api.replace("+attr.value", attr.value), e = axios.get(t);
374
+ e && emit("changeFormItems", props.item.dictionary[0].code, e), props.item.otherData && emit("changeFormItems", props.item.dictionary[0].code, props.item.otherData);
375
+ }
376
+ if (props.item.dictionary1) {
377
+ const t = props.item.dictionary1[0].api, e = axios.get(t);
378
+ e && emit("changeFormItems", props.item.dictionary1[0].code, e), props.item.otherData && emit("changeFormItems", props.item.dictionary1[0].code, props.item.otherData);
379
+ }
380
+ };
381
+ let handler = {
382
+ get: function(t, e, o) {
383
+ if (e !== "__v_isRef")
384
+ return t[e];
385
+ },
386
+ set: function(t, e, o, n) {
387
+ return t[e] = o, !0;
388
+ }
389
+ };
390
+ var newPerson = new Proxy(newProps, handler);
391
+ return watch(() => props.valueText, () => {
392
+ attr.value = props.valueText;
393
+ }, {
394
+ immediate: !0
395
+ }), (t, e) => (openBlock(), createElementBlock("div", null, [
396
+ createVNode(unref(ElInput), {
397
+ modelValue: attr.value,
398
+ "onUpdate:modelValue": e[0] || (e[0] = (o) => attr.value = o),
399
+ maxlength: props.maxLength ? props.maxLength : "100",
400
+ resize: "none",
401
+ "show-word-limit": "",
402
+ type: "textarea",
403
+ placeholder: "",
404
+ onInput: changeProps,
405
+ style: normalizeStyle(props.style1 ? props.style1 : "width:100%")
406
+ }, null, 8, ["modelValue", "maxlength", "style"])
407
+ ]));
408
+ }
409
+ }), _sfc_main = /* @__PURE__ */ defineComponent({
410
+ name: "QsyxForm",
411
+ __name: "Form",
412
+ props: {
413
+ form: {},
414
+ item: {}
415
+ },
416
+ emits: ["changeFormValue"],
417
+ setup(t, { expose: e, emit: o }) {
418
+ const n = ref(), m = async () => {
419
+ let a = ref(!0);
420
+ if (n.value)
421
+ return await n.value.validate((i) => {
422
+ i ? (console.log("submit!"), a.value = !0) : (console.log("error submit!"), a.value = !1);
423
+ }), a.value;
424
+ }, f = o, s = t;
425
+ computed(() => s), watch(() => s.form, () => {
426
+ c = s.form;
427
+ }), ref(""), ref("");
428
+ let h = {
429
+ get: function(a, i, r) {
430
+ if (i !== "__v_isRef")
431
+ return a[i];
432
+ },
433
+ set: function(a, i, r, d) {
434
+ return a[i] = r, !0;
435
+ }
436
+ };
437
+ var c = new Proxy(s.form, h);
438
+ const p = (a, i) => {
439
+ c.data[a] = i, f("changeFormValue", a, i);
440
+ }, u = (a, i) => {
441
+ if (i)
442
+ for (let r = 0; r < c.items.length; r++)
443
+ c.items[r].code === a && (c.items[r].items = i);
444
+ };
445
+ return e({
446
+ valid: m
447
+ }), onMounted(() => {
448
+ }), (a, i) => (openBlock(), createElementBlock("div", null, [
449
+ createVNode(unref(ElForm), {
450
+ inline: !0,
451
+ class: "flex",
452
+ model: s.form.data,
453
+ ref_key: "formRef",
454
+ ref: n
455
+ }, {
456
+ default: withCtx(() => [
457
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(s.form.items, (r, d) => (openBlock(), createElementBlock(Fragment, { key: d }, [
458
+ r.type === "text" ? (openBlock(), createBlock(unref(ElCol), {
459
+ key: 0,
460
+ span: 8
461
+ }, {
462
+ default: withCtx(() => [
463
+ createVNode(unref(ElFormItem), {
464
+ "label-width": "120px",
465
+ label: r.label,
466
+ prop: r.code,
467
+ rules: r.rules
468
+ }, {
469
+ default: withCtx(() => [
470
+ createVNode(_sfc_main$5, {
471
+ valueText: a.form.data[r.code],
472
+ "onUpdate:valueText": (l) => a.form.data[r.code] = l,
473
+ form: s.form,
474
+ item: r,
475
+ onChangeFormValue: p,
476
+ onChangeFormItems: u
477
+ }, null, 8, ["valueText", "onUpdate:valueText", "form", "item"])
478
+ ]),
479
+ _: 2
480
+ }, 1032, ["label", "prop", "rules"])
481
+ ]),
482
+ _: 2
483
+ }, 1024)) : createCommentVNode("", !0),
484
+ r.type === "textarea" ? (openBlock(), createBlock(unref(ElCol), {
485
+ key: 1,
486
+ span: 24,
487
+ style: { width: "100%" }
488
+ }, {
489
+ default: withCtx(() => [
490
+ createVNode(unref(ElFormItem), {
491
+ "label-width": "120px",
492
+ label: r.label,
493
+ prop: r.code,
494
+ rules: r.rules,
495
+ style: { width: "100%" }
496
+ }, {
497
+ default: withCtx(() => [
498
+ createVNode(_sfc_main$1, {
499
+ valueText: a.form.data[r.code],
500
+ "onUpdate:valueText": (l) => a.form.data[r.code] = l,
501
+ form: s.form,
502
+ item: r,
503
+ onChangeFormValue: p,
504
+ style: { width: "100%" },
505
+ style1: r.style
506
+ }, null, 8, ["valueText", "onUpdate:valueText", "form", "item", "style1"])
507
+ ]),
508
+ _: 2
509
+ }, 1032, ["label", "prop", "rules"])
510
+ ]),
511
+ _: 2
512
+ }, 1024)) : createCommentVNode("", !0),
513
+ r.type === "checkBox" ? (openBlock(), createBlock(unref(ElCol), {
514
+ key: 2,
515
+ span: 24
516
+ }, {
517
+ default: withCtx(() => [
518
+ createVNode(unref(ElFormItem), {
519
+ "label-width": "120px",
520
+ label: r.label,
521
+ prop: r.code,
522
+ rules: r.rules
523
+ }, {
524
+ default: withCtx(() => [
525
+ createVNode(_sfc_main$8, {
526
+ valueText: a.form.data[r.code],
527
+ "onUpdate:valueText": (l) => a.form.data[r.code] = l,
528
+ item: r,
529
+ onChangeFormValue: p,
530
+ items: r.items
531
+ }, null, 8, ["valueText", "onUpdate:valueText", "item", "items"])
532
+ ]),
533
+ _: 2
534
+ }, 1032, ["label", "prop", "rules"])
535
+ ]),
536
+ _: 2
537
+ }, 1024)) : createCommentVNode("", !0),
538
+ r.type === "dateInterval" ? (openBlock(), createBlock(unref(ElCol), {
539
+ key: 3,
540
+ span: 8
541
+ }, {
542
+ default: withCtx(() => [
543
+ createVNode(unref(ElFormItem), {
544
+ "label-width": "120px",
545
+ label: r.label,
546
+ prop: r.code,
547
+ rules: r.rules
548
+ }, {
549
+ default: withCtx(() => [
550
+ createVNode(_sfc_main$6, {
551
+ valueText: a.form.data[r.code],
552
+ "onUpdate:valueText": (l) => a.form.data[r.code] = l,
553
+ item: r,
554
+ onChangeFormValue: p
555
+ }, null, 8, ["valueText", "onUpdate:valueText", "item"])
556
+ ]),
557
+ _: 2
558
+ }, 1032, ["label", "prop", "rules"])
559
+ ]),
560
+ _: 2
561
+ }, 1024)) : createCommentVNode("", !0),
562
+ r.type === "money" ? (openBlock(), createBlock(unref(ElCol), {
563
+ key: 4,
564
+ span: 8
565
+ }, {
566
+ default: withCtx(() => [
567
+ createVNode(unref(ElFormItem), {
568
+ "label-width": "120px",
569
+ label: r.label,
570
+ prop: r.code,
571
+ rules: r.rules
572
+ }, {
573
+ default: withCtx(() => [
574
+ createVNode(_sfc_main$4, {
575
+ valueText: a.form.data[r.code],
576
+ "onUpdate:valueText": (l) => a.form.data[r.code] = l,
577
+ item: r,
578
+ onChangeFormValue: p
579
+ }, null, 8, ["valueText", "onUpdate:valueText", "item"])
580
+ ]),
581
+ _: 2
582
+ }, 1032, ["label", "prop", "rules"])
583
+ ]),
584
+ _: 2
585
+ }, 1024)) : createCommentVNode("", !0),
586
+ r.type === "radio" ? (openBlock(), createBlock(unref(ElCol), {
587
+ key: 5,
588
+ span: 8
589
+ }, {
590
+ default: withCtx(() => [
591
+ createVNode(unref(ElFormItem), {
592
+ "label-width": "120px",
593
+ label: r.label,
594
+ prop: r.code,
595
+ rules: r.rules
596
+ }, {
597
+ default: withCtx(() => [
598
+ createVNode(_sfc_main$3, {
599
+ valueText: a.form.data[r.code],
600
+ "onUpdate:valueText": (l) => a.form.data[r.code] = l,
601
+ item: r,
602
+ onChangeFormValue: p,
603
+ items: r.items
604
+ }, null, 8, ["valueText", "onUpdate:valueText", "item", "items"])
605
+ ]),
606
+ _: 2
607
+ }, 1032, ["label", "prop", "rules"])
608
+ ]),
609
+ _: 2
610
+ }, 1024)) : createCommentVNode("", !0),
611
+ r.type === "select" ? (openBlock(), createBlock(unref(ElCol), {
612
+ key: 6,
613
+ span: 8
614
+ }, {
615
+ default: withCtx(() => [
616
+ createVNode(unref(ElFormItem), {
617
+ "label-width": "120px",
618
+ label: r.label,
619
+ prop: r.code,
620
+ rules: r.rules
621
+ }, {
622
+ default: withCtx(() => [
623
+ createVNode(QsyxSelect, {
624
+ valueText: a.form.data[r.code],
625
+ "onUpdate:valueText": (l) => a.form.data[r.code] = l,
626
+ item: r,
627
+ onChangeFormValue: p,
628
+ items: r.items,
629
+ style1: r.style,
630
+ onChangeFormItems: u
631
+ }, null, 8, ["valueText", "onUpdate:valueText", "item", "items", "style1"])
632
+ ]),
633
+ _: 2
634
+ }, 1032, ["label", "prop", "rules"])
635
+ ]),
636
+ _: 2
637
+ }, 1024)) : createCommentVNode("", !0)
638
+ ], 64))), 128))
639
+ ]),
640
+ _: 1
641
+ }, 8, ["model"])
642
+ ]));
643
+ }
644
+ }), Form = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-f171abf4"]]), QsyxForm = withInstall(Form);
645
+ console.log("QsyxForm", QsyxForm);
646
+ export {
647
+ Form as F,
648
+ QsyxSelect as Q,
649
+ _export_sfc as _,
650
+ _sfc_main$8 as a,
651
+ _sfc_main$7 as b,
652
+ _sfc_main$6 as c,
653
+ _sfc_main$5 as d,
654
+ _sfc_main$4 as e,
655
+ _sfc_main$3 as f,
656
+ _sfc_main$1 as g,
657
+ QsyxForm as h
658
+ };