icarys-form-create-vant 1.0.2 → 1.0.4

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 (113) hide show
  1. package/README.md +3 -3
  2. package/dist/index.js +3 -3
  3. package/dist/index.min.js +3 -3
  4. package/package.json +8 -5
  5. package/src/components/common/subform/LICENSE +21 -0
  6. package/src/components/common/subform/README.md +6 -0
  7. package/src/components/common/subform/package.json +48 -0
  8. package/src/components/common/subform/src/component.jsx +75 -0
  9. package/src/components/common/subform/src/index.js +3 -0
  10. package/src/components/common/wangeditor/LICENSE +21 -0
  11. package/src/components/common/wangeditor/README.md +14 -0
  12. package/src/components/common/wangeditor/package-lock.json +114 -0
  13. package/src/components/common/wangeditor/package.json +52 -0
  14. package/src/components/common/wangeditor/src/component.jsx +74 -0
  15. package/src/components/common/wangeditor/src/index.js +3 -0
  16. package/src/core/LICENSE +21 -0
  17. package/src/core/README.md +120 -0
  18. package/src/core/babel.config.js +13 -0
  19. package/src/core/bili.config.js +34 -0
  20. package/src/core/package-lock.json +13 -0
  21. package/src/core/package.json +61 -0
  22. package/src/core/src/components/formCreate.js +287 -0
  23. package/src/core/src/components/fragment.js +12 -0
  24. package/src/core/src/factory/context.js +264 -0
  25. package/src/core/src/factory/creator.js +63 -0
  26. package/src/core/src/factory/maker.js +17 -0
  27. package/src/core/src/factory/manager.js +87 -0
  28. package/src/core/src/factory/node.js +89 -0
  29. package/src/core/src/factory/parser.js +28 -0
  30. package/src/core/src/frame/api.js +691 -0
  31. package/src/core/src/frame/attrs.js +12 -0
  32. package/src/core/src/frame/dataDriver.js +76 -0
  33. package/src/core/src/frame/fetch.js +128 -0
  34. package/src/core/src/frame/index.js +792 -0
  35. package/src/core/src/frame/language.js +50 -0
  36. package/src/core/src/frame/provider.js +297 -0
  37. package/src/core/src/frame/util.js +311 -0
  38. package/src/core/src/handler/context.js +573 -0
  39. package/src/core/src/handler/effect.js +122 -0
  40. package/src/core/src/handler/index.js +143 -0
  41. package/src/core/src/handler/inject.js +199 -0
  42. package/src/core/src/handler/input.js +199 -0
  43. package/src/core/src/handler/lifecycle.js +55 -0
  44. package/src/core/src/handler/loader.js +375 -0
  45. package/src/core/src/handler/page.js +46 -0
  46. package/src/core/src/handler/render.js +29 -0
  47. package/src/core/src/index.js +12 -0
  48. package/src/core/src/parser/html.js +17 -0
  49. package/src/core/src/render/cache.js +47 -0
  50. package/src/core/src/render/index.js +33 -0
  51. package/src/core/src/render/render.js +418 -0
  52. package/src/core/types/index.d.ts +842 -0
  53. package/src/index.js +5 -0
  54. package/src/utils/LICENSE +21 -0
  55. package/src/utils/README.md +24 -0
  56. package/src/utils/lib/console.js +16 -0
  57. package/src/utils/lib/debounce.js +9 -0
  58. package/src/utils/lib/deepextend.js +51 -0
  59. package/src/utils/lib/deepset.js +14 -0
  60. package/src/utils/lib/extend.js +20 -0
  61. package/src/utils/lib/index.js +14 -0
  62. package/src/utils/lib/json.js +90 -0
  63. package/src/utils/lib/mergeprops.js +62 -0
  64. package/src/utils/lib/mitt.js +43 -0
  65. package/src/utils/lib/modify.js +8 -0
  66. package/src/utils/lib/slot.js +8 -0
  67. package/src/utils/lib/toarray.js +5 -0
  68. package/src/utils/lib/tocase.js +11 -0
  69. package/src/utils/lib/todate.js +10 -0
  70. package/src/utils/lib/toline.js +10 -0
  71. package/src/utils/lib/topromise.js +10 -0
  72. package/src/utils/lib/tostring.js +7 -0
  73. package/src/utils/lib/type.js +45 -0
  74. package/src/utils/lib/unique.js +6 -0
  75. package/src/utils/package.json +32 -0
  76. package/src/vant/LICENSE +21 -0
  77. package/src/vant/README.md +137 -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-lock.json +11367 -0
  86. package/src/vant/package.json +83 -0
  87. package/src/vant/public/index.html +14 -0
  88. package/src/vant/src/components/calendar.jsx +128 -0
  89. package/src/vant/src/components/cascader.jsx +120 -0
  90. package/src/vant/src/components/checkbox.jsx +38 -0
  91. package/src/vant/src/components/datePicker.jsx +87 -0
  92. package/src/vant/src/components/group.jsx +384 -0
  93. package/src/vant/src/components/icon/IconWarning.vue +12 -0
  94. package/src/vant/src/components/index.js +26 -0
  95. package/src/vant/src/components/radio.jsx +38 -0
  96. package/src/vant/src/components/select.jsx +81 -0
  97. package/src/vant/src/components/timePicker.jsx +76 -0
  98. package/src/vant/src/components/uploader.jsx +99 -0
  99. package/src/vant/src/core/alias.js +31 -0
  100. package/src/vant/src/core/api.js +135 -0
  101. package/src/vant/src/core/config.js +35 -0
  102. package/src/vant/src/core/index.js +45 -0
  103. package/src/vant/src/core/manager.js +282 -0
  104. package/src/vant/src/core/provider.js +63 -0
  105. package/src/vant/src/core/utils.js +15 -0
  106. package/src/vant/src/index.js +13 -0
  107. package/src/vant/src/parsers/hidden.js +12 -0
  108. package/src/vant/src/parsers/index.js +59 -0
  109. package/src/vant/src/parsers/row.js +10 -0
  110. package/src/vant/src/style/index.css +495 -0
  111. package/src/vant/types/config.d.ts +99 -0
  112. package/src/vant/types/index.d.ts +27 -0
  113. package/src/vant/vue.config.js +21 -0
package/package.json CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "name": "icarys-form-create-vant",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "基于FormCreate和Vant的移动端低代码表单组件库,可以通过JSON生成具有动态渲染、数据收集、验证和提交功能的表单",
5
5
  "main": "./dist/index.min.js",
6
+ "module": "./dist/index.esm.js",
6
7
  "unpkg": "./dist/index.min.js",
7
8
  "jsdelivr": "./dist/index.min.js",
8
9
  "typings": "./types/index.d.ts",
@@ -13,6 +14,7 @@
13
14
  "dev": "vue-cli-service serve src/vant/examples",
14
15
  "pub": "npm run build && npm publish"
15
16
  },
17
+
16
18
  "keywords": [
17
19
  "vue3",
18
20
  "vant",
@@ -27,20 +29,21 @@
27
29
  "README.md",
28
30
  "package.json",
29
31
  "LICENSE",
32
+ "src",
30
33
  "types",
31
34
  "dist"
32
35
  ],
33
- "author": "icarys",
36
+ "author": "lvyanrui",
34
37
  "license": "MIT",
35
38
  "peerDependencies": {
36
- "vue": "^3.1.0"
39
+ "vue": "^3.1.0",
40
+ "vant": "^4.0.0"
37
41
  },
38
42
  "dependencies": {
39
43
  "@form-create/component-subform": "^3.2.34",
40
44
  "@form-create/core": "^3.2.37",
41
45
  "@form-create/utils": "^3.2.31",
42
- "dayjs": "^1.11.11",
43
- "vant": "^4.0.0"
46
+ "dayjs": "^1.11.11"
44
47
  },
45
48
  "devDependencies": {
46
49
  "@vue/cli-plugin-babel": "~4.5.0",
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2022 xaboy
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,6 @@
1
+ # @form-create/component-subform
2
+
3
+ @form-create 内置组件
4
+
5
+ [GitHub](https://github.com/xaboy/form-create) | [文档](http://form-create.com/v3/) | [Document](http://form-create.com/v3/)
6
+
@@ -0,0 +1,48 @@
1
+ {
2
+ "name": "@form-create/component-subform",
3
+ "version": "3.2.34",
4
+ "description": "@form-create 内置组件",
5
+ "main": "./dist/index.min.js",
6
+ "module": "./dist/index.esm.js",
7
+ "unpkg": "./dist/index.min.js",
8
+ "jsdelivr": "./dist/index.min.js",
9
+ "scripts": {
10
+ "clean": "rimraf dist/",
11
+ "bili": "cross-env bili",
12
+ "build": "npm-run-all clean bili"
13
+ },
14
+ "files": [
15
+ "README.md",
16
+ "package.json",
17
+ "LICENSE",
18
+ "src",
19
+ "dist"
20
+ ],
21
+ "keywords": [
22
+ "@form-create",
23
+ "form-create-component",
24
+ "form-create-common-component"
25
+ ],
26
+ "repository": {
27
+ "type": "git",
28
+ "url": "git+https://github.com/xaboy/form-create.git"
29
+ },
30
+ "author": "xaboy",
31
+ "license": "MIT",
32
+ "bugs": {
33
+ "url": "https://github.com/xaboy/form-create/issues"
34
+ },
35
+ "homepage": "http://www.form-create.com",
36
+ "publishConfig": {
37
+ "access": "public"
38
+ },
39
+ "buildFormCreateOptions": {
40
+ "name": "@form-create/component-subform",
41
+ "exportName": "FcSubForm",
42
+ "formats": [
43
+ "umd",
44
+ "esm"
45
+ ]
46
+ },
47
+ "gitHead": "3d024534b3ee103a96da1d3629582c0cdf19d9a8"
48
+ }
@@ -0,0 +1,75 @@
1
+ import {defineComponent, reactive, markRaw, nextTick} from 'vue';
2
+
3
+ const NAME = 'fcSubForm';
4
+
5
+
6
+ export default defineComponent({
7
+ name: NAME,
8
+ props: {
9
+ rule: Array,
10
+ options: {
11
+ type: Object,
12
+ default: () => reactive(({
13
+ submitBtn: false,
14
+ resetBtn: false,
15
+ }))
16
+ },
17
+ modelValue: {
18
+ type: Object,
19
+ default: () => ({})
20
+ },
21
+ disabled: {
22
+ type: Boolean,
23
+ default: false
24
+ },
25
+ syncDisabled: {
26
+ type: Boolean,
27
+ default: true
28
+ },
29
+ formCreateInject: Object,
30
+ },
31
+ data() {
32
+ return {
33
+ cacheValue: {},
34
+ subApi: {},
35
+ form: markRaw(this.formCreateInject.form.$form())
36
+ }
37
+ },
38
+ emits: ['fc:subform', 'update:modelValue', 'change', 'itemMounted'],
39
+ watch: {
40
+ modelValue(n) {
41
+ this.setValue(n);
42
+ }
43
+ },
44
+ methods: {
45
+ formData(value) {
46
+ this.cacheValue = JSON.stringify(value);
47
+ this.$emit('update:modelValue', value);
48
+ this.$emit('change', value);
49
+ },
50
+ setValue(value) {
51
+ const str = JSON.stringify(value);
52
+ if (this.cacheValue === str) {
53
+ return;
54
+ }
55
+ this.cacheValue = str;
56
+ this.subApi.coverValue(value || {});
57
+ },
58
+ add$f(api) {
59
+ this.subApi = api;
60
+ nextTick(() => {
61
+ this.$emit('itemMounted', api);
62
+ });
63
+ }
64
+ },
65
+ render() {
66
+ const Type = this.form;
67
+ return <Type
68
+ disabled={this.disabled}
69
+ onUpdate:modelValue={this.formData}
70
+ modelValue={this.modelValue}
71
+ onUpdate:api={this.add$f}
72
+ rule={this.rule}
73
+ option={this.options} extendOption={true}/>
74
+ }
75
+ })
@@ -0,0 +1,3 @@
1
+ import Sub from './component';
2
+
3
+ export default Sub;
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2022 xaboy
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,14 @@
1
+ # @form-create/component-wangeditor
2
+
3
+ @form-create 富文本组件
4
+
5
+ [GitHub](https://github.com/xaboy/form-create) | [文档](http://form-create.com/v3/) | [Document](http://form-create.com/v3/)
6
+
7
+
8
+ props
9
+
10
+ | 属性 | 类型 | 说明 |
11
+ | -------------- | -------- | ------------------------------ |
12
+ | v-model | string | 富文本内容 |
13
+ | init | Function | 初始化 wangEditor |
14
+ | disabled | boolean | 禁用富文本组件 |
@@ -0,0 +1,114 @@
1
+ {
2
+ "name": "@form-create/component-wangeditor",
3
+ "version": "3.2.14",
4
+ "lockfileVersion": 2,
5
+ "requires": true,
6
+ "packages": {
7
+ "": {
8
+ "name": "@form-create/component-wangeditor",
9
+ "version": "3.1.2",
10
+ "license": "MIT",
11
+ "dependencies": {
12
+ "wangeditor": "^4.6.0"
13
+ }
14
+ },
15
+ "node_modules/@babel/runtime": {
16
+ "version": "7.15.4",
17
+ "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.15.4.tgz",
18
+ "integrity": "sha512-99catp6bHCaxr4sJ/DbTGgHS4+Rs2RVd2g7iOap6SLGPDknRK9ztKNsE/Fg6QhSeh1FGE5f6gHGQmvvn3I3xhw==",
19
+ "dependencies": {
20
+ "regenerator-runtime": "^0.13.4"
21
+ },
22
+ "engines": {
23
+ "node": ">=6.9.0"
24
+ }
25
+ },
26
+ "node_modules/@babel/runtime-corejs3": {
27
+ "version": "7.15.4",
28
+ "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.15.4.tgz",
29
+ "integrity": "sha512-lWcAqKeB624/twtTc3w6w/2o9RqJPaNBhPGK6DKLSiwuVWC7WFkypWyNg+CpZoyJH0jVzv1uMtXZ/5/lQOLtCg==",
30
+ "dependencies": {
31
+ "core-js-pure": "^3.16.0",
32
+ "regenerator-runtime": "^0.13.4"
33
+ },
34
+ "engines": {
35
+ "node": ">=6.9.0"
36
+ }
37
+ },
38
+ "node_modules/core-js-pure": {
39
+ "version": "3.18.1",
40
+ "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.18.1.tgz",
41
+ "integrity": "sha512-kmW/k8MaSuqpvA1xm2l3TVlBuvW+XBkcaOroFUpO3D4lsTGQWBTb/tBDCf/PNkkPLrwgrkQRIYNPB0CeqGJWGQ==",
42
+ "deprecated": "core-js-pure@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js-pure.",
43
+ "hasInstallScript": true,
44
+ "funding": {
45
+ "type": "opencollective",
46
+ "url": "https://opencollective.com/core-js"
47
+ }
48
+ },
49
+ "node_modules/regenerator-runtime": {
50
+ "version": "0.13.9",
51
+ "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz",
52
+ "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA=="
53
+ },
54
+ "node_modules/tslib": {
55
+ "version": "2.3.1",
56
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz",
57
+ "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw=="
58
+ },
59
+ "node_modules/wangeditor": {
60
+ "version": "4.7.8",
61
+ "resolved": "https://registry.npmjs.org/wangeditor/-/wangeditor-4.7.8.tgz",
62
+ "integrity": "sha512-x033FPrVDgqzaKHMp75B247w02VIR1vGwstSZnXeJhdFhgLH979G8SWkSpXCcCVAKdHP0gbSkYb5r0Lp3Erdag==",
63
+ "dependencies": {
64
+ "@babel/runtime": "^7.11.2",
65
+ "@babel/runtime-corejs3": "^7.11.2",
66
+ "tslib": "^2.1.0"
67
+ }
68
+ }
69
+ },
70
+ "dependencies": {
71
+ "@babel/runtime": {
72
+ "version": "7.15.4",
73
+ "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.15.4.tgz",
74
+ "integrity": "sha512-99catp6bHCaxr4sJ/DbTGgHS4+Rs2RVd2g7iOap6SLGPDknRK9ztKNsE/Fg6QhSeh1FGE5f6gHGQmvvn3I3xhw==",
75
+ "requires": {
76
+ "regenerator-runtime": "^0.13.4"
77
+ }
78
+ },
79
+ "@babel/runtime-corejs3": {
80
+ "version": "7.15.4",
81
+ "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.15.4.tgz",
82
+ "integrity": "sha512-lWcAqKeB624/twtTc3w6w/2o9RqJPaNBhPGK6DKLSiwuVWC7WFkypWyNg+CpZoyJH0jVzv1uMtXZ/5/lQOLtCg==",
83
+ "requires": {
84
+ "core-js-pure": "^3.16.0",
85
+ "regenerator-runtime": "^0.13.4"
86
+ }
87
+ },
88
+ "core-js-pure": {
89
+ "version": "3.18.1",
90
+ "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.18.1.tgz",
91
+ "integrity": "sha512-kmW/k8MaSuqpvA1xm2l3TVlBuvW+XBkcaOroFUpO3D4lsTGQWBTb/tBDCf/PNkkPLrwgrkQRIYNPB0CeqGJWGQ=="
92
+ },
93
+ "regenerator-runtime": {
94
+ "version": "0.13.9",
95
+ "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz",
96
+ "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA=="
97
+ },
98
+ "tslib": {
99
+ "version": "2.3.1",
100
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz",
101
+ "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw=="
102
+ },
103
+ "wangeditor": {
104
+ "version": "4.7.8",
105
+ "resolved": "https://registry.npmjs.org/wangeditor/-/wangeditor-4.7.8.tgz",
106
+ "integrity": "sha512-x033FPrVDgqzaKHMp75B247w02VIR1vGwstSZnXeJhdFhgLH979G8SWkSpXCcCVAKdHP0gbSkYb5r0Lp3Erdag==",
107
+ "requires": {
108
+ "@babel/runtime": "^7.11.2",
109
+ "@babel/runtime-corejs3": "^7.11.2",
110
+ "tslib": "^2.1.0"
111
+ }
112
+ }
113
+ }
114
+ }
@@ -0,0 +1,52 @@
1
+ {
2
+ "name": "@form-create/component-wangeditor",
3
+ "version": "3.2.14",
4
+ "description": "@form-create 富文本组件",
5
+ "main": "./dist/index.min.js",
6
+ "module": "./dist/index.esm.js",
7
+ "unpkg": "./dist/index.min.js",
8
+ "jsdelivr": "./dist/index.min.js",
9
+ "scripts": {
10
+ "clean": "rimraf dist/",
11
+ "bili": "cross-env bili",
12
+ "build": "npm-run-all clean bili"
13
+ },
14
+ "files": [
15
+ "README.md",
16
+ "package.json",
17
+ "LICENSE",
18
+ "src",
19
+ "dist"
20
+ ],
21
+ "keywords": [
22
+ "@form-create",
23
+ "vue3",
24
+ "form-create-component",
25
+ "form-create-common-component"
26
+ ],
27
+ "repository": {
28
+ "type": "git",
29
+ "url": "git+https://github.com/xaboy/form-create.git"
30
+ },
31
+ "author": "xaboy",
32
+ "license": "MIT",
33
+ "bugs": {
34
+ "url": "https://github.com/xaboy/form-create/issues"
35
+ },
36
+ "homepage": "http://www.form-create.com",
37
+ "publishConfig": {
38
+ "access": "public"
39
+ },
40
+ "dependencies": {
41
+ "wangeditor": "^4.6.0"
42
+ },
43
+ "buildFormCreateOptions": {
44
+ "name": "@form-create/component-wangeditor",
45
+ "exportName": "FcEditor",
46
+ "formats": [
47
+ "umd",
48
+ "esm"
49
+ ]
50
+ },
51
+ "gitHead": "3d024534b3ee103a96da1d3629582c0cdf19d9a8"
52
+ }
@@ -0,0 +1,74 @@
1
+ import WangEditor from 'wangeditor'
2
+ import {defineComponent} from 'vue';
3
+
4
+ const NAME = 'fcEditor';
5
+
6
+ let uni = 1;
7
+
8
+ const _extends = Object.assign || function (a) {
9
+ for (let b, c = 1; c < arguments.length; c++) {
10
+ for (let d in b = arguments[c], b) {
11
+ Object.prototype.hasOwnProperty.call(b, d) && (a[d] = b[d]);
12
+ }
13
+ }
14
+
15
+ return a;
16
+ }
17
+
18
+ export default defineComponent({
19
+ name: NAME,
20
+ props: {
21
+ modelValue: String,
22
+ init: Function,
23
+ disabled: Boolean,
24
+ config: Object,
25
+ },
26
+ inheritAttrs: false,
27
+ emits: ['update:modelValue'],
28
+ data() {
29
+ return {
30
+ editor: {},
31
+ uni: uni++,
32
+ }
33
+ },
34
+ watch: {
35
+ disabled() {
36
+ this.enable();
37
+ },
38
+ modelValue(n) {
39
+ if (n !== this.editor.txt.html()) {
40
+ this.editor.txt.html(n || '');
41
+ }
42
+ }
43
+ },
44
+ methods: {
45
+ enable() {
46
+ this.disabled ? this.editor.disable() : this.editor.enable();
47
+ },
48
+ result() {
49
+ this.$emit('update:modelValue', this.editor.txt.html())
50
+ }
51
+ },
52
+ mounted() {
53
+ this.$nextTick(() => {
54
+ this.editor = new WangEditor(`#editor${this.uni}`);
55
+ this.editor.config.zIndex = 2;
56
+ this.editor.config.focus = false;
57
+ this.editor.config.autoFocus = false;
58
+ this.config && _extends(this.editor.config, this.config);
59
+ this.init && this.init(this.editor);
60
+ this.editor.create();
61
+ this.enable();
62
+ this.editor.txt.html(this.modelValue);
63
+ });
64
+ },
65
+ render() {
66
+ const attrs = {...this.$attrs};
67
+ delete attrs.id;
68
+ return <div {...attrs} onInput={this.result} id={`editor${this.uni}`} style="line-height: normal;"/>
69
+ },
70
+ beforeDestroy() {
71
+ this.editor && this.editor.destroy()
72
+ this.editor = null
73
+ }
74
+ });
@@ -0,0 +1,3 @@
1
+ import FcEditor from './component';
2
+
3
+ export default FcEditor;
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2022 xaboy
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,120 @@
1
+ <p align="center">
2
+ <a href="https://www.form-create.com" target="_blank">
3
+ <img width="300" alt="FormCreate" src="https://static.form-create.com/file/img/info-logo2.png">
4
+ </a>
5
+ </p>
6
+
7
+ <p align="center">
8
+ <a href="https://www.form-create.com/" target="_blank">官网</a>
9
+ <span>&nbsp;|&nbsp;</span>
10
+ <a href="https://form-create.com/v3/guide/" target="_blank">帮助文档</a>
11
+ <span>&nbsp;|&nbsp;</span>
12
+ <a href="https://pro.form-create.com/view/" target="_blank">可视化表单设计器</a>
13
+ <span>&nbsp;|&nbsp;</span>
14
+ <a href="https://pro.form-create.com/mobile/" target="_blank">移动端表单设计器</a>
15
+ </p>
16
+
17
+ <p align="center">
18
+ <a href="https://github.com/xaboy/form-create" target="_blank"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="TIM" /></a>
19
+ <a href="https://github.com/xaboy/form-create" target="_blank"><img src="https://img.shields.io/npm/dt/@form-create/element-ui.svg" alt="dt" /></a>
20
+ </p>
21
+
22
+ **FormCreate 是一个可以通过 JSON 生成具有动态渲染、数据收集、验证和提交功能的低代码表单生成组件。支持6个UI框架,适配移动端,并且支持生成任何 Vue 组件。内置20种常用表单组件和自定义组件,再复杂的表单都可以轻松搞定。**
23
+
24
+ [![FcDesigner](https://static.form-create.com/file/img/banner-m2.jpg?20251027)](https://pro.form-create.com/view)
25
+
26
+ ## 特点
27
+ - 使用JSON数据生成表单
28
+ - 支持扩展,生成任何Vue组件和HTML标签
29
+ - 支持6个UI框架
30
+ - 支持组件之间联动
31
+ - 提供丰富的表单操作API
32
+ - 支持子表单和分组
33
+ - 高性能
34
+ - **适配移动端**
35
+ - **多语言**
36
+
37
+ ## 支持的UI框架
38
+
39
+ [![FcDesigner](https://static.form-create.com/file/img/products.jpg)](https://form-create.com/)
40
+
41
+
42
+ > 如果对您有帮助,您可以点右上角 "Star" 支持一下 谢谢!本项目还在不断开发完善中,如有任何建议或问题[请在这里提出](https://github.com/xaboy/form-create/issues/new)
43
+
44
+ > 开发者讨论群[629709230](https://jq.qq.com/?_wv=1027&k=F1FlEFIV)
45
+
46
+
47
+ - **预览**
48
+
49
+ ![demo1](https://raw.githubusercontent.com/xaboy/form-create/dev/images/demo-live3.gif)
50
+
51
+ ![demo2](https://form-create.com/v3/img/form-create.mobile.jpg)
52
+
53
+ <details>
54
+ <summary><b>更多</b></summary>
55
+
56
+ - **操作表单**
57
+
58
+ [详细说明](https://www.form-create.com/v3/instance.html)
59
+
60
+ ![demo2](https://raw.githubusercontent.com/xaboy/form-create/dev/images/demo-live2.gif)
61
+
62
+ - **`group` 组件**
63
+
64
+ [详细说明](https://www.form-create.com/v3/guide/group.html)
65
+
66
+ ![demo3](https://raw.githubusercontent.com/xaboy/form-create/dev/images/demo-group.gif)
67
+
68
+ - **`control` 配置项**
69
+
70
+ [详细说明](https://www.form-create.com/v3/guide/control.html)
71
+
72
+ ![demo2](https://raw.githubusercontent.com/xaboy/form-create/dev/images/demo-live4.gif)
73
+ </details>
74
+
75
+ ## 包说明
76
+
77
+ | 包名 | 说明 |
78
+ |-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------|
79
+ | @form-create/element-ui [![version](https://img.shields.io/npm/v/@form-create/element-ui/next.svg)](https://www.npmjs.com/package/@form-create/element-ui) | [element-plus 版本](http://form-create.com/v3/element-ui/) |
80
+ | @form-create/ant-design-vue [![version](https://img.shields.io/npm/v/@form-create/ant-design-vue/next.svg)](https://www.npmjs.com/package/@form-create/ant-design-vue) | [ant-design-vue 版本](http://form-create.com/v3/ant-design-vue/) |
81
+ | @form-create/arco-design [![version](https://img.shields.io/npm/v/@form-create/arco-design/next.svg)](https://www.npmjs.com/package/@form-create/arco-design) | [arco-design 版本](http://form-create.com/v3/arco-design/) |
82
+ | @form-create/naive-ui [![version](https://img.shields.io/npm/v/@form-create/naive-ui/next.svg)](https://www.npmjs.com/package/@form-create/naive-ui) | [naive-ui 版本](http://form-create.com/v3/naive-ui/) |
83
+ | @form-create/tdesign [![version](https://img.shields.io/npm/v/@form-create/tdesign/next.svg)](https://www.npmjs.com/package/@form-create/tdesign) | [tdesign 版本](http://form-create.com/v3/tdesign/) |
84
+ | @form-create/iview [![version](https://img.shields.io/npm/v/@form-create/iview.svg)](https://www.npmjs.com/package/@form-create/iview) | [iview 版本](http://form-create.com/v2/iview/) |
85
+ | @form-create/view-design [![version](https://img.shields.io/npm/v/@form-create/view-design.svg)](https://www.npmjs.com/package/@form-create/view-design) | [view-design 版本](http://form-create.com/v2/iview/) |
86
+ | @form-create/vant [![version](https://img.shields.io/npm/v/@form-create/vant.svg)](https://www.npmjs.com/package/@form-create/vant) | [vant 版本(移动端)](http://form-create.com/v3/vant/) |
87
+ | @form-create/designer [![version](https://img.shields.io/npm/v/@form-create/designer.svg)](https://www.npmjs.com/package/@form-create/designer) | [可视化表单设计器](http://form-create.com/v3/designer) |
88
+ | @form-create/vant-designer [![version](https://img.shields.io/npm/v/@form-create/vant-designer.svg)](https://www.npmjs.com/package/@form-create/designer) | [移动端表单设计器](http://form-create.com/v3/mobile) |
89
+
90
+ **分支说明**
91
+
92
+ - **latest:** Vue2.0版本分支
93
+ - **super:** Vue2.7版本分支(该版本功能和next分支功能一致)
94
+ - **next:** Vue3.0版本分支
95
+
96
+ ## 示例
97
+
98
+ - [在线示例](https://www.form-create.com/v3/guide/demo.html)
99
+
100
+
101
+
102
+ <details>
103
+ <summary><b>效果图</b></summary>
104
+
105
+ ![https://raw.githubusercontent.com/xaboy/form-create/dev/images/sample110.jpg](https://raw.githubusercontent.com/xaboy/form-create/dev/images/sample110.jpg)
106
+ </details>
107
+
108
+
109
+ ## 联系
110
+ ![http://static.form-create.com/file/img/support.jpg](http://static.form-create.com/file/img/support.jpg)
111
+
112
+ ## 感谢
113
+
114
+ [时光弧线](https://github.com/shiguanghuxian) | [wxxtqk](https://github.com/wxxtqk) | [williamBoss](https://github.com/williamBoss) | [HeyMrLin](https://github.com/HeyMrLin) | [djkloop](https://github.com/djkloop) | [daiwenyong](https://github.com/daiwenyong) | [JetBrains](https://www.jetbrains.com/?from=form-create)
115
+
116
+ ## License
117
+
118
+ [MIT](http://opensource.org/licenses/MIT)
119
+
120
+ Copyright (c) 2018-present xaboy
@@ -0,0 +1,13 @@
1
+ module.exports = {
2
+ presets: [
3
+ [
4
+ '@vue/app',
5
+ {
6
+ useBuiltIns: false,
7
+ polyfills: false,
8
+ corejs: 2,
9
+ },
10
+ ]
11
+
12
+ ]
13
+ }