소스 검색

修复表格中格子的初始宽度

xushiting 2 년 전
부모
커밋
6604c3c848
2개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/views/draw-file/board/editCAD/Geometry/Cell.js
  2. 3 0
      src/views/draw-file/board/editCAD/Geometry/Table.js

+ 1 - 1
src/views/draw-file/board/editCAD/Geometry/Cell.js

@@ -4,7 +4,7 @@ import Geometry from './Geometry.js'
 export default class Cell extends Geometry {
     constructor(parent,vectorId) {
         super()
-        this.width = 60;    //每个格子默认宽度是60像素
+        this.width = 90;    //每个格子默认宽度是60像素
         this.height = 24;   //每个格子默认高度是24像素
         this.value = "";
         this.colIndex = 0;

+ 3 - 0
src/views/draw-file/board/editCAD/Geometry/Table.js

@@ -33,6 +33,9 @@ export default class Table extends Geometry {
         cell2.rowIndex = 0;
         cell2.colIndex = 1;
 
+        cell1.width = 90;
+        cell2.width = 170
+
         this.cells[0] = []
         this.cells[0][0] = cell1.vectorId
         this.cells[0][1] = cell2.vectorId