Parcourir la source

feat: 优化增加设计器中单选禁止选择样式配置

yanglzh il y a 5 mois
Parent
commit
0599edc1e0

Fichier diff supprimé car celui-ci est trop grand
+ 894 - 0
src/theme/form-create.scss


+ 1 - 0
src/theme/index.scss

@@ -7,6 +7,7 @@
 @import './waves.scss';
 @import './dark.scss';
 @import './fast.scss';
+@import './form-create.scss';
 
 
 // 自定义指令 v-auth 增加 v-disabled 的类

+ 3 - 3
src/views/designer/form-create.es.js

@@ -8305,8 +8305,7 @@ const Sl = ve({
   name: "FcEcharts",
   data() {
     return {
-      chart: null,
-      loading: !1
+      chart: null
     };
   },
   emits: ["beforeLoad", "loaded"],
@@ -8319,6 +8318,7 @@ const Sl = ve({
     valueFormat: String,
     subtitle: String,
     funnelSort: String,
+    loading: Boolean,
     config: Object,
     data: Array,
     indicator: Array,
@@ -8637,7 +8637,7 @@ const Sl = ve({
             }
           } else
             t = this.getDefOptions();
-          this.$emit("beforeLoad", this.chart, t), this.chart.setOption(t), this.$emit("loaded", this.chart, t), this.loading = !1;
+          this.$emit("beforeLoad", this.chart, t), this.chart.setOption(t), this.$emit("loaded", this.chart, t);
         });
       });
     }

+ 27 - 22
src/views/designer/view.vue

@@ -11,27 +11,27 @@ import formCreate from './form-create.es.js'
 import api from '/@/api/modules/designer'
 import { useRoute } from 'vue-router'
 import { ElMessage } from 'element-plus'
-import dayjs from "dayjs";
+import dayjs from 'dayjs'
 
 // 设计器中的拓展需要同步写在这里才能生效
 formCreate.extendApi((api) => {
-  /**
-   * 扩展一个 message 方法用于显示弹窗
-   * @param {string} msg - 要显示的消息内容
-   * @param {string} [type='info'] - 消息类型 ('success', 'warning', 'info', 'error')
-   */
-  api.message = (msg, type = 'info') => {
-    return ElMessage({
-      message: msg,
-      type: type, // 默认为 'info'
-    });
-  };
-
-  /**
-   * 扩展一个 dayjs 方法用于日期格式化
-   */
-  api.dayjs = dayjs
-});
+	/**
+	 * 扩展一个 message 方法用于显示弹窗
+	 * @param {string} msg - 要显示的消息内容
+	 * @param {string} [type='info'] - 消息类型 ('success', 'warning', 'info', 'error')
+	 */
+	api.message = (msg, type = 'info') => {
+		return ElMessage({
+			message: msg,
+			type: type, // 默认为 'info'
+		})
+	}
+
+	/**
+	 * 扩展一个 dayjs 方法用于日期格式化
+	 */
+	api.dayjs = dayjs
+})
 
 const route = useRoute()
 
@@ -45,14 +45,19 @@ const formData = ref({})
 
 api.get(code).then((res) => {
 	if (res.content) {
-    const data = JSON.parse(res.content)?.[0]
+		const data = JSON.parse(res.content)?.[0]
 		option.value = formCreate.parseJson(data?.options)
-    rule.value = formCreate.parseJson(data?.rule)
-    show.value = true
+		rule.value = formCreate.parseJson(data?.rule)
+		show.value = true
 	}
 })
 
 const onSubmit = () => {
-  //todo 提交表单
+	//todo 提交表单
 }
 </script>
+<style scoped>
+.from-create ::v-deep(.el-tree-node-disabled > .el-tree-node__content) {
+	color: var(--fc-text-color-3) !important;
+}
+</style>

Certains fichiers n'ont pas été affichés car il y a eu trop de fichiers modifiés dans ce diff