moshaorui 3 달 전
부모
커밋
8969949140
1개의 변경된 파일12개의 추가작업 그리고 10개의 파일을 삭제
  1. 12 10
      public/vendor/grapes/grapes.init.js

+ 12 - 10
public/vendor/grapes/grapes.init.js

@@ -223,7 +223,7 @@ editor.on('component:selected', (comp) => {
     //去掉选中组件后的按钮
     const selectedComponent = editor.getSelected();
     //const defaultToolbar = selectedComponent.get('toolbar');
-    //最外层不显示按钮
+    //先不给删除按钮
     if (selectedComponent.get('attributes').mtb_edit == 'true' || selectedComponent.get('attributes').mtb_edit == '1' || selectedComponent.get('attributes').mtb_edit == '2') {
         selectedComponent.set({
             toolbar: [
@@ -231,16 +231,18 @@ editor.on('component:selected', (comp) => {
         });
     } else {
         selectedComponent.set({
+            toolbar: [
+            ]
             //  toolbar: [ ...defaultToolbar, {  attributes: {class: commandIcon}, command: commandToAdd}]
-            toolbar: [{
-                attributes: { class: 'fa fa-clone' },
-                command: 'tlb-clone',
-                title: 'Clone',
-            }, {
-                    attributes: { class: 'fa fa-trash' },
-                    command: 'tlb-delete',
-                    title: 'Delete',
-            }]
+            // toolbar: [{
+            //     attributes: { class: 'fa fa-clone' },
+            //     command: 'tlb-clone',
+            //     title: 'Clone',
+            // }, {
+            //         attributes: { class: 'fa fa-trash' },
+            //         command: 'tlb-delete',
+            //         title: 'Delete',
+            // }]
         });
     }