Skip to content

快速上手(Vue3)

安装

sh
npm install @form-create/designer@next

引入

CDN:

html
<link href="https://unpkg.com/element-plus@2.0.1/dist/index.css"></link>
<script src="https://unpkg.com/vue@next"></script>
<script src="https://unpkg.com/element-plus@2.0.1/dist/index.full.js"></script>
<!-- import @form-create/element-ui -->
<script src="https://unpkg.com/@form-create/element-ui@next/dist/form-create.min.js"></script>
<!-- import @form-create/designer -->
<script src="https://unpkg.com/@form-create/designer@next/dist/index.umd.js"></script>
<div id="app">
    <fc-designer height="100vh" />
</div>
<script>
    const { createApp } = Vue
    const app = createApp({});
    app.use(formCreate);
    app.use(FcDesigner);
    app.mount('#app');
</script>

NodeJs:

shell
npm install @form-create/designer@next

请自行导入ElementPlus并挂载

js
import formCreate from '@form-create/element-ui'
import FcDesigner from '@form-create/designer'
import ELEMENT from 'element-plus';
import 'element-plus/dist/index.css';
app.use(ELEMENT);
app.use(formCreate)
app.use(FcDesigner)

使用

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