'增加Vue项目集成说明'

pull/3/head
vdpAdmin 2021-09-27 12:34:18 +08:00
parent 9462dfb9e9
commit bb561ff210
2 changed files with 98 additions and 32 deletions

119
README.md
View File

@ -1,10 +1,105 @@
# Variant Form
##### 一款高效的Vue表单可视化设计一键生成源码享受更多摸鱼时间。
#### 一款高效的Vue表单可视化设计一键生成源码享受更多摸鱼时间。
![image](https://ks3-cn-beijing.ksyuncs.com/vform-static/img/vform_demo.gif)
<br/>
### 安装依赖
```
npm install
```
### 开发调试
```
npm run serve
```
### 生产打包
```
npm run build
```
### 表单设计器 + 表单渲染器打包
```
npm run lib
```
### 表单渲染器打包
```
npm run lib-render
```
### 浏览器兼容性
```Chrome及同内核的浏览器如QQ浏览器、360浏览器等等FirefoxSafariIE 11```
<br/>
### 跟Vue项目集成
<br/>
#### 1. 安装包
```bash
npm i vform-builds
```
```bash
yarn add vform-builds
```
<br/>
#### 2. 引入并全局注册VForm组件
```
import Vue from 'vue'
import App from './App.vue'
import ElementUI from 'element-ui' //引入element-ui库
import VForm from 'vform-builds' //引入VForm库
import 'element-ui/lib/theme-chalk/index.css' //引入element-ui样式
import 'vform-builds/dist/VFormDesigner.css' //引入VForm样式
Vue.config.productionTip = false
Vue.use(ElementUI) //全局注册element-ui
Vue.use(VForm) //全局注册VForm(同时注册了v-form-designer和v-form-render组件)
new Vue({
render: h => h(App),
}).$mount('#app')
```
<br/>
#### 3. 在Vue模板中使用表单设计器组件
```bash
<template>
<v-form-designer></v-form-designer>
</template>
<script>
export default {
data() {
return {
}
}
}
</script>
<style lang="scss">
body {
margin: 0; /* 如果页面出现垂直滚动条则加入此行CSS以消除之 */
}
</style>
```
<br/>
### 资源链接
<hr>
文档官网:<a href="http://www.vform666.com/" target="_blank">http://www.vform666.com/</a>
在线演示:<a href="http://demo.vform666.com/" target="_blank">http://demo.vform666.com/</a>
@ -17,24 +112,4 @@ Gitee备份仓库<a href="https://gitee.com/vdpadmin/variant-form" target="_b
技术交流群微信搜索“vformAdmin”或者扫如下二维码加群
![image](https://ks3-cn-beijing.ksyuncs.com/vform-static/img/vx-qrcode-242.png)
<br/>
#### 安装依赖
```
npm install
```
#### 开发调试
```
npm run serve
```
#### 生产打包
```
npm run build
```
#### 浏览器兼容性
```Chrome及同内核的浏览器如QQ浏览器、360浏览器等等FirefoxSafariIE 11```
![image](https://ks3-cn-beijing.ksyuncs.com/vform-static/img/vx-qrcode-242.png)

View File

@ -5,24 +5,15 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="renderer" content="webkit">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<!-- 禁止浏览器缓存index.html begin -->
<meta http-equiv="Expires" content="0">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-control" content="no-cache">
<meta http-equiv="Cache" content="no-cache">
<!-- 禁止浏览器缓存index.html end -->
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= htmlWebpackPlugin.options.title %></title>
<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
</head>
<body>
<noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
<script src="https://unpkg.com/vue/dist/vue.js"></script>
<script src="https://unpkg.com/element-ui/lib/index.js"></script>
</body>
</html>