1.0.0-rc.0 • Published 7 months ago
form-designer-v3 v1.0.0-rc.0
form-designer-v3
安装
npm i form-designer-v3
注册form-designer-v3组件
// main.ts
// 导入 form-designer css
import "form-designer-v3/dist/style.css";
// 导入 form-designer
import plugins from "form-designer-v3";
// 导入element-plus
import ElementPlus from 'element-plus';
// 导入element-plus中文
import ZH_CN from 'element-plus/dist/locale/zh-cn.mjs';
//挂载form-designer的组件
app.use(plugins);
// 挂载element-plus
app.use(ElementPlus, {
locale: ZH_CN
})
使用组件
// app.vue
<template>
<form-designer v-model="form.data" ></form-designer>
</template>
<script setup lang="ts">
import {reactive} from 'vue';
const form = reactive({
config:{},
data:{}
})
</script>
<style scoped></style>
1.0.0-rc.0
7 months ago