Skip to content

快速上手

安装

sh
npm install @form-create/designer

引入

CDN:

html
<!-- import Vue.js ^2.7 -->
<script src="https://unpkg.com/vue@2.7.16/dist/vue.js"></script>
<!-- import stylesheet -->
<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
<!-- import element -->
<script src="https://unpkg.com/element-ui/lib/index.js"></script>
<!-- import @form-create/element-ui -->
<script src="https://unpkg.com/@form-create/element-ui/dist/form-create.min.js"></script>
<!-- import @form-create/designer -->
<script src="https://unpkg.com/@form-create/designer/dist/index.min.js"></script>
<div id="app">
    <fc-designer height="100vh" />
</div>
<script>
    Vue.use(formCreate);
    Vue.use(FcDesigner);
    (new Vue({
    })).$mount('#app');
</script>

NodeJs:

请自行导入ElementUI并挂载

js
import formCreate from '@form-create/element-ui'
import FcDesigner from '@form-create/designer'
import ELEMENT from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
Vue.use(ELEMENT)
Vue.use(formCreate)
Vue.use(FcDesigner)

使用

html
<fc-designer ref="designer" height="100vh"/>