feat:添加表单生成器

This commit is contained in:
simiyu
2024-10-14 15:54:47 +08:00
parent 801e30c1dc
commit 0f21688b3c
4 changed files with 45 additions and 4 deletions

View File

@@ -228,6 +228,21 @@ namespace Yi.Framework.Rbac.SqlSugarCore.DataSeeds
}; };
entities.Add(swagger); entities.Add(swagger);
//表单构建
MenuAggregateRoot builder = new MenuAggregateRoot(_guidGenerator.Create(), tool.Id)
{
MenuName = "表单生成器",
MenuType = MenuTypeEnum.Menu,
Router = "build",
IsShow = true,
IsLink = false,
MenuIcon = "form",
Component = "tool/build/index",
IsCache = true,
OrderNum = 101,
IsDeleted = false,
};
entities.Add(builder);
// //ERP // //ERP
// MenuAggregateRoot erp = new MenuAggregateRoot(_guidGenerator.Create()) // MenuAggregateRoot erp = new MenuAggregateRoot(_guidGenerator.Create())

View File

@@ -32,7 +32,8 @@
"typeface-roboto": "^1.1.13", "typeface-roboto": "^1.1.13",
"vue": "3.4.21", "vue": "3.4.21",
"vue-cropper": "1.0.3", "vue-cropper": "1.0.3",
"vue-router": "4.3.0" "vue-router": "4.3.0",
"vform3-builds": "^3.0.10"
}, },
"devDependencies": { "devDependencies": {
"@vitejs/plugin-vue": "^5.0.4", "@vitejs/plugin-vue": "^5.0.4",

View File

@@ -11,6 +11,8 @@ import App from './App'
import store from './store' import store from './store'
import router from './router' import router from './router'
import directive from './directive' // directive import directive from './directive' // directive
import VForm3 from 'vform3-builds'
import 'vform3-builds/dist/designer.style.css' //引入VForm3样式
// 注册指令 // 注册指令
@@ -77,5 +79,6 @@ app.use(ElementPlus, {
// 支持 large、default、small // 支持 large、default、small
size: Cookies.get('size') || 'default' size: Cookies.get('size') || 'default'
}) })
app.use(VForm3)
app.mount('#app') app.mount('#app')

View File

@@ -1,3 +1,25 @@
<template> <template>
<div> 表单构建 <svg-icon icon-class="build" /> </div> <div ref="box">
<v-form-designer ></v-form-designer>
</div>
</template> </template>
<script setup lang="ts">
import {ref,onMounted} from "vue";
const box = ref<Element>()
onMounted(() =>
{
box.value?.firstChild?.classList.add("not-margin")
box.value?.firstChild?.children[0].remove()
})
</script>
<style lang="scss" scoped>
div {
margin: 0; /* 如果页面出现垂直滚动条则加入此行CSS以消除之 */
}
.not-margin{
margin: 0 !important;
}
</style>