办学质量监测教学评价系统
3041043370ee9dbbd7917b7843f4c72c03081e5e..f89534460a4b54670b0abffb347030f04349bdc8
6 天以前 du
表单设计器保存按钮
f89534 对比 | 目录
6 天以前 du
表单设计器
da883a 对比 | 目录
已修改2个文件
已添加1个文件
40 ■■■■■ 文件已修改
ruoyi-ui/apps/web-antd/package.json 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-ui/apps/web-antd/src/bootstrap.ts 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-ui/apps/web-antd/src/views/tool/dynamicForm/index.vue 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-ui/apps/web-antd/package.json
@@ -27,6 +27,8 @@
  },
  "dependencies": {
    "@ant-design/icons-vue": "^7.0.1",
    "@form-create/designer": "^3.2.11",
    "@form-create/element-ui": "^3.2.25",
    "@tinymce/tinymce-vue": "^6.0.1",
    "@vben/access": "workspace:*",
    "@vben/common-ui": "workspace:*",
@@ -48,6 +50,7 @@
    "crypto-js": "^4.2.0",
    "dayjs": "catalog:",
    "echarts": "^5.5.1",
    "element-plus": "^2.10.2",
    "jsencrypt": "^3.3.2",
    "lodash-es": "^4.17.21",
    "pinia": "catalog:",
ruoyi-ui/apps/web-antd/src/bootstrap.ts
@@ -9,14 +9,16 @@
import '@vben/styles/antd';
import { useTitle } from '@vueuse/core';
import ElementPlus from 'element-plus';
import 'element-plus/dist/index.css'; // æ ·å¼æ–‡ä»¶
import { setupGlobalComponent } from '#/components/global';
import { $t, setupI18n } from '#/locales';
import { initComponentAdapter } from './adapter/component';
import App from './app.vue';
import { router } from './router';
import formCreate from '@form-create/element-ui';
import FcDesigner from '@form-create/designer';
async function bootstrap(namespace: string) {
  // åˆå§‹åŒ–组件适配器
  await initComponentAdapter();
@@ -57,7 +59,9 @@
  // é…ç½®Motion插件
  app.use(MotionPlugin);
  app.use(ElementPlus);
  app.use(formCreate);
  app.use(FcDesigner);
  // åŠ¨æ€æ›´æ–°æ ‡é¢˜
  watchEffect(() => {
    if (preferences.app.dynamicTitle) {
ruoyi-ui/apps/web-antd/src/views/tool/dynamicForm/index.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,27 @@
<template>
  <fc-designer ref="designer" :config="config"  @save="handleSave" />
</template>
<script setup>
import { ref } from 'vue';
const designer = ref();
// èŽ·å–è¡¨å• JSON é…ç½®
const getJson = () => {
  console.log(designer.value.getJson());
};
// åŠ è½½å·²æœ‰é…ç½®
const loadJson = (json) => {
  designer.value.setJson(json);
};
const config = ref({
  showSaveBtn: true,
  showPreviewBtn: true,
});
function handleSave(data) {
  //保存设计规则
  console.log(data);
}
</script>