icarys-form-create-vant 1.0.3 → 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 (114) hide show
  1. package/README.md +1 -1
  2. package/dist/index.js +21 -17787
  3. package/dist/index.min.js +3 -3
  4. package/dist/index.min.js.map +1 -1
  5. package/package.json +5 -2
  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/README.md +137 -0
  79. package/src/vant/auto-import.d.ts +5 -0
  80. package/src/vant/auto-import.js +50 -0
  81. package/src/vant/babel.config.js +10 -0
  82. package/src/vant/bili.config.js +40 -0
  83. package/src/vant/examples/App.vue +96 -0
  84. package/src/vant/examples/main.js +13 -0
  85. package/src/vant/examples/rule.js +366 -0
  86. package/src/vant/package-lock.json +11367 -0
  87. package/src/vant/package.json +83 -0
  88. package/src/vant/public/index.html +14 -0
  89. package/src/vant/src/components/calendar.jsx +128 -0
  90. package/src/vant/src/components/cascader.jsx +120 -0
  91. package/src/vant/src/components/checkbox.jsx +38 -0
  92. package/src/vant/src/components/datePicker.jsx +87 -0
  93. package/src/vant/src/components/group.jsx +384 -0
  94. package/src/vant/src/components/icon/IconWarning.vue +12 -0
  95. package/src/vant/src/components/index.js +26 -0
  96. package/src/vant/src/components/radio.jsx +38 -0
  97. package/src/vant/src/components/select.jsx +81 -0
  98. package/src/vant/src/components/timePicker.jsx +76 -0
  99. package/src/vant/src/components/uploader.jsx +99 -0
  100. package/src/vant/src/core/alias.js +31 -0
  101. package/src/vant/src/core/api.js +135 -0
  102. package/src/vant/src/core/config.js +35 -0
  103. package/src/vant/src/core/index.js +45 -0
  104. package/src/vant/src/core/manager.js +282 -0
  105. package/src/vant/src/core/provider.js +63 -0
  106. package/src/vant/src/core/utils.js +15 -0
  107. package/src/vant/src/index.js +13 -0
  108. package/src/vant/src/parsers/hidden.js +12 -0
  109. package/src/vant/src/parsers/index.js +59 -0
  110. package/src/vant/src/parsers/row.js +10 -0
  111. package/src/vant/src/style/index.css +495 -0
  112. package/src/vant/types/config.d.ts +99 -0
  113. package/src/vant/types/index.d.ts +27 -0
  114. package/src/vant/vue.config.js +21 -0
@@ -0,0 +1,137 @@
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
+ <p align="center">
7
+ 基于VantUI的移动端低代码表单生成组件
8
+ </p>
9
+
10
+ <p align="center">
11
+ <a href="https://www.form-create.com/" target="_blank">官网</a>
12
+ <span>&nbsp;|&nbsp;</span>
13
+ <a href="https://form-create.com/v3/guide/" target="_blank">帮助文档</a>
14
+ <span>&nbsp;|&nbsp;</span>
15
+ <a href="https://pro.form-create.com/view/" target="_blank">可视化表单设计器</a>
16
+ <span>&nbsp;|&nbsp;</span>
17
+ <a href="https://pro.form-create.com/mobile/" target="_blank">移动端表单设计器</a>
18
+ </p>
19
+
20
+ <p align="center">
21
+ <a href="https://github.com/xaboy/form-create" target="_blank"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="TIM" /></a>
22
+ <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>
23
+ </p>
24
+
25
+ **FormCreate 是一个可以通过 JSON 生成具有动态渲染、数据收集、验证和提交功能的低代码表单生成组件。支持6个UI框架,适配移动端,并且支持生成任何 Vue 组件。内置20种常用表单组件和自定义组件,再复杂的表单都可以轻松搞定。**
26
+
27
+ [![FcDesigner](https://static.form-create.com/file/img/banner-m2.jpg?20251027)](https://pro.form-create.com/view)
28
+
29
+ ## 特点
30
+ - 使用JSON数据生成表单
31
+ - 支持扩展,生成任何Vue组件和HTML标签
32
+ - 支持6个UI框架
33
+ - 支持组件之间联动
34
+ - 提供丰富的表单操作API
35
+ - 支持子表单和分组
36
+ - 高性能
37
+ - **适配移动端**
38
+ - **多语言**
39
+
40
+ ## 支持的UI框架
41
+
42
+ [![FcDesigner](https://static.form-create.com/file/img/products.jpg)](https://form-create.com/)
43
+
44
+
45
+ > 如果对您有帮助,您可以点右上角 "Star" 支持一下 谢谢!本项目还在不断开发完善中,如有任何建议或问题[请在这里提出](https://github.com/xaboy/form-create/issues/new)
46
+
47
+ > 开发者讨论群[629709230](https://jq.qq.com/?_wv=1027&k=F1FlEFIV)
48
+
49
+
50
+ - **预览**
51
+
52
+ ![demo1](https://raw.githubusercontent.com/xaboy/form-create/dev/images/demo-live3.gif)
53
+
54
+ ![demo2](https://form-create.com/v3/img/form-create.mobile.jpg)
55
+
56
+ <details>
57
+ <summary><b>更多</b></summary>
58
+
59
+ - **操作表单**
60
+
61
+ [详细说明](https://www.form-create.com/v3/instance.html)
62
+
63
+ ![demo2](https://raw.githubusercontent.com/xaboy/form-create/dev/images/demo-live2.gif)
64
+
65
+ - **`group` 组件**
66
+
67
+ [详细说明](https://www.form-create.com/v3/guide/group.html)
68
+
69
+ ![demo3](https://raw.githubusercontent.com/xaboy/form-create/dev/images/demo-group.gif)
70
+
71
+ - **`control` 配置项**
72
+
73
+ [详细说明](https://www.form-create.com/v3/guide/control.html)
74
+
75
+ ![demo2](https://raw.githubusercontent.com/xaboy/form-create/dev/images/demo-live4.gif)
76
+ </details>
77
+
78
+ ## 包说明
79
+
80
+ | 包名 | 说明 |
81
+ |-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------|
82
+ | @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/) |
83
+ | @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/) |
84
+ | @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/) |
85
+ | @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/) |
86
+ | @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/) |
87
+ | @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/) |
88
+ | @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/) |
89
+ | @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/) |
90
+ | @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) |
91
+ | @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) |
92
+
93
+ **分支说明**
94
+
95
+ - **latest:** Vue2.0版本分支
96
+ - **super:** Vue2.7版本分支(该版本功能和next分支功能一致)
97
+ - **next:** Vue3.0版本分支
98
+
99
+ 例如:
100
+
101
+ 安装Vue2版本的@form-create/vant
102
+
103
+ ```sh
104
+ npm install @form-create/vant
105
+ ```
106
+
107
+ 安装Vue3版本的@form-create/vant
108
+
109
+ ```sh
110
+ npm install @form-create/vant@next
111
+ ```
112
+
113
+ ## 示例
114
+
115
+ - [在线示例](https://www.form-create.com/v3/guide/demo.html)
116
+
117
+
118
+
119
+ <details>
120
+ <summary><b>效果图</b></summary>
121
+
122
+ ![https://raw.githubusercontent.com/xaboy/form-create/dev/images/sample110.jpg](https://raw.githubusercontent.com/xaboy/form-create/dev/images/sample110.jpg)
123
+ </details>
124
+
125
+
126
+ ## 联系
127
+ ![http://static.form-create.com/file/img/support.jpg](http://static.form-create.com/file/img/support.jpg)
128
+
129
+ ## 感谢
130
+
131
+ [时光弧线](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)
132
+
133
+ ## License
134
+
135
+ [MIT](http://opensource.org/licenses/MIT)
136
+
137
+ Copyright (c) 2018-present xaboy
@@ -0,0 +1,5 @@
1
+ import formCreate from "./types/index";
2
+
3
+ declare const install: (app: typeof formCreate) => void;
4
+
5
+ export default install;
@@ -0,0 +1,50 @@
1
+ import {
2
+ Form,
3
+ Cell,
4
+ Button,
5
+ Field,
6
+ Col,
7
+ Row,
8
+ Popup,
9
+ Calendar,
10
+ Cascader,
11
+ CheckboxGroup,
12
+ Checkbox,
13
+ DatePicker,
14
+ Picker,
15
+ RadioGroup,
16
+ Radio,
17
+ Rate,
18
+ Slider,
19
+ Stepper,
20
+ Switch,
21
+ TimePicker,
22
+ Uploader
23
+ } from 'vant';
24
+
25
+ export default function install(formCreate) {
26
+ formCreate.useApp((_, app) => {
27
+ app.component(Form.name) || app.use(Form);
28
+ app.component(Cell.name) || app.use(Cell);
29
+ app.component(Button.name) || app.use(Button);
30
+ app.component(Field.name) || app.use(Field);
31
+ app.component(Col.name) || app.use(Col);
32
+ app.component(Row.name) || app.use(Row);
33
+ app.component(Popup.name) || app.use(Popup);
34
+ app.component(Calendar.name) || app.use(Calendar);
35
+ app.component(Cascader.name) || app.use(Cascader);
36
+ app.component(CheckboxGroup.name) || app.use(CheckboxGroup);
37
+ app.component(Checkbox.name) || app.use(Checkbox);
38
+ app.component(RadioGroup.name) || app.use(RadioGroup);
39
+ app.component(Radio.name) || app.use(Radio);
40
+ app.component(DatePicker.name) || app.use(DatePicker);
41
+ app.component(Picker.name) || app.use(Picker);
42
+ app.component(Rate.name) || app.use(Rate);
43
+ app.component(Slider.name) || app.use(Slider);
44
+ app.component(Stepper.name) || app.use(Stepper);
45
+ app.component(Switch.name) || app.use(Switch);
46
+ app.component(TimePicker.name) || app.use(TimePicker);
47
+ app.component(Uploader.name) || app.use(Uploader);
48
+ });
49
+
50
+ }
@@ -0,0 +1,10 @@
1
+ module.exports = {
2
+ presets: [
3
+ [
4
+ '@vue/cli-plugin-babel/preset',
5
+ {
6
+ useBuiltIns: false
7
+ }
8
+ ]
9
+ ]
10
+ }
@@ -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')