bill 2 роки тому
батько
коміт
e38b5b34d0

+ 4 - 0
src/views/draw-file/board/editCAD/Controls/UIControl.js

@@ -13,12 +13,16 @@ import Constant from '../Constant'
 import { addWall } from '../Controls/AddWall'
 import { floorplanData } from '../FloorplanData.js'
 import { signService } from '../Service/SignService.js'
+import mitt from 'mitt'
 
 export default class UIControl {
     constructor(layer) {
         this.layer = layer
+        this.bus = mitt()
         this.selectUI = null;
         this.uiSelectCallback = null;
+
+        // this.bus.emit('')
     }
 
     //点击左侧栏后,更新事件

+ 1 - 1
src/views/draw-file/board/index.js

@@ -79,7 +79,7 @@ export const create = (store, canvas) => {
   const onSelect = (type, data = {}) => {
     console.log(type, data)
     refs.bus.emit('selectShape', {
-      data: { type, ...data },
+      data: { type: 'Table', ...data },
       setColor(color) {
         layer.uiControl.setAttributes(type, 'color', color)
       },