Procházet zdrojové kódy

feat: 示例按钮总开关逻辑添加

johnsen před 2 měsíci
rodič
revize
cc3b149a81

+ 10 - 2
src/business/platform/data/templaterender/templates/list.vue

@@ -590,6 +590,9 @@ export default {
     },
     composeParam() {
       return this.composeParams
+    },
+    setting() {
+      return this.$store.getters.setting
     }
   },
   watch: {
@@ -1614,8 +1617,13 @@ export default {
       // 显示字段
       const columns = []
       this.setDisplayColumns(this.template.display_columns || [], columns)
-      console.log('toolbarButtons===>', this.template.attrs)
-      if (this.template.attrs && this.template.attrs.formExample) {
+      console.log('toolbarButtons===>', this.setting.system.exampleButton)
+      if (
+        this.setting.system &&
+        this.setting.system.exampleButton &&
+        this.template.attrs &&
+        this.template.attrs.formExample
+      ) {
         toolbarButtons.push({
           $index: toolbarButtons.length,
           key: 'example',