icarys-fc-vant 1.0.15 → 1.0.17

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 (112) hide show
  1. package/README.md +40 -205
  2. package/dist/index.js +7590 -0
  3. package/dist/index.min.js +3 -7407
  4. package/dist/index.min.js.map +1 -0
  5. package/package.json +6 -19
  6. package/src/components/common/subform/LICENSE +21 -0
  7. package/src/components/common/subform/README.md +6 -0
  8. package/src/components/common/subform/package.json +48 -0
  9. package/src/components/common/subform/src/component.jsx +75 -0
  10. package/src/components/common/subform/src/index.js +3 -0
  11. package/src/components/common/wangeditor/LICENSE +21 -0
  12. package/src/components/common/wangeditor/README.md +14 -0
  13. package/src/components/common/wangeditor/package-lock.json +114 -0
  14. package/src/components/common/wangeditor/package.json +52 -0
  15. package/src/components/common/wangeditor/src/component.jsx +74 -0
  16. package/src/components/common/wangeditor/src/index.js +3 -0
  17. package/src/core/LICENSE +21 -0
  18. package/src/core/README.md +120 -0
  19. package/src/core/babel.config.js +13 -0
  20. package/src/core/bili.config.js +34 -0
  21. package/src/core/package-lock.json +13 -0
  22. package/src/core/package.json +61 -0
  23. package/src/core/src/components/formCreate.js +287 -0
  24. package/src/core/src/components/fragment.js +12 -0
  25. package/src/core/src/factory/context.js +264 -0
  26. package/src/core/src/factory/creator.js +63 -0
  27. package/src/core/src/factory/maker.js +17 -0
  28. package/src/core/src/factory/manager.js +87 -0
  29. package/src/core/src/factory/node.js +89 -0
  30. package/src/core/src/factory/parser.js +28 -0
  31. package/src/core/src/frame/api.js +691 -0
  32. package/src/core/src/frame/attrs.js +12 -0
  33. package/src/core/src/frame/dataDriver.js +76 -0
  34. package/src/core/src/frame/fetch.js +128 -0
  35. package/src/core/src/frame/index.js +792 -0
  36. package/src/core/src/frame/language.js +50 -0
  37. package/src/core/src/frame/provider.js +297 -0
  38. package/src/core/src/frame/util.js +311 -0
  39. package/src/core/src/handler/context.js +573 -0
  40. package/src/core/src/handler/effect.js +122 -0
  41. package/src/core/src/handler/index.js +143 -0
  42. package/src/core/src/handler/inject.js +199 -0
  43. package/src/core/src/handler/input.js +199 -0
  44. package/src/core/src/handler/lifecycle.js +55 -0
  45. package/src/core/src/handler/loader.js +375 -0
  46. package/src/core/src/handler/page.js +46 -0
  47. package/src/core/src/handler/render.js +29 -0
  48. package/src/core/src/index.js +12 -0
  49. package/src/core/src/parser/html.js +17 -0
  50. package/src/core/src/render/cache.js +47 -0
  51. package/src/core/src/render/index.js +33 -0
  52. package/src/core/src/render/render.js +418 -0
  53. package/src/core/types/index.d.ts +842 -0
  54. package/src/index.js +5 -0
  55. package/src/utils/LICENSE +21 -0
  56. package/src/utils/README.md +24 -0
  57. package/src/utils/lib/console.js +16 -0
  58. package/src/utils/lib/debounce.js +9 -0
  59. package/src/utils/lib/deepextend.js +51 -0
  60. package/src/utils/lib/deepset.js +14 -0
  61. package/src/utils/lib/extend.js +20 -0
  62. package/src/utils/lib/index.js +14 -0
  63. package/src/utils/lib/json.js +90 -0
  64. package/src/utils/lib/mergeprops.js +62 -0
  65. package/src/utils/lib/mitt.js +43 -0
  66. package/src/utils/lib/modify.js +8 -0
  67. package/src/utils/lib/slot.js +8 -0
  68. package/src/utils/lib/toarray.js +5 -0
  69. package/src/utils/lib/tocase.js +11 -0
  70. package/src/utils/lib/todate.js +10 -0
  71. package/src/utils/lib/toline.js +10 -0
  72. package/src/utils/lib/topromise.js +10 -0
  73. package/src/utils/lib/tostring.js +7 -0
  74. package/src/utils/lib/type.js +45 -0
  75. package/src/utils/lib/unique.js +6 -0
  76. package/src/utils/package.json +32 -0
  77. package/src/vant/LICENSE +21 -0
  78. package/src/vant/auto-import.d.ts +5 -0
  79. package/src/vant/auto-import.js +50 -0
  80. package/src/vant/babel.config.js +10 -0
  81. package/src/vant/bili.config.js +40 -0
  82. package/src/vant/examples/App.vue +96 -0
  83. package/src/vant/examples/main.js +13 -0
  84. package/src/vant/examples/rule.js +366 -0
  85. package/src/vant/package.json +83 -0
  86. package/src/vant/public/index.html +14 -0
  87. package/src/vant/src/components/calendar.jsx +128 -0
  88. package/src/vant/src/components/cascader.jsx +120 -0
  89. package/src/vant/src/components/checkbox.jsx +38 -0
  90. package/src/vant/src/components/datePicker.jsx +87 -0
  91. package/src/vant/src/components/group.jsx +384 -0
  92. package/src/vant/src/components/icon/IconWarning.vue +12 -0
  93. package/src/vant/src/components/index.js +26 -0
  94. package/src/vant/src/components/radio.jsx +38 -0
  95. package/src/vant/src/components/select.jsx +81 -0
  96. package/src/vant/src/components/timePicker.jsx +76 -0
  97. package/src/vant/src/components/uploader.jsx +99 -0
  98. package/src/vant/src/core/alias.js +31 -0
  99. package/src/vant/src/core/api.js +135 -0
  100. package/src/vant/src/core/config.js +35 -0
  101. package/src/vant/src/core/index.js +45 -0
  102. package/src/vant/src/core/manager.js +282 -0
  103. package/src/vant/src/core/provider.js +63 -0
  104. package/src/vant/src/core/utils.js +15 -0
  105. package/src/vant/src/index.js +13 -0
  106. package/src/vant/src/parsers/hidden.js +12 -0
  107. package/src/vant/src/parsers/index.js +59 -0
  108. package/src/vant/src/parsers/row.js +10 -0
  109. package/src/vant/src/style/index.css +495 -0
  110. package/src/vant/types/config.d.ts +99 -0
  111. package/src/vant/types/index.d.ts +27 -0
  112. package/src/vant/vue.config.js +21 -0
@@ -0,0 +1,40 @@
1
+ const {join} = require('path');
2
+ const {author, license, name, version} = require('./package.json');
3
+ const cwd = __dirname;
4
+
5
+ const {UI_LIB} = process.env;
6
+ console.log(`开始打包 -> ${UI_LIB} \n`);
7
+
8
+ module.exports = {
9
+ plugins: {
10
+ commonjs: true,
11
+ postcss: {
12
+ modules: {
13
+ generateScopedName: '[local]'
14
+ }
15
+ }
16
+ },
17
+ banner: {
18
+ author: `2018-${new Date().getFullYear()} ${author}\n * Github https://github.com/xaboy/form-create`,
19
+ license,
20
+ name,
21
+ version
22
+ },
23
+ globals: {
24
+ vue: 'Vue',
25
+ vant: 'vant'
26
+ },
27
+ externals: ['vue', 'Vue', 'vant'],
28
+ output: {
29
+ format: ['umd', 'umd-min'],
30
+ moduleName: 'formCreateMobile',
31
+ fileName: 'form-create[min].js',
32
+ extractCSS: false
33
+ },
34
+ input: join(cwd, '/src/index.js'),
35
+ env: {
36
+ 'NODE_ENV': 'production',
37
+ 'VERSION': version,
38
+ 'UI': UI_LIB,
39
+ }
40
+ };
@@ -0,0 +1,96 @@
1
+ <template>
2
+ <div>
3
+ <h1 class="title">FormCreate Vant Demo</h1>
4
+ <h3>Render</h3>
5
+ <div class="container">
6
+ <div class="mobile">
7
+ <form-create-mobile name="test" :rule="rule" v-model:api="fapi" :option="option" v-model="formData" />
8
+ </div>
9
+
10
+ </div>
11
+
12
+ </div>
13
+ </template>
14
+
15
+ <script>
16
+ import {defineComponent, ref, watch} from 'vue'
17
+ import mock from './rule';
18
+
19
+ export default defineComponent({
20
+ setup() {
21
+ const fapi = ref({});
22
+ const rule = ref(mock())
23
+
24
+ //formData
25
+ const formData = ref({goods_name2: 'goods_name2'})
26
+ const json = ref({});
27
+ watch(formData, value => {
28
+ json.value = value;
29
+ })
30
+
31
+ //option
32
+ const option = ref({
33
+ beforeFetch(opt) {
34
+ return new Promise(resolve => {
35
+ setTimeout(() => {
36
+ resolve();
37
+ }, 5000)
38
+ });
39
+ },
40
+ resetBtn: true
41
+ })
42
+
43
+ return {
44
+ fapi,
45
+ rule,
46
+ formData,
47
+ json,
48
+ option,
49
+ }
50
+ }
51
+ })
52
+ </script>
53
+
54
+ <style>
55
+ .title {
56
+ background-image: -webkit-linear-gradient(left, #d81159, #e53a40 10%, #ffbc42 20%, #75d701 30%, #30a9de 40%, #d81159 50%, #e53a40 60%, #ffbc42 70%, #75d701 80%, #30a9de 90%, #d81159);
57
+ -webkit-background-clip: text;
58
+ background-clip: text;
59
+ color: transparent;
60
+ background-size: 200% 100%;
61
+ -webkit-animation: flowlight 5s linear infinite;
62
+ animation: flowlight 5s linear infinite;
63
+ }
64
+
65
+ .container {
66
+ display: flex;
67
+ align-items: center;
68
+ justify-content: center;
69
+ }
70
+
71
+ .mobile {
72
+ width:390px;
73
+ height: calc(100vh - 200px);
74
+ overflow: scroll;
75
+ border-radius: 25px;
76
+ box-shadow: 0 0 1px 10px #000;
77
+ }
78
+
79
+ @keyframes flowlight {
80
+ 0% {
81
+ background-position: 0 0;
82
+ }
83
+ 100% {
84
+ background-position: -100% 0;
85
+ }
86
+ }
87
+
88
+ @-webkit-keyframes flowlight {
89
+ 0% {
90
+ background-position: 0 0;
91
+ }
92
+ 100% {
93
+ background-position: -100% 0;
94
+ }
95
+ }
96
+ </style>
@@ -0,0 +1,13 @@
1
+ import {createApp} from 'vue'
2
+ import FormCreateMobile from '../src'
3
+ import 'vant/lib/index.css';
4
+ import App from './App.vue'
5
+ import install from '../auto-import';
6
+
7
+ const app = createApp(App)
8
+
9
+ FormCreateMobile.use(install);
10
+
11
+ app.use(FormCreateMobile);
12
+
13
+ app.mount('#app')
@@ -0,0 +1,366 @@
1
+ export default function mock() {
2
+
3
+ return [
4
+ {
5
+ type: 'input',
6
+ title: '商品名称',
7
+ field: 'goods_name2',
8
+ info: {
9
+ align: 'left',
10
+ info:'这个是商品名称',
11
+ },
12
+ value: 'iphone',
13
+ props: {
14
+ placeholder: '请输入商品名称', //输入框占位文本
15
+ disabled: false, //禁用
16
+ },
17
+ validate: [
18
+ {required: true, message: '请输入商品名称', trigger: 'onBlur'}
19
+ ]
20
+ },
21
+ {
22
+ type: 'field',
23
+ title: '商品名称2',
24
+ field: 'goods_name3',
25
+ value: 'iphone',
26
+ $required: true,
27
+ props: {
28
+ placeholder: '请输入商品名称', //输入框占位文本
29
+ type: 'textarea', //禁用
30
+ autosize: true,
31
+ },
32
+ },
33
+ {
34
+ type: 'subform',
35
+ title:'子表单',
36
+ field: 'subform',
37
+ props: {
38
+ rule: [
39
+ {
40
+ type: 'input',
41
+ title: '商品名称',
42
+ field: 'goods_name2',
43
+ info: {
44
+ align: 'left',
45
+ info:'这个是商品名称',
46
+ },
47
+ value: 'iphone',
48
+ props: {
49
+ placeholder: '请输入商品名称', //输入框占位文本
50
+ disabled: false, //禁用
51
+ },
52
+ },
53
+ {
54
+ type: 'calendar',
55
+ title: '日期选择',
56
+ field: 'Calendar1',
57
+ value: '2024-06-11',
58
+ props: {
59
+ placeholder: '请选择',
60
+ },
61
+ on: {
62
+ open(){
63
+ console.log('open');
64
+ },
65
+ confirm(){
66
+ console.log('confirm');
67
+ },
68
+ },
69
+ },
70
+ {
71
+ type: 'calendar',
72
+ title: '日期区间',
73
+ field: 'Calendar2',
74
+ value: ['2024-06-11', '2024-07-11'],
75
+ props: {
76
+ type: 'range',
77
+ placeholder: '请选择',
78
+ },
79
+
80
+ },
81
+ ]
82
+ }
83
+ },
84
+ {
85
+ type: 'group',
86
+ title:'组合',
87
+ field: 'group',
88
+ props: {
89
+ disabled: false,
90
+ expand: 3,
91
+ rule: [
92
+ {
93
+ type: 'input',
94
+ title: '商品名称',
95
+ field: 'goods_name2',
96
+ info: {
97
+ align: 'left',
98
+ info:'这个是商品名称',
99
+ },
100
+ value: 'iphone',
101
+ props: {
102
+ placeholder: '请输入商品名称', //输入框占位文本
103
+ disabled: true, //禁用
104
+ },
105
+ },
106
+ {
107
+ type: 'calendar',
108
+ title: '日期选择',
109
+ field: 'Calendar1',
110
+ value: '2024-06-11',
111
+ props: {
112
+ placeholder: '请选择',
113
+ },
114
+ },
115
+ {
116
+ type: 'calendar',
117
+ title: '日期区间',
118
+ field: 'Calendar2',
119
+ value: ['2024-06-11', '2024-07-11'],
120
+ props: {
121
+ type: 'range',
122
+ placeholder: '请选择',
123
+ },
124
+ },
125
+ ]
126
+ }
127
+ },
128
+ {
129
+ type: 'calendar',
130
+ title: '日期多选',
131
+ field: 'Calendar3',
132
+ value: ['2024-06-11', '2024-07-11', '2024-07-12'],
133
+ props: {
134
+ type: 'multiple',
135
+ placeholder: '请选择',
136
+ clearable: true,
137
+ minDate: '2024-06-10'
138
+ },
139
+ },
140
+ {
141
+ type: 'cascader',
142
+ title: '多级选择',
143
+ field: 'Cascader1',
144
+ value: '330100',
145
+ props: {
146
+ clearable: true,
147
+ options: [
148
+ {
149
+ text: '浙江省',
150
+ value: '330000',
151
+ children: [{text: '杭州市', value: '330100'}],
152
+ },
153
+ {
154
+ text: '江苏省',
155
+ value: '320000',
156
+ children: [{text: '南京市', value: '320100'}],
157
+ },
158
+ ],
159
+ placeholder: '请选择',
160
+ },
161
+ },
162
+ {
163
+ type: 'checkbox',
164
+ title: '多选框',
165
+ field: 'checkbox',
166
+ value: ['1'],
167
+ props: {
168
+ options: [
169
+ {
170
+ label: '复选框1',
171
+ value: '1',
172
+ },
173
+ {
174
+ label: '复选框2',
175
+ value: '2',
176
+ },
177
+ ],
178
+ },
179
+ },
180
+ {
181
+ type: 'radio',
182
+ title: '单选框',
183
+ field: 'radio',
184
+ value: '1',
185
+ props: {
186
+ options: [
187
+ {
188
+ label: '复选框1',
189
+ value: '1',
190
+ },
191
+ {
192
+ label: '复选框2',
193
+ value: '2',
194
+ },
195
+ ],
196
+ },
197
+ },
198
+ {
199
+ type: 'select',
200
+ title: '下拉选择',
201
+ field: 'select',
202
+ value: 'Wednesday',
203
+ props: {
204
+ title: '预约',
205
+ options: [
206
+ { text: '周一', value: 'Monday' },
207
+ { text: '周二', value: 'Tuesday' },
208
+ { text: '周三', value: 'Wednesday' },
209
+ { text: '周四', value: 'Thursday' },
210
+ { text: '周五', value: 'Friday' },
211
+ ],
212
+ placeholder: '请选择',
213
+ },
214
+ },
215
+ {
216
+ type: 'rate',
217
+ title: '评分',
218
+ field: 'rate',
219
+ value: 5,
220
+ props: {
221
+ },
222
+ },
223
+ {
224
+ type: 'slider',
225
+ title: '滑块',
226
+ field: 'slider',
227
+ value: 50,
228
+ props: {
229
+ },
230
+ },
231
+ {
232
+ type: 'slider',
233
+ title: '双滑块',
234
+ field: 'slider2',
235
+ value: [30, 70],
236
+ props: {
237
+ range: true,
238
+ },
239
+ },
240
+ {
241
+ type: 'stepper',
242
+ title: '数字输入',
243
+ field: 'stepper',
244
+ value: 6,
245
+ col: {
246
+ span:16
247
+ },
248
+ props: {
249
+ min:5,
250
+ max:10
251
+ },
252
+ },
253
+ {
254
+ type: 'switch',
255
+ title: '',
256
+ field: 'switch',
257
+ value: 1,
258
+ col: {
259
+ span:8
260
+ },
261
+ props: {
262
+ activeValue:1,
263
+ inactiveValue:0
264
+ },
265
+ },
266
+ {
267
+ type: 'uploader',
268
+ title: '上传',
269
+ field: 'uploader',
270
+ value: [],
271
+ props: {
272
+ action: 'https://run.mocky.io/v3/88bff269-1d6d-4799-8b3b-5736402b3d4a',
273
+ onSuccess(res, file) {
274
+ file.url = res.url;
275
+ }
276
+ },
277
+ },
278
+ {
279
+ type: 'datePicker',
280
+ title: '年月日选择',
281
+ field: 'date',
282
+ value: '2024-06-12',
283
+ props: {
284
+ clearable: true,
285
+ title: '年月日选择',
286
+ // minDate: '2024-06-11'
287
+ },
288
+ },
289
+ {
290
+ type: 'datePicker',
291
+ title: '年月选择',
292
+ field: 'date2',
293
+ value: '2024-06',
294
+ props: {
295
+ title: '年月选择',
296
+ columnsType: ['year', 'month']
297
+ },
298
+ },
299
+ {
300
+ type: 'datePicker',
301
+ title: '年选择',
302
+ field: 'date3',
303
+ value: '2024',
304
+ col: {
305
+ span:12
306
+ },
307
+ props: {
308
+ title: '年选择',
309
+ columnsType: ['year'],
310
+ },
311
+ },
312
+ {
313
+ type: 'datePicker',
314
+ title: '月日选择',
315
+ field: 'date4',
316
+ value: '06-12',
317
+ col: {
318
+ span:12
319
+ },
320
+ props: {
321
+ title: '月日选择',
322
+ columnsType: ['month', 'day'],
323
+ },
324
+ },
325
+ {
326
+ type: 'timePicker',
327
+ title: '时间选择',
328
+ field: 'time1',
329
+ value: '12:47',
330
+ props: {
331
+ clearable: true,
332
+ title: '时间选择',
333
+ },
334
+ },
335
+ {
336
+ type: 'timePicker',
337
+ title: '时分秒选择',
338
+ field: 'time2',
339
+ value: '12:47:58',
340
+ props: {
341
+ title: '时分秒选择',
342
+ columnsType: ['hour', 'minute', 'second']
343
+ },
344
+ },
345
+ {
346
+ type: 'timePicker',
347
+ title: '小时选择',
348
+ field: 'time3',
349
+ value: '12',
350
+ props: {
351
+ title: '小时选择',
352
+ columnsType: ['hour']
353
+ },
354
+ },
355
+ {
356
+ type: 'timePicker',
357
+ title: '分钟选择',
358
+ field: 'time4',
359
+ value: '58',
360
+ props: {
361
+ title: '分钟选择',
362
+ columnsType: ['minute']
363
+ },
364
+ },
365
+ ];
366
+ }
@@ -0,0 +1,83 @@
1
+ {
2
+ "name": "icarys-fc-vant",
3
+ "version": "3.2.37",
4
+ "description": "VantUI版本低代码表单|FormCreate 是一个可以通过 JSON 生成具有动态渲染、数据收集、验证和提交功能的低代码表单生成组件。支持6个UI框架,适配移动端,并且支持生成任何 Vue 组件。内置20种常用表单组件和自定义组件,再复杂的表单都可以轻松搞定。",
5
+ "main": "./dist/icarys-fc-vant.min.js",
6
+ "module": "./dist/icarys-fc-vant.esm.js",
7
+ "unpkg": "./dist/icarys-fc-vant.min.js",
8
+ "jsdelivr": "./dist/icarys-fc-vant.min.js",
9
+ "typings": "./dist/index.d.ts",
10
+ "scripts": {
11
+ "clean": "rimraf dist/",
12
+ "dev:vant": "vue-cli-service serve",
13
+ "bili": "cross-env UI_LIB=vant bili",
14
+ "build": "npm-run-all clean bili"
15
+ },
16
+ "repository": {
17
+ "type": "git",
18
+ "url": "git+https://github.com/xaboy/form-create.git"
19
+ },
20
+ "keywords": [
21
+ "动态表单",
22
+ "低代码",
23
+ "@form-create",
24
+ "form-builder",
25
+ "form",
26
+ "components",
27
+ "vue3",
28
+ "mobile",
29
+ "vant",
30
+ "lowcode",
31
+ "dynamic-form"
32
+ ],
33
+ "files": [
34
+ "README.md",
35
+ "package.json",
36
+ "LICENSE",
37
+ "auto-import.js",
38
+ "auto-import.d.ts",
39
+ "src",
40
+ "types",
41
+ "dist"
42
+ ],
43
+ "author": "xaboy",
44
+ "license": "MIT",
45
+ "bugs": {
46
+ "url": "https://github.com/xaboy/form-create/issues"
47
+ },
48
+ "homepage": "http://www.form-create.com/v3/",
49
+ "dependencies": {
50
+ "@form-create/component-subform": "^3.2.34",
51
+ "@form-create/core": "^3.2.37",
52
+ "@form-create/utils": "^3.2.31",
53
+ "dayjs": "^1.11.11"
54
+ },
55
+ "publishConfig": {
56
+ "access": "public"
57
+ },
58
+ "peerDependencies": {
59
+ "vue": "^3.1.0"
60
+ },
61
+ "devDependencies": {
62
+ "@vue/cli-plugin-babel": "~4.5.0",
63
+ "@vue/cli-service": "^4.5.3",
64
+ "v-jsoneditor": "^1.4.2",
65
+ "vant": "^4.9"
66
+ },
67
+ "buildFormCreateOptions": {
68
+ "name": "@form-create/vant",
69
+ "exportName": "formCreateMobile",
70
+ "extendExternals": [
71
+ "vant"
72
+ ],
73
+ "extendGlobal": {
74
+ "vue": "Vue"
75
+ },
76
+ "fileName": "form-create",
77
+ "formats": [
78
+ "umd",
79
+ "esm"
80
+ ]
81
+ },
82
+ "gitHead": "3d024534b3ee103a96da1d3629582c0cdf19d9a8"
83
+ }
@@ -0,0 +1,14 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+
4
+ <head>
5
+ <meta charset="UTF-8">
6
+ <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,viewport-fit=cover">
7
+ <title>form-create 示例</title>
8
+ </head>
9
+
10
+ <body>
11
+ <div id="app">
12
+ </div>
13
+ </body>
14
+ </html>