jobsys-explore 4.6.21 → 4.7.0

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 (180) hide show
  1. package/.eslintignore +3 -3
  2. package/CHANGELOG.md +542 -542
  3. package/README.md +41 -41
  4. package/TODOs.md +8 -8
  5. package/business-components/survey/ExSurvey.jsx +193 -193
  6. package/business-components/survey/index.js +5 -5
  7. package/business-components/survey/index.less +36 -36
  8. package/components/button/ExButton.jsx +120 -120
  9. package/components/button/index.js +4 -4
  10. package/components/button/index.less +7 -7
  11. package/components/decorator/ExDecorator.jsx +31 -31
  12. package/components/decorator/index.js +5 -5
  13. package/components/decorator/index.less +76 -76
  14. package/components/form/ExAddress.jsx +195 -195
  15. package/components/form/ExCascader.jsx +171 -171
  16. package/components/form/ExCheckbox.jsx +59 -59
  17. package/components/form/ExDate.jsx +143 -143
  18. package/components/form/ExDatetime.jsx +166 -166
  19. package/components/form/ExField.jsx +138 -138
  20. package/components/form/ExFieldUploader.jsx +50 -50
  21. package/components/form/ExForm.jsx +544 -544
  22. package/components/form/ExMatrixCheckbox.jsx +99 -99
  23. package/components/form/ExMatrixRadio.jsx +86 -86
  24. package/components/form/ExMatrixScale.jsx +97 -97
  25. package/components/form/ExNumber.jsx +51 -51
  26. package/components/form/ExRadio.jsx +58 -58
  27. package/components/form/ExRate.jsx +51 -51
  28. package/components/form/ExSelect.jsx +251 -251
  29. package/components/form/ExSlider.jsx +55 -55
  30. package/components/form/ExSwitch.jsx +51 -51
  31. package/components/form/ExTime.jsx +99 -99
  32. package/components/form/FormItem.jsx +307 -307
  33. package/components/form/PickerWrapper.jsx +120 -120
  34. package/components/form/index.js +46 -46
  35. package/components/form/index.less +178 -178
  36. package/components/form/utils.js +62 -62
  37. package/components/grid/ExGrid.jsx +53 -53
  38. package/components/grid/index.js +4 -4
  39. package/components/grid/index.less +2 -2
  40. package/components/index.js +12 -12
  41. package/components/pagination/ExPagination.jsx +457 -440
  42. package/components/pagination/index.js +5 -5
  43. package/components/pagination/index.less +3 -3
  44. package/components/provider/ExProvider.jsx +173 -173
  45. package/components/qrcode/ExQrcode.jsx +86 -86
  46. package/components/qrcode/index.js +5 -5
  47. package/components/qrcode/index.less +8 -8
  48. package/components/result/ExResult.jsx +122 -122
  49. package/components/result/index.js +5 -5
  50. package/components/result/index.less +59 -59
  51. package/components/search/ExSearch.jsx +370 -326
  52. package/components/search/components/Expand.jsx +77 -77
  53. package/components/search/components/Field.jsx +27 -27
  54. package/components/search/components/Quick.jsx +57 -57
  55. package/components/search/components/index.js +5 -5
  56. package/components/search/index.js +5 -5
  57. package/components/search/index.less +118 -118
  58. package/components/search/utils.js +30 -30
  59. package/components/sector/ExSector.jsx +52 -52
  60. package/components/sector/README.md +26 -26
  61. package/components/sector/index.js +5 -5
  62. package/components/sector/index.less +122 -122
  63. package/components/theme/ExTheme.jsx +10 -10
  64. package/components/theme/index.js +4 -4
  65. package/components/theme/index.less +98 -98
  66. package/components/uploader/ExUploader.jsx +293 -293
  67. package/components/uploader/index.js +5 -5
  68. package/components/utils.js +187 -187
  69. package/directives/auth.js +113 -113
  70. package/directives/index.js +4 -4
  71. package/dist/cipher-98df1050.cjs.map +1 -1
  72. package/dist/cipher-f2ed5ee6.js.map +1 -1
  73. package/dist/directives.cjs.map +1 -1
  74. package/dist/directives.js.map +1 -1
  75. package/dist/hooks.cjs.map +1 -1
  76. package/dist/hooks.js.map +1 -1
  77. package/dist/jobsys-explore.cjs +6 -6
  78. package/dist/jobsys-explore.cjs.map +1 -1
  79. package/dist/jobsys-explore.js +464 -407
  80. package/dist/jobsys-explore.js.map +1 -1
  81. package/docgen.config.js +15 -15
  82. package/docs/.vuepress/.cache/deps/_metadata.json +52 -52
  83. package/docs/.vuepress/.cache/deps/lodash-es.js +8442 -8442
  84. package/docs/.vuepress/.cache/deps/lodash-es.js.map +7 -7
  85. package/docs/.vuepress/.temp/internal/clientConfigs.js +17 -17
  86. package/docs/.vuepress/.temp/internal/pagesComponents.js +24 -24
  87. package/docs/.vuepress/.temp/internal/pagesData.js +22 -22
  88. package/docs/.vuepress/.temp/internal/pagesRoutes.js +12 -12
  89. package/docs/.vuepress/.temp/internal/themeData.js +1 -1
  90. package/docs/.vuepress/.temp/pages/components/decorator/ExDecorator.html.js +1 -1
  91. package/docs/.vuepress/.temp/pages/components/decorator/ExDecorator.html.vue +37 -37
  92. package/docs/.vuepress/.temp/pages/components/sector/ExSector.html.js +1 -1
  93. package/docs/.vuepress/.temp/pages/components/sector/ExSector.html.vue +71 -71
  94. package/docs/.vuepress/.temp/styles/index.scss +1 -1
  95. package/docs/.vuepress/config.js +61 -61
  96. package/docs/.vuepress/dist/404.html +33 -33
  97. package/docs/.vuepress/dist/assets/404.html-a0ce2184.js +1 -1
  98. package/docs/.vuepress/dist/assets/ExButton.html-ad283101.js +1 -1
  99. package/docs/.vuepress/dist/assets/ExDecorator.html-42d09114.js +1 -1
  100. package/docs/.vuepress/dist/assets/ExDecorator.html-c82c5fe8.js +1 -1
  101. package/docs/.vuepress/dist/assets/ExForm.html-9e3f8000.js +1 -1
  102. package/docs/.vuepress/dist/assets/ExProvider.html-78fdc6cd.js +1 -1
  103. package/docs/.vuepress/dist/assets/ExSearch.html-103f6f34.js +1 -1
  104. package/docs/.vuepress/dist/assets/ExSector.html-a1e24c3a.js +7 -7
  105. package/docs/.vuepress/dist/assets/ExSector.html-cff3fefd.js +1 -1
  106. package/docs/.vuepress/dist/assets/ExUploader.html-8310e424.js +1 -1
  107. package/docs/.vuepress/dist/assets/app-29fe8d1e.js +10 -10
  108. package/docs/.vuepress/dist/assets/hooks.html-90ccbc1a.js +1 -1
  109. package/docs/.vuepress/dist/assets/index.html-85b79c97.js +43 -43
  110. package/docs/.vuepress/dist/assets/style-46d7e227.css +1 -1
  111. package/docs/.vuepress/dist/components/button/ExButton.html +33 -33
  112. package/docs/.vuepress/dist/components/decorator/ExDecorator.html +33 -33
  113. package/docs/.vuepress/dist/components/form/ExForm.html +33 -33
  114. package/docs/.vuepress/dist/components/provider/ExProvider.html +33 -33
  115. package/docs/.vuepress/dist/components/search/ExSearch.html +33 -33
  116. package/docs/.vuepress/dist/components/sector/ExSector.html +39 -39
  117. package/docs/.vuepress/dist/components/uploader/ExUploader.html +33 -33
  118. package/docs/.vuepress/dist/hooks.html +33 -33
  119. package/docs/.vuepress/dist/index.html +75 -75
  120. package/docs/.vuepress/styles/index.scss +7 -7
  121. package/docs/components/decorator/ExDecorator.md +14 -14
  122. package/docs/components/sector/ExSector.md +43 -43
  123. package/docs/index.md +82 -82
  124. package/hooks/cipher.js +44 -44
  125. package/hooks/datetime.js +69 -69
  126. package/hooks/form.js +188 -188
  127. package/hooks/utils.js +282 -282
  128. package/index.html +17 -17
  129. package/package.json +1 -1
  130. package/playground/App.vue +191 -191
  131. package/playground/TestButton.vue +61 -61
  132. package/playground/TestCascader.vue +2442 -2442
  133. package/playground/TestDecorator.vue +14 -14
  134. package/playground/TestForm.vue +429 -429
  135. package/playground/TestFormItem.vue +110 -110
  136. package/playground/TestGrid.vue +22 -22
  137. package/playground/TestPagination.vue +1250 -1248
  138. package/playground/TestQrcode.vue +7 -7
  139. package/playground/TestResult.vue +12 -12
  140. package/playground/TestSearch.vue +115 -115
  141. package/playground/TestSector.vue +15 -15
  142. package/playground/TestSurvey.vue +27 -27
  143. package/playground/TestUploader.vue +14 -14
  144. package/playground/main.js +22 -22
  145. package/utils/style.js +13 -13
  146. package/vite.config.js +54 -54
  147. package/.changeset/blue-spiders-roll.md +0 -5
  148. package/.changeset/cyan-monkeys-draw.md +0 -5
  149. package/.changeset/dry-feet-float.md +0 -5
  150. package/.changeset/empty-mice-share.md +0 -5
  151. package/.changeset/famous-yaks-doubt.md +0 -5
  152. package/.changeset/five-fans-type.md +0 -5
  153. package/.changeset/funny-hats-drop.md +0 -5
  154. package/.changeset/khaki-cobras-bathe.md +0 -5
  155. package/.changeset/khaki-forks-shave.md +0 -5
  156. package/.changeset/lazy-yaks-crash.md +0 -5
  157. package/.changeset/light-cycles-flow.md +0 -5
  158. package/.changeset/loud-mirrors-explain.md +0 -5
  159. package/.changeset/lovely-balloons-protect.md +0 -5
  160. package/.changeset/mean-pens-travel.md +0 -5
  161. package/.changeset/moody-doors-grow.md +0 -5
  162. package/.changeset/moody-laws-change.md +0 -5
  163. package/.changeset/nasty-goats-joke.md +0 -5
  164. package/.changeset/odd-forks-drop.md +0 -5
  165. package/.changeset/olive-windows-suffer.md +0 -5
  166. package/.changeset/popular-carpets-jog.md +0 -5
  167. package/.changeset/popular-planets-play.md +0 -5
  168. package/.changeset/rare-gorillas-boil.md +0 -5
  169. package/.changeset/rare-moose-teach.md +0 -5
  170. package/.changeset/sharp-tools-hope.md +0 -5
  171. package/.changeset/slimy-sloths-refuse.md +0 -5
  172. package/.changeset/slow-boats-search.md +0 -5
  173. package/.changeset/small-experts-bake.md +0 -5
  174. package/.changeset/smooth-horses-tie.md +0 -5
  175. package/.changeset/tame-feet-reply.md +0 -5
  176. package/.changeset/tidy-items-reflect.md +0 -5
  177. package/.changeset/weak-chicken-admire.md +0 -5
  178. package/.changeset/weak-rockets-compare.md +0 -5
  179. package/.changeset/wild-glasses-bathe.md +0 -5
  180. package/.changeset/wise-ears-turn.md +0 -5
@@ -1,429 +1,429 @@
1
- <template>
2
- <div>
3
- <Button @click="reset">reset</Button>
4
- <ExForm
5
- cacheable="xx-create"
6
- label-width="100%"
7
- ref="form"
8
- :form="getTestForm()"
9
- title="测试表单"
10
- submit-url="/api/test/submit"
11
- :data="formData"
12
- closable
13
- :divider-props="{ contentPosition: 'left' }"
14
- :before-submit="onBeforeSubmit"
15
- :after-fetched="onAfterFetched"
16
- >
17
- <template #footer>
18
- <div style="font-size: 13px">
19
- <Checkbox v-model="checked">《活动参与协议》</Checkbox>
20
- </div>
21
- </template>
22
- </ExForm>
23
- </div>
24
- </template>
25
- <script setup>
26
- import ExForm from "../components/form/ExForm.jsx"
27
- import { Checkbox, Icon, showFailToast, Button } from "vant"
28
- import { h, ref } from "vue"
29
- import { useDayjs } from "../hooks/datetime.js"
30
-
31
- const checked = ref(false)
32
-
33
- const form = ref(null)
34
-
35
- const formData = ref({
36
- "test-input": 123123,
37
- })
38
-
39
- const reset = () => {
40
- formData.value.cascade = "zhonghuamen"
41
- formData.value.cascade_cn = "夸张"
42
- form.value.reset(formData.value)
43
- }
44
-
45
- const onBeforeSubmit = ({ formatForm }) => {
46
- console.log(formatForm)
47
- /*if (!checked.value) {
48
- showFailToast("请先同意参与协议")
49
- return false
50
- }*/
51
- return formatForm
52
- }
53
-
54
- const onAfterFetched = (res) => {
55
- return res.result
56
- }
57
-
58
- const getTestForm = () => {
59
- return [
60
- /*{
61
- key: "appointment_at",
62
- title: "预约日期",
63
- type: "date",
64
- init({ value }) {
65
- return value ? new Date(value) : null
66
- },
67
- },*/
68
- /*{
69
- title: "凭证",
70
- key: "attachment",
71
- type: "uploader",
72
- defaultProps: {
73
- accept: ".png,.jpg,.jpeg",
74
- action: "/api/v1/driver/tool/upload?private=true",
75
- type: "picture",
76
- maxSize: 10,
77
- },
78
- },*/
79
- {
80
- title: "选择",
81
- key: "test-select",
82
- type: "select",
83
- options: ["A", "B"],
84
- exProps: {
85
- filterable: true,
86
- },
87
- },
88
- ]
89
- }
90
-
91
- const getForm = () => [
92
- { key: "test-input", title: "测试" },
93
- /*{
94
- key: "uploader1",
95
- title: "上传文件",
96
- type: "uploader",
97
- defaultValue: [{ path: "xxxx.jpg" }, { path: "xxx2.jpg" }],
98
- defaultProps: {
99
- type: "text",
100
- maxNum: 2,
101
- },
102
- },*/
103
- /*{
104
- key: "matrix-radio",
105
- type: "matrix-radio",
106
- title: "矩阵单选",
107
- rows: ["质量", "外观"],
108
- options: ["很好", "一般", "很差", "很差", "很差", "很差", "很差"],
109
- //defaultValue: { 质量: "很好", 外观: "一般" },
110
- //required: true,
111
- },
112
- {
113
- key: "matrix-scale",
114
- type: "matrix-scale",
115
- title: "矩阵量表",
116
- rows: ["质量", "外观"],
117
- options: ["很好", "一般", "很差"],
118
- defaultProps: {
119
- level: 5,
120
- },
121
- //required: true,
122
- },
123
- {
124
- key: "matrix-checkbox",
125
- type: "matrix-checkbox",
126
- title: "矩阵多选",
127
- rows: ["质量", "外观"],
128
- options: ["很好", "一般", "很差"],
129
- //required: true,
130
- //defaultValue: { 质量: ["很好", "一般"] },
131
- },*/
132
- /* {
133
- key: "select",
134
- title: "选择 Select",
135
- type: "select",
136
- options: ["一", "二"],
137
- },{
138
- key: "q_rank",
139
- type: "rate",
140
- title: "咨询评价",
141
- required: true,
142
- defaultProps: {
143
- count: 10,
144
- clearable: false,
145
- },
146
- },*/
147
- /* {
148
- key: "numbe1r",
149
- title: "number",
150
- required: true,
151
- defaultProps: {
152
- min: -10,
153
- },
154
- type: "number",
155
- },*/
156
- /* {
157
- key: "match",
158
- required: true,
159
- title: "动态匹配 match",
160
- match(submitForm) {
161
- if (submitForm.text === "1") {
162
- return { type: "input" }
163
- } else {
164
- return { type: "number" }
165
- }
166
- },
167
- append() {
168
- return `aaaaaa`
169
- },
170
- }, */
171
- /*{
172
- key: "cascade",
173
- title: "级联选择器 Cascader",
174
- type: "cascade",
175
- required: false,
176
- defaultValue: "xihu",
177
- options: [
178
- {
179
- value: "zhejiang",
180
- label: "Zhejiang",
181
- children: [
182
- {
183
- value: "hangzhou",
184
- label: "Hangzhou",
185
- children: [
186
- {
187
- value: "xihu",
188
- label: "West Lake",
189
- },
190
- {
191
- value: "aaa",
192
- label: "aaaaa",
193
- },
194
- ],
195
- },
196
- ],
197
- },
198
- {
199
- value: "jiangsu",
200
- label: "Jiangsu",
201
- children: [
202
- {
203
- value: "nanjing",
204
- label: "Nanjing",
205
- children: [
206
- {
207
- value: "zhonghuamen",
208
- label: "Zhong Hua Men",
209
- },
210
- ],
211
- },
212
- ],
213
- },
214
- ],
215
-
216
- exProps: {},
217
- defaultProps: {
218
- onFinish({ value }) {
219
- console.log("value", value)
220
- },
221
- },
222
- },*/
223
- /*{
224
- key: "s_local",
225
- title: "地址",
226
- type: "address",
227
- required(submitForm) {
228
- return submitForm.text === "1"
229
- },
230
- disabled(submitForm) {
231
- return submitForm.text === "2"
232
- },
233
- hidden(submitForm) {
234
- return submitForm.text === "3"
235
- },
236
- help() {
237
- return h("div", { innerHTML: "请填写您的<br />地址请填写您的地址请填写您的地址请填写您的地址请填写您的地址" })
238
- },
239
- beforeSubmit({ submitForm }) {
240
- return submitForm.address
241
- },
242
- exProps: {
243
- textInValue: true,
244
- },
245
- init({ existingData }) {
246
- return [{ value: existingData.s_local, alias: existingData.s_local_cn }]
247
- },
248
- append() {
249
- return null
250
- },
251
- },
252
- {
253
- key: "text",
254
- title: "Text",
255
- },
256
- {
257
- key: "readonlyinput",
258
- title: "readonly",
259
- readonly: true,
260
- defaultValue() {
261
- return "老丈人"
262
- },
263
- },
264
- {
265
- key: "input",
266
- title: "输入 Input",
267
- required: true,
268
- defaultValue() {
269
- return "测试的文字"
270
- },
271
- slots: {
272
- button: () => {
273
- return h(Icon, { name: "cross" })
274
- },
275
- },
276
- },
277
- {
278
- key: "s_job_pic",
279
- title: "上传图片",
280
- type: "uploader",
281
- defaultProps: {
282
- action: "/index.php/stu/StuInfo/job_save_pic",
283
- maxNum: 3,
284
- },
285
- },
286
- {
287
- key: "uploader1",
288
- title: "上传文件",
289
- type: "uploader",
290
- defaultProps: {
291
- exUploaderProps: {
292
- type: "text",
293
- },
294
- },
295
- },
296
- {
297
- key: "members",
298
- title: "参赛选手",
299
- type: "group",
300
- columnIndex: [0, 2],
301
- children: [
302
- {
303
- title: "姓名",
304
- key: "name",
305
- },
306
- {
307
- title: "年龄",
308
- key: "age",
309
- type: "number",
310
- cellProps: {
311
- align: "center",
312
- customRender: ({ record }) => {
313
- return h("span", { style: { color: "red" } }, `${record.age}岁`)
314
- },
315
- },
316
- },
317
- {
318
- title: "性别",
319
- key: "gender",
320
- type: "select",
321
- options: [
322
- { label: "男", value: 1 },
323
- { label: "女", value: 2 },
324
- ],
325
- },
326
- ],
327
- },
328
- {
329
- key: "password",
330
- title: "密码 Password",
331
- type: "password",
332
- },
333
- {
334
- key: "textarea",
335
- title: "长文本 Textarea",
336
- type: "textarea",
337
- readonly: true,
338
- break: "一个新的行",
339
- fieldProps: {
340
- maxlength: 100,
341
- showWordLimit: true,
342
- },
343
- },
344
- {
345
- key: "html",
346
- title: "HTML",
347
- type: "html",
348
- defaultValue: "<p style='color: #ff0000; margin: 0;'>插播一条 HTML</p>",
349
- },
350
- {
351
- key: "gender",
352
- title: "性别",
353
- type: "radio",
354
- options: ["男", "女"],
355
- defaultProps: {
356
- direction: "vertical",
357
- },
358
- },
359
- {
360
- key: "checkbox",
361
- title: "多选 Checkbox",
362
- type: "Checkbox",
363
- options: ["选项1", "选项2"],
364
- defaultValue: ["选项2"],
365
- defaultProps: {
366
- direction: "horizontal",
367
- },
368
- },
369
-
370
- {
371
- key: "switch",
372
- title: "开关 switch",
373
- type: "switch",
374
- options: ["开", "关"],
375
- },
376
- {
377
- key: "s_job_start",
378
- title: "日期 Date",
379
- type: "date",
380
- init({ existingData }) {
381
- return existingData.s_job_start && existingData.s_job_start !== "0" ? new Date(existingData.s_job_start * 1000) : null
382
- //return useDayjs(existingData.s_job_start)
383
- },
384
- },
385
- {
386
- key: "datetime",
387
- title: "日期+时间 Datetime",
388
- type: "datetime",
389
- defaultProps: {
390
- calendarProps: {
391
- onSelect: (val) => {
392
- console.log(val)
393
- },
394
- },
395
- },
396
- },
397
- {
398
- key: "time",
399
- title: "时间 Time",
400
- type: "time",
401
- defaultProps: {
402
- onChange: (val) => {
403
- console.log(val)
404
- },
405
- },
406
- },
407
- {
408
- key: "remote",
409
- title: "远程检索 Remote",
410
- type: "remote",
411
- url: "https://suggest.taobao.com/sug",
412
- keyword: "q",
413
- onSearch: (res) => {
414
- return res.result.map((item) => {
415
- return {
416
- label: item[0],
417
- value: item[1],
418
- }
419
- })
420
- },
421
- },*/
422
- ]
423
- </script>
424
-
425
- <style>
426
- body {
427
- background: #f3f9f8;
428
- }
429
- </style>
1
+ <template>
2
+ <div>
3
+ <Button @click="reset">reset</Button>
4
+ <ExForm
5
+ cacheable="xx-create"
6
+ label-width="100%"
7
+ ref="form"
8
+ :form="getTestForm()"
9
+ title="测试表单"
10
+ submit-url="/api/test/submit"
11
+ :data="formData"
12
+ closable
13
+ :divider-props="{ contentPosition: 'left' }"
14
+ :before-submit="onBeforeSubmit"
15
+ :after-fetched="onAfterFetched"
16
+ >
17
+ <template #footer>
18
+ <div style="font-size: 13px">
19
+ <Checkbox v-model="checked">《活动参与协议》</Checkbox>
20
+ </div>
21
+ </template>
22
+ </ExForm>
23
+ </div>
24
+ </template>
25
+ <script setup>
26
+ import ExForm from "../components/form/ExForm.jsx"
27
+ import { Checkbox, Icon, showFailToast, Button } from "vant"
28
+ import { h, ref } from "vue"
29
+ import { useDayjs } from "../hooks/datetime.js"
30
+
31
+ const checked = ref(false)
32
+
33
+ const form = ref(null)
34
+
35
+ const formData = ref({
36
+ "test-input": 123123,
37
+ })
38
+
39
+ const reset = () => {
40
+ formData.value.cascade = "zhonghuamen"
41
+ formData.value.cascade_cn = "夸张"
42
+ form.value.reset(formData.value)
43
+ }
44
+
45
+ const onBeforeSubmit = ({ formatForm }) => {
46
+ console.log(formatForm)
47
+ /*if (!checked.value) {
48
+ showFailToast("请先同意参与协议")
49
+ return false
50
+ }*/
51
+ return formatForm
52
+ }
53
+
54
+ const onAfterFetched = (res) => {
55
+ return res.result
56
+ }
57
+
58
+ const getTestForm = () => {
59
+ return [
60
+ /*{
61
+ key: "appointment_at",
62
+ title: "预约日期",
63
+ type: "date",
64
+ init({ value }) {
65
+ return value ? new Date(value) : null
66
+ },
67
+ },*/
68
+ /*{
69
+ title: "凭证",
70
+ key: "attachment",
71
+ type: "uploader",
72
+ defaultProps: {
73
+ accept: ".png,.jpg,.jpeg",
74
+ action: "/api/v1/driver/tool/upload?private=true",
75
+ type: "picture",
76
+ maxSize: 10,
77
+ },
78
+ },*/
79
+ {
80
+ title: "选择",
81
+ key: "test-select",
82
+ type: "select",
83
+ options: ["A", "B"],
84
+ exProps: {
85
+ filterable: true,
86
+ },
87
+ },
88
+ ]
89
+ }
90
+
91
+ const getForm = () => [
92
+ { key: "test-input", title: "测试" },
93
+ /*{
94
+ key: "uploader1",
95
+ title: "上传文件",
96
+ type: "uploader",
97
+ defaultValue: [{ path: "xxxx.jpg" }, { path: "xxx2.jpg" }],
98
+ defaultProps: {
99
+ type: "text",
100
+ maxNum: 2,
101
+ },
102
+ },*/
103
+ /*{
104
+ key: "matrix-radio",
105
+ type: "matrix-radio",
106
+ title: "矩阵单选",
107
+ rows: ["质量", "外观"],
108
+ options: ["很好", "一般", "很差", "很差", "很差", "很差", "很差"],
109
+ //defaultValue: { 质量: "很好", 外观: "一般" },
110
+ //required: true,
111
+ },
112
+ {
113
+ key: "matrix-scale",
114
+ type: "matrix-scale",
115
+ title: "矩阵量表",
116
+ rows: ["质量", "外观"],
117
+ options: ["很好", "一般", "很差"],
118
+ defaultProps: {
119
+ level: 5,
120
+ },
121
+ //required: true,
122
+ },
123
+ {
124
+ key: "matrix-checkbox",
125
+ type: "matrix-checkbox",
126
+ title: "矩阵多选",
127
+ rows: ["质量", "外观"],
128
+ options: ["很好", "一般", "很差"],
129
+ //required: true,
130
+ //defaultValue: { 质量: ["很好", "一般"] },
131
+ },*/
132
+ /* {
133
+ key: "select",
134
+ title: "选择 Select",
135
+ type: "select",
136
+ options: ["一", "二"],
137
+ },{
138
+ key: "q_rank",
139
+ type: "rate",
140
+ title: "咨询评价",
141
+ required: true,
142
+ defaultProps: {
143
+ count: 10,
144
+ clearable: false,
145
+ },
146
+ },*/
147
+ /* {
148
+ key: "numbe1r",
149
+ title: "number",
150
+ required: true,
151
+ defaultProps: {
152
+ min: -10,
153
+ },
154
+ type: "number",
155
+ },*/
156
+ /* {
157
+ key: "match",
158
+ required: true,
159
+ title: "动态匹配 match",
160
+ match(submitForm) {
161
+ if (submitForm.text === "1") {
162
+ return { type: "input" }
163
+ } else {
164
+ return { type: "number" }
165
+ }
166
+ },
167
+ append() {
168
+ return `aaaaaa`
169
+ },
170
+ }, */
171
+ /*{
172
+ key: "cascade",
173
+ title: "级联选择器 Cascader",
174
+ type: "cascade",
175
+ required: false,
176
+ defaultValue: "xihu",
177
+ options: [
178
+ {
179
+ value: "zhejiang",
180
+ label: "Zhejiang",
181
+ children: [
182
+ {
183
+ value: "hangzhou",
184
+ label: "Hangzhou",
185
+ children: [
186
+ {
187
+ value: "xihu",
188
+ label: "West Lake",
189
+ },
190
+ {
191
+ value: "aaa",
192
+ label: "aaaaa",
193
+ },
194
+ ],
195
+ },
196
+ ],
197
+ },
198
+ {
199
+ value: "jiangsu",
200
+ label: "Jiangsu",
201
+ children: [
202
+ {
203
+ value: "nanjing",
204
+ label: "Nanjing",
205
+ children: [
206
+ {
207
+ value: "zhonghuamen",
208
+ label: "Zhong Hua Men",
209
+ },
210
+ ],
211
+ },
212
+ ],
213
+ },
214
+ ],
215
+
216
+ exProps: {},
217
+ defaultProps: {
218
+ onFinish({ value }) {
219
+ console.log("value", value)
220
+ },
221
+ },
222
+ },*/
223
+ /*{
224
+ key: "s_local",
225
+ title: "地址",
226
+ type: "address",
227
+ required(submitForm) {
228
+ return submitForm.text === "1"
229
+ },
230
+ disabled(submitForm) {
231
+ return submitForm.text === "2"
232
+ },
233
+ hidden(submitForm) {
234
+ return submitForm.text === "3"
235
+ },
236
+ help() {
237
+ return h("div", { innerHTML: "请填写您的<br />地址请填写您的地址请填写您的地址请填写您的地址请填写您的地址" })
238
+ },
239
+ beforeSubmit({ submitForm }) {
240
+ return submitForm.address
241
+ },
242
+ exProps: {
243
+ textInValue: true,
244
+ },
245
+ init({ existingData }) {
246
+ return [{ value: existingData.s_local, alias: existingData.s_local_cn }]
247
+ },
248
+ append() {
249
+ return null
250
+ },
251
+ },
252
+ {
253
+ key: "text",
254
+ title: "Text",
255
+ },
256
+ {
257
+ key: "readonlyinput",
258
+ title: "readonly",
259
+ readonly: true,
260
+ defaultValue() {
261
+ return "老丈人"
262
+ },
263
+ },
264
+ {
265
+ key: "input",
266
+ title: "输入 Input",
267
+ required: true,
268
+ defaultValue() {
269
+ return "测试的文字"
270
+ },
271
+ slots: {
272
+ button: () => {
273
+ return h(Icon, { name: "cross" })
274
+ },
275
+ },
276
+ },
277
+ {
278
+ key: "s_job_pic",
279
+ title: "上传图片",
280
+ type: "uploader",
281
+ defaultProps: {
282
+ action: "/index.php/stu/StuInfo/job_save_pic",
283
+ maxNum: 3,
284
+ },
285
+ },
286
+ {
287
+ key: "uploader1",
288
+ title: "上传文件",
289
+ type: "uploader",
290
+ defaultProps: {
291
+ exUploaderProps: {
292
+ type: "text",
293
+ },
294
+ },
295
+ },
296
+ {
297
+ key: "members",
298
+ title: "参赛选手",
299
+ type: "group",
300
+ columnIndex: [0, 2],
301
+ children: [
302
+ {
303
+ title: "姓名",
304
+ key: "name",
305
+ },
306
+ {
307
+ title: "年龄",
308
+ key: "age",
309
+ type: "number",
310
+ cellProps: {
311
+ align: "center",
312
+ customRender: ({ record }) => {
313
+ return h("span", { style: { color: "red" } }, `${record.age}岁`)
314
+ },
315
+ },
316
+ },
317
+ {
318
+ title: "性别",
319
+ key: "gender",
320
+ type: "select",
321
+ options: [
322
+ { label: "男", value: 1 },
323
+ { label: "女", value: 2 },
324
+ ],
325
+ },
326
+ ],
327
+ },
328
+ {
329
+ key: "password",
330
+ title: "密码 Password",
331
+ type: "password",
332
+ },
333
+ {
334
+ key: "textarea",
335
+ title: "长文本 Textarea",
336
+ type: "textarea",
337
+ readonly: true,
338
+ break: "一个新的行",
339
+ fieldProps: {
340
+ maxlength: 100,
341
+ showWordLimit: true,
342
+ },
343
+ },
344
+ {
345
+ key: "html",
346
+ title: "HTML",
347
+ type: "html",
348
+ defaultValue: "<p style='color: #ff0000; margin: 0;'>插播一条 HTML</p>",
349
+ },
350
+ {
351
+ key: "gender",
352
+ title: "性别",
353
+ type: "radio",
354
+ options: ["男", "女"],
355
+ defaultProps: {
356
+ direction: "vertical",
357
+ },
358
+ },
359
+ {
360
+ key: "checkbox",
361
+ title: "多选 Checkbox",
362
+ type: "Checkbox",
363
+ options: ["选项1", "选项2"],
364
+ defaultValue: ["选项2"],
365
+ defaultProps: {
366
+ direction: "horizontal",
367
+ },
368
+ },
369
+
370
+ {
371
+ key: "switch",
372
+ title: "开关 switch",
373
+ type: "switch",
374
+ options: ["开", "关"],
375
+ },
376
+ {
377
+ key: "s_job_start",
378
+ title: "日期 Date",
379
+ type: "date",
380
+ init({ existingData }) {
381
+ return existingData.s_job_start && existingData.s_job_start !== "0" ? new Date(existingData.s_job_start * 1000) : null
382
+ //return useDayjs(existingData.s_job_start)
383
+ },
384
+ },
385
+ {
386
+ key: "datetime",
387
+ title: "日期+时间 Datetime",
388
+ type: "datetime",
389
+ defaultProps: {
390
+ calendarProps: {
391
+ onSelect: (val) => {
392
+ console.log(val)
393
+ },
394
+ },
395
+ },
396
+ },
397
+ {
398
+ key: "time",
399
+ title: "时间 Time",
400
+ type: "time",
401
+ defaultProps: {
402
+ onChange: (val) => {
403
+ console.log(val)
404
+ },
405
+ },
406
+ },
407
+ {
408
+ key: "remote",
409
+ title: "远程检索 Remote",
410
+ type: "remote",
411
+ url: "https://suggest.taobao.com/sug",
412
+ keyword: "q",
413
+ onSearch: (res) => {
414
+ return res.result.map((item) => {
415
+ return {
416
+ label: item[0],
417
+ value: item[1],
418
+ }
419
+ })
420
+ },
421
+ },*/
422
+ ]
423
+ </script>
424
+
425
+ <style>
426
+ body {
427
+ background: #f3f9f8;
428
+ }
429
+ </style>