@lambo-design/variant-form 2.2.9-beta.0 → 2.2.9-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +201 -0
- package/babel.config.js +5 -0
- package/dist/lib/VFormDesigner.common-report.html +53 -0
- package/dist/lib/VFormDesigner.common.js +123773 -0
- package/dist/lib/VFormDesigner.common.js.map +1 -0
- package/dist/lib/VFormDesigner.css +1 -0
- package/dist/lib/VFormDesigner.umd-report.html +53 -0
- package/dist/lib/VFormDesigner.umd.js +123783 -0
- package/dist/lib/VFormDesigner.umd.js.map +1 -0
- package/dist/lib/VFormDesigner.umd.min-report.html +53 -0
- package/dist/lib/VFormDesigner.umd.min.js +222 -0
- package/dist/lib/demo.html +10 -0
- package/dist/lib/img/indicator-card-header.7291bcc9.png +0 -0
- package/dist/lib/img/lan_navigator.53090c9d.png +0 -0
- package/dist/lib/img/layout-header-bg-canglan.b1d97e4e.png +0 -0
- package/dist/lib/img/layout-header-bg-cuiwei.67019b6d.png +0 -0
- package/dist/lib/img/lv_navigator.f07fb393.png +0 -0
- package/index_template/index_dev.html +19 -0
- package/index_template/index_prod.html +28 -0
- package/install-render.js +29 -0
- package/install.js +41 -0
- package/jsconfig.json +10 -0
- package/license.txt +8 -0
- package/package.json +10 -4
- package/public/favicon.ico +0 -0
- package/public/index.html +19 -0
- package/src/App.vue +45 -0
- package/src/components/form-designer/designer.js +1 -0
- package/src/components/form-designer/form-widget/field-widget/organ-select-widget.vue +254 -0
- package/src/components/form-designer/form-widget/field-widget/relation-form-widget.vue +397 -0
- package/src/components/form-designer/form-widget/field-widget/sub-form-widget.vue +660 -0
- package/src/components/form-designer/form-widget/field-widget/user-select-widget.vue +333 -0
- package/src/components/form-designer/form-widget/index.vue +1 -1
- package/src/components/form-designer/index.vue +14 -12
- package/src/components/form-designer/setting-panel/form-setting.vue +59 -60
- package/src/components/form-designer/setting-panel/index.vue +2 -0
- package/src/components/form-designer/setting-panel/property-editor/allowMultiple-editor.vue +24 -0
- package/src/components/form-designer/setting-panel/property-editor/border-editor.vue +1 -1
- package/src/components/form-designer/setting-panel/property-editor/buttonStyle-editor.vue +1 -1
- package/src/components/form-designer/setting-panel/property-editor/clearable-editor.vue +1 -1
- package/src/components/form-designer/setting-panel/property-editor/displayFields-editor.vue +91 -0
- package/src/components/form-designer/setting-panel/property-editor/displayStyle-editor.vue +1 -1
- package/src/components/form-designer/setting-panel/property-editor/field-relation-form/relation-form-defaultValue-editor.vue +18 -0
- package/src/components/form-designer/setting-panel/property-editor/filterable-editor.vue +1 -1
- package/src/components/form-designer/setting-panel/property-editor/multipleLimit-editor.vue +1 -1
- package/src/components/form-designer/setting-panel/property-editor/name-editor.vue +2 -2
- package/src/components/form-designer/setting-panel/property-editor/operList-editor.vue +64 -0
- package/src/components/form-designer/setting-panel/property-editor/placeholder-editor.vue +1 -1
- package/src/components/form-designer/setting-panel/property-editor/relationForm-editor.vue +74 -0
- package/src/components/form-designer/setting-panel/property-editor/relationItems-editor.vue +91 -0
- package/src/components/form-designer/setting-panel/property-editor/relationType-editor.vue +67 -0
- package/src/components/form-designer/setting-panel/property-editor/rootOrgan-editor.vue +248 -0
- package/src/components/form-designer/setting-panel/property-editor/size-editor.vue +5 -5
- package/src/components/form-designer/setting-panel/property-editor/subFormId-editor.vue +74 -0
- package/src/components/form-designer/setting-panel/propertyRegister.js +144 -133
- package/src/components/form-designer/toolbar-panel/index.vue +11 -10
- package/src/components/form-designer/widget-panel/index.vue +11 -11
- package/src/components/form-designer/widget-panel/widgetsConfig.js +425 -297
- package/src/extension/extension-loader.js +1 -1
- package/src/icons/svg/relation-form-field.svg +1 -0
- package/src/lang/en-US.js +39 -0
- package/src/lang/zh-CN.js +42 -3
- package/src/main.js +29 -0
- package/src/utils/config.js +1 -1
- package/src/utils/util.js +35 -1
- package/vue.config.js +93 -0
package/README.md
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
# Variant Form
|
|
2
|
+
#### 一款高效的Vue低代码表单,可视化设计,一键生成源码,享受更多摸鱼时间。
|
|
3
|
+
|
|
4
|
+

|
|
5
|
+
|
|
6
|
+
<br/>
|
|
7
|
+
|
|
8
|
+
### 立即体验
|
|
9
|
+
[在线Demo](http://120.92.142.115/)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### 🎉🎉<mark>基于VForm的全栈低代码平台已发布</mark>🎉🎉
|
|
13
|
+
|
|
14
|
+
[美乐低代码——立即进入](https://melecode.com/) (私有部署、开箱即用️,已开源✌✌)️
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### 立即体验VForm Pro高级版(提供商业支持)
|
|
18
|
+
[Pro Demo](https://www.vform666.com/pro/)
|
|
19
|
+
|
|
20
|
+
### 视频教程集合:
|
|
21
|
+
[B站观看](https://space.bilibili.com/626932375)
|
|
22
|
+
|
|
23
|
+
### Vue 3正式版已发布
|
|
24
|
+
[立即进入](https://gitee.com/vdpadmin/variant-form3-vite)
|
|
25
|
+
|
|
26
|
+
### 🎉🎉基于Vant组件库的Mobile版本已发布🎉🎉
|
|
27
|
+
[立即进入](https://vform666.com/vform-mobile.html)
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
### 友情链接
|
|
31
|
+
|
|
32
|
+
[Fantastic-admin](https://hooray.gitee.io/fantastic-admin/) —— 一款开箱即用的 Vue 中后台管理系统框架(支持Vue2/Vue3)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
<br/>
|
|
36
|
+
|
|
37
|
+
### 功能一览
|
|
38
|
+
```
|
|
39
|
+
> 拖拽式可视化表单设计;
|
|
40
|
+
> 支持PC、Pad、H5三种布局;
|
|
41
|
+
> 支持运行时动态加载表单;
|
|
42
|
+
> 支持表单复杂交互控制;
|
|
43
|
+
> 支持自定义CSS样式;
|
|
44
|
+
> 支持自定义校验逻辑;
|
|
45
|
+
> 支持国际化多语言;
|
|
46
|
+
> 兼容IE 11浏览器;
|
|
47
|
+
> 可导出Vue组件、HTML源码;
|
|
48
|
+
> 可导出Vue的SFC单文件组件;
|
|
49
|
+
> 支持开发自定义组件;
|
|
50
|
+
> 支持响应式自适应布局;
|
|
51
|
+
> 支持VS Code插件;
|
|
52
|
+
> 更多功能等你探究...;
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### 安装依赖
|
|
56
|
+
```
|
|
57
|
+
npm install --registry=https://registry.npmmirror.com
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### 开发调试
|
|
61
|
+
```
|
|
62
|
+
npm run serve
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### 生产打包
|
|
66
|
+
```
|
|
67
|
+
npm run build
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### 表单设计器 + 表单渲染器打包
|
|
71
|
+
```
|
|
72
|
+
npm run lib
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### 表单渲染器打包
|
|
76
|
+
```
|
|
77
|
+
npm run lib-render
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### 浏览器兼容性
|
|
81
|
+
```Chrome(及同内核的浏览器如QQ浏览器、360浏览器等等),Edge, Firefox,Safari,IE 11```
|
|
82
|
+
|
|
83
|
+
<br/>
|
|
84
|
+
|
|
85
|
+
### 跟Vue项目集成
|
|
86
|
+
|
|
87
|
+
<br/>
|
|
88
|
+
|
|
89
|
+
#### 1. 安装包
|
|
90
|
+
```bash
|
|
91
|
+
npm i vform-builds
|
|
92
|
+
```
|
|
93
|
+
或
|
|
94
|
+
```bash
|
|
95
|
+
yarn add vform-builds
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
<br/>
|
|
99
|
+
|
|
100
|
+
#### 2. 引入并全局注册VForm组件
|
|
101
|
+
```javascript
|
|
102
|
+
import Vue from 'vue'
|
|
103
|
+
import App from './App.vue'
|
|
104
|
+
|
|
105
|
+
import ElementUI from 'element-ui' //引入element-ui库
|
|
106
|
+
import VForm from 'vform-builds' //引入VForm库
|
|
107
|
+
|
|
108
|
+
import 'element-ui/lib/theme-chalk/index.css' //引入element-ui样式
|
|
109
|
+
import 'vform-builds/dist/VFormDesigner.css' //引入VForm样式
|
|
110
|
+
|
|
111
|
+
Vue.config.productionTip = false
|
|
112
|
+
|
|
113
|
+
Vue.use(ElementUI) //全局注册element-ui
|
|
114
|
+
Vue.use(VForm) //全局注册VForm(同时注册了v-form-designer和v-form-render组件)
|
|
115
|
+
|
|
116
|
+
new Vue({
|
|
117
|
+
render: h => h(App),
|
|
118
|
+
}).$mount('#app')
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
<br/>
|
|
122
|
+
|
|
123
|
+
#### 3. 在Vue模板中使用表单设计器组件
|
|
124
|
+
```html
|
|
125
|
+
<template>
|
|
126
|
+
<v-form-designer></v-form-designer>
|
|
127
|
+
</template>
|
|
128
|
+
|
|
129
|
+
<script>
|
|
130
|
+
export default {
|
|
131
|
+
data() {
|
|
132
|
+
return {
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
</script>
|
|
137
|
+
|
|
138
|
+
<style lang="scss">
|
|
139
|
+
body {
|
|
140
|
+
margin: 0; /* 如果页面出现垂直滚动条,则加入此行CSS以消除之 */
|
|
141
|
+
}
|
|
142
|
+
</style>
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
<br/>
|
|
146
|
+
|
|
147
|
+
#### 4. 在Vue模板中使用表单渲染器组件
|
|
148
|
+
```html
|
|
149
|
+
<template>
|
|
150
|
+
<div>
|
|
151
|
+
<v-form-render :form-json="formJson" :form-data="formData" :option-data="optionData" ref="vFormRef">
|
|
152
|
+
</v-form-render>
|
|
153
|
+
<el-button type="primary" @click="submitForm">Submit</el-button>
|
|
154
|
+
</div>
|
|
155
|
+
</template>
|
|
156
|
+
<script>
|
|
157
|
+
export default {
|
|
158
|
+
data() {
|
|
159
|
+
return {
|
|
160
|
+
formJson: {"widgetList":[],"formConfig":{"labelWidth":80,"labelPosition":"left","size":"","labelAlign":"label-left-align","cssCode":"","customClass":"","functions":"","layoutType":"PC","onFormCreated":"","onFormMounted":"","onFormDataChange":""}},
|
|
161
|
+
formData: {},
|
|
162
|
+
optionData: {}
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
methods: {
|
|
166
|
+
submitForm() {
|
|
167
|
+
this.$refs.vFormRef.getFormData().then(formData => {
|
|
168
|
+
// Form Validation OK
|
|
169
|
+
alert( JSON.stringify(formData) )
|
|
170
|
+
}).catch(error => {
|
|
171
|
+
// Form Validation failed
|
|
172
|
+
this.$message.error(error)
|
|
173
|
+
})
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
</script>
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
<br/>
|
|
181
|
+
|
|
182
|
+
### 资源链接
|
|
183
|
+
<hr>
|
|
184
|
+
|
|
185
|
+
文档官网:<a href="https://www.vform666.com/" target="_blank">https://www.vform666.com/</a>
|
|
186
|
+
|
|
187
|
+
在线演示:<a href="http://120.92.142.115/" target="_blank">http://120.92.142.115/</a>
|
|
188
|
+
|
|
189
|
+
Gitee仓库:<a href="https://gitee.com/vdpadmin/variant-form" target="_blank">https://gitee.com/vdpadmin/variant-form</a>
|
|
190
|
+
|
|
191
|
+
Github仓库:<a href="https://github.com/vform666/variant-form" target="_blank">https://github.com/vform666/variant-form</a>
|
|
192
|
+
|
|
193
|
+
VS Code插件:<a href="https://www.vform666.com/plugin/" target="_blank">https://www.vform666.com/plugin/</a>
|
|
194
|
+
|
|
195
|
+
更新日志:<a href="https://www.vform666.com/changelog.html" target="_blank">https://www.vform666.com/changelog.html</a>
|
|
196
|
+
|
|
197
|
+
订阅Pro版:<a href="https://www.vform666.com/pro/" target="_blank">https://www.vform666.com/pro/</a>
|
|
198
|
+
|
|
199
|
+
技术交流群:扫如下二维码加群
|
|
200
|
+
|
|
201
|
+

|