|
@@ -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',
|
|
|
+ // }]
|
|
|
});
|
|
|
}
|
|
|
|