cnhis-design-vue 2.1.34 → 2.1.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (129) hide show
  1. package/CHANGELOG.md +43 -9
  2. package/es/affix/index.js +8 -8
  3. package/es/age/index.js +10 -10
  4. package/es/alert/index.js +8 -8
  5. package/es/anchor/index.js +8 -8
  6. package/es/auto-complete/index.js +8 -8
  7. package/es/avatar/index.js +8 -8
  8. package/es/back-top/index.js +8 -8
  9. package/es/badge/index.js +8 -8
  10. package/es/base/index.js +8 -8
  11. package/es/big-table/index.js +133 -117
  12. package/es/big-table/style.css +1 -1
  13. package/es/breadcrumb/index.js +8 -8
  14. package/es/button/index.js +22 -22
  15. package/es/calendar/index.js +8 -8
  16. package/es/captcha/index.js +3 -3
  17. package/es/card/index.js +8 -8
  18. package/es/carousel/index.js +8 -8
  19. package/es/cascader/index.js +8 -8
  20. package/es/checkbox/index.js +9 -9
  21. package/es/col/index.js +8 -8
  22. package/es/collapse/index.js +8 -8
  23. package/es/color-picker/index.js +1 -1
  24. package/es/comment/index.js +8 -8
  25. package/es/config-provider/index.js +8 -8
  26. package/es/date-picker/index.js +8 -8
  27. package/es/descriptions/index.js +8 -8
  28. package/es/divider/index.js +8 -8
  29. package/es/drag-layout/index.js +3 -3
  30. package/es/drawer/index.js +8 -8
  31. package/es/dropdown/index.js +8 -8
  32. package/es/editor/index.js +1 -1
  33. package/es/empty/index.js +8 -8
  34. package/es/fabric-chart/index.js +646 -2463
  35. package/es/fabric-chart/style.css +1 -1
  36. package/es/form/index.js +8 -8
  37. package/es/form-model/index.js +8 -8
  38. package/es/form-table/index.js +62 -62
  39. package/es/index/index.js +1801 -3244
  40. package/es/index/style.css +1 -1
  41. package/es/input/index.js +9 -9
  42. package/es/input-number/index.js +8 -8
  43. package/es/layout/index.js +8 -8
  44. package/es/list/index.js +8 -8
  45. package/es/locale-provider/index.js +8 -8
  46. package/es/map/index.js +9 -9
  47. package/es/mentions/index.js +8 -8
  48. package/es/menu/index.js +8 -8
  49. package/es/message/index.js +8 -8
  50. package/es/multi-chat/index.js +726 -379
  51. package/es/multi-chat/style.css +1 -1
  52. package/es/multi-chat-client/index.js +653 -325
  53. package/es/multi-chat-client/style.css +1 -1
  54. package/es/multi-chat-history/index.js +4 -4
  55. package/es/multi-chat-record/index.js +120 -40
  56. package/es/multi-chat-setting/index.js +154 -49
  57. package/es/multi-chat-sip/index.js +1 -1
  58. package/es/notification/index.js +8 -8
  59. package/es/page-header/index.js +8 -8
  60. package/es/pagination/index.js +8 -8
  61. package/es/popconfirm/index.js +8 -8
  62. package/es/popover/index.js +8 -8
  63. package/es/progress/index.js +8 -8
  64. package/es/radio/index.js +9 -9
  65. package/es/rate/index.js +8 -8
  66. package/es/result/index.js +8 -8
  67. package/es/row/index.js +8 -8
  68. package/es/scale-view/index.js +33 -33
  69. package/es/select/index.js +11 -11
  70. package/es/select-label/index.js +11 -11
  71. package/es/select-person/index.js +2 -2
  72. package/es/shortcut-setter/index.js +10 -10
  73. package/es/skeleton/index.js +8 -8
  74. package/es/slider/index.js +8 -8
  75. package/es/space/index.js +8 -8
  76. package/es/spin/index.js +8 -8
  77. package/es/statistic/index.js +8 -8
  78. package/es/steps/index.js +8 -8
  79. package/es/switch/index.js +8 -8
  80. package/es/table-filter/index.js +84 -73
  81. package/es/table-filter/style.css +1 -1
  82. package/es/tabs/index.js +8 -8
  83. package/es/tag/index.js +9 -9
  84. package/es/time-picker/index.js +8 -8
  85. package/es/timeline/index.js +8 -8
  86. package/es/tooltip/index.js +8 -8
  87. package/es/transfer/index.js +8 -8
  88. package/es/tree/index.js +8 -8
  89. package/es/tree-select/index.js +8 -8
  90. package/es/upload/index.js +8 -8
  91. package/es/utils/UniRTCv2.js +50 -15
  92. package/es/verification-code/index.js +2 -2
  93. package/lib/cui.common.js +1940 -3417
  94. package/lib/cui.umd.js +1940 -3417
  95. package/lib/cui.umd.min.js +48 -48
  96. package/package.json +2 -1
  97. package/packages/big-table/src/BigTable.vue +10 -8
  98. package/packages/big-table/src/components/AutoLayoutButton.vue +3 -3
  99. package/packages/fabric-chart/src/FabricChart.vue +8 -36
  100. package/packages/fabric-chart/src/FabricGrid.vue +3 -10
  101. package/packages/fabric-chart/src/components/TimeScaleValue.vue +10 -8
  102. package/packages/fabric-chart/src/const/defaultVaule.js +59 -59
  103. package/packages/fabric-chart/src/fabric-chart/FabricCanvas.vue +3 -3
  104. package/packages/fabric-chart/src/fabric-chart/FabricLines.vue +3 -23
  105. package/packages/fabric-chart/src/fabric-chart/FabricPolylines.vue +49 -41
  106. package/packages/fabric-chart/src/fabric-chart/FabricScaleValue.vue +5 -6
  107. package/packages/fabric-chart/src/fabric-chart/FabricTextGroup.vue +50 -42
  108. package/packages/fabric-chart/src/mixins/draw.js +25 -5
  109. package/packages/fabric-chart/src/mixins/fabricCommon.js +14 -4
  110. package/packages/multi-chat/chat/audio.vue +82 -14
  111. package/packages/multi-chat/chat/chatFooter.vue +3 -1
  112. package/packages/multi-chat/chat/chatMain.vue +17 -2
  113. package/packages/multi-chat/chat/index.vue +23 -3
  114. package/packages/multi-chat/chat/multiVideo.vue +4 -3
  115. package/packages/multi-chat/chat/video.vue +2 -1
  116. package/packages/multi-chat/store/getters.js +12 -0
  117. package/packages/multi-chat/store/mutation.js +12 -0
  118. package/packages/multi-chat/store/state.js +5 -1
  119. package/packages/multi-chat/utils/index.js +53 -0
  120. package/packages/multi-chat/utils/rtc-client.js +50 -3
  121. package/packages/scale-view/scaleView.vue +2010 -2010
  122. package/packages/table-filter/src/base-search-com/BaseSearch.vue +9 -0
  123. package/src/utils/UniRTCv2.js +40 -12
  124. package/packages/fabric-chart/src/fabric-chart2/FabricBottom.vue +0 -108
  125. package/packages/fabric-chart/src/fabric-chart2/FabricCanvas.vue +0 -181
  126. package/packages/fabric-chart/src/fabric-chart2/FabricCenter.vue +0 -612
  127. package/packages/fabric-chart/src/fabric-chart2/FabricLeft.vue +0 -104
  128. package/packages/fabric-chart/src/fabric-chart2/FabricRight.vue +0 -112
  129. package/packages/fabric-chart/src/fabric-chart2/FabricTop.vue +0 -172
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cnhis-design-vue",
3
- "version": "2.1.34",
3
+ "version": "2.1.36",
4
4
  "description": "前端业务UI库",
5
5
  "keyword": "cnhis-design-vue vue cnhis",
6
6
  "homepage": "http://dv.cnhis.com/",
@@ -76,6 +76,7 @@
76
76
  "eslint": "^6.8.0",
77
77
  "eslint-plugin-vue": "^6.2.2",
78
78
  "filemanager-webpack-plugin": "^2.0.5",
79
+ "git-flow": "^0.2.0",
79
80
  "highlight.js": "^10.7.2",
80
81
  "husky": "^4.3.7",
81
82
  "less": "^3.9.0",
@@ -2254,7 +2254,7 @@ export default create({
2254
2254
  // 嵌套表与主表click切换时需要清除上次的选中
2255
2255
  this.isAboutNestTable && this.$emit('resetNestLastClickTable', table);
2256
2256
 
2257
- let { row, $event = {}, rowIndex } = data;
2257
+ let { row, $event = {}, rowIndex, source } = data;
2258
2258
  // 点击主表格展开行按钮 不需要触发选中行
2259
2259
  let { className } = $event.target || {};
2260
2260
  if (className && vexutils.isString(className) && className.includes('vxe-table--expand-btn')) return;
@@ -2278,7 +2278,7 @@ export default create({
2278
2278
  const value = this.getRowClassName({ row }) == 'single--checked' ? [] : [row];
2279
2279
  this.$set(this, 'checkedRows', value);
2280
2280
  this.pubCheckChange(value);
2281
- this.$emit('handlerClickRow', row, rowIndex);
2281
+ this.$emit('handlerClickRow', row, rowIndex, {source});
2282
2282
  return;
2283
2283
  }
2284
2284
  this.visibleCheckAllWrap = false;
@@ -2324,7 +2324,7 @@ export default create({
2324
2324
  }
2325
2325
  this.updateAddCheckedRows(rowVal, true);
2326
2326
  // 需要选中行
2327
- this.$emit('handlerClickRow', rowVal);
2327
+ this.$emit('handlerClickRow', rowVal, rowIndex, {source});
2328
2328
  return;
2329
2329
  }
2330
2330
  let newTheUniqueKeyArr = [];
@@ -2343,7 +2343,7 @@ export default create({
2343
2343
  if (rowLen > 1) {
2344
2344
  this.selectType != 'radio' && table.setCheckboxRow([row], true);
2345
2345
  this.isTree != 0 && this.selectType != 'radio' && this.pubCheckChange(newRow);
2346
- this.selectType != 'radio' && this.$emit('handlerClickRow', row, rowIndex);
2346
+ this.selectType != 'radio' && this.$emit('handlerClickRow', row, rowIndex, {source});
2347
2347
  } else {
2348
2348
  setChecked = !setChecked;
2349
2349
  if (!setChecked) {
@@ -2357,7 +2357,7 @@ export default create({
2357
2357
  this.selectType != 'radio' && table.setCheckboxRow([row], setChecked);
2358
2358
  }
2359
2359
  if (this.isTree != 0) {
2360
- setChecked && this.$emit('handlerClickRow', row, rowIndex);
2360
+ setChecked && this.$emit('handlerClickRow', row, rowIndex, {source});
2361
2361
  return;
2362
2362
  }
2363
2363
 
@@ -2370,7 +2370,7 @@ export default create({
2370
2370
  }
2371
2371
  this.setCurrentCheckedLength();
2372
2372
  this.lastPageIndex = this.pageVO.pageIndex;
2373
- setChecked && this.$emit('handlerClickRow', row, rowIndex);
2373
+ setChecked && this.$emit('handlerClickRow', row, rowIndex, {source});
2374
2374
  },
2375
2375
  /**
2376
2376
  * 单选行数据 树结构 扁平化处理
@@ -2646,9 +2646,11 @@ export default create({
2646
2646
  // e.stopPropagation();
2647
2647
  // 方晶晶验收2.5.12需求, 要求link字段第一次可选中checkbox, 第二次点击不取消选中
2648
2648
  let isCheckedByCheckboxRow = vxeTable.isCheckedByCheckboxRow(row);
2649
- if (isCheckedByCheckboxRow) {
2650
- e.stopPropagation();
2649
+ // 不冒泡 手动触发方法
2650
+ if (!isCheckedByCheckboxRow) {
2651
+ this.handlerClickRow({row, rowIndex: index, source:'linkDetail'})
2651
2652
  }
2653
+ e.stopPropagation();
2652
2654
  vxeTable.setCurrentRow(row);
2653
2655
  this.$emit('setNestTableClick', this.isNestTable);
2654
2656
  this.$emit('setCurRowIndex', index);
@@ -177,12 +177,12 @@ export default {
177
177
  <a-icon type="more" style="cursor: pointer;" />
178
178
  <a-menu slot="overlay">
179
179
  {this.hideList.map((b, j) => {
180
- return (
180
+ return b ? (
181
181
  <a-menu-item key={b.sid} class="c_dropdown-btn" on-click={e => this.clickBtn(row, b, index, e.domEvent, j)}>
182
182
  {this.getBtnIcon(b)}
183
183
  {b.showStyle === 'only_icon' ? '' : this.handleName(b)}
184
184
  </a-menu-item>
185
- );
185
+ ): null;
186
186
  })}
187
187
  </a-menu>
188
188
  </a-dropdown>
@@ -238,7 +238,7 @@ export default {
238
238
  // 展示的按钮宽度和加上“更多按钮”的宽度大于容器的宽度,showList 最后一个按钮移动到 hideList
239
239
  if(this.hideList.length > 0 && (showBtnListWidth + 15 > wrapWidth)){
240
240
  let t = this.showList.pop();
241
- this.hideList.unshift(t);
241
+ t && this.hideList.unshift(t);
242
242
  }
243
243
  },
244
244
 
@@ -1,23 +1,12 @@
1
1
  <template>
2
2
  <div class="c-fabric-chart" :style="{ width: canvasWidth }">
3
- <component ref="canvasEle" :is="`FabricCanvas${templateData.type || ''}`" :id="id" :templateData="templateData" v-if="rendercanvas">
4
- <template v-if="templateData.type">
5
- <fabric-grid></fabric-grid>
6
- <fabric-top2 :templateData="templateData"></fabric-top2>
7
- <fabric-left2 :templateData="templateData"></fabric-left2>
8
- <fabric-right2 :templateData="templateData"></fabric-right2>
9
- <fabric-bottom2 :templateData="templateData"></fabric-bottom2>
10
- <fabric-center2 :other="templateData.other" :polyline="templateData.left.leftYScalevalue" v-on="$listeners" @pointOperation="pointOperation"></fabric-center2>
11
- </template>
12
-
13
- <template v-else>
14
- <fabric-text-group v-if="hasXScalevalue" :templateData="templateData" v-on="$listeners"></fabric-text-group>
15
- <fabric-grid></fabric-grid>
16
- <fabric-scale-value v-if="hasTable" :templateData="templateData"></fabric-scale-value>
17
- <fabric-lines v-if="hasTopTable" ref="lines" :linesObj="templateData.top" v-on="$listeners"></fabric-lines>
18
- <fabric-polylines ref="polylines" v-if="hasTable" :polyline="polylines" :other="templateData.left.other || {}" @pointOperation="pointOperation" v-on="$listeners"></fabric-polylines>
19
- </template>
20
- </component>
3
+ <fabric-canvas ref="canvasEle" v-bind="$attrs" :templateData="templateData" v-if="rendercanvas">
4
+ <fabric-text-group v-if="hasXScalevalue" :templateData="templateData" v-on="$listeners"></fabric-text-group>
5
+ <fabric-grid></fabric-grid>
6
+ <fabric-scale-value v-if="hasTable" :templateData="templateData"></fabric-scale-value>
7
+ <fabric-lines v-if="hasTopTable" ref="lines" :linesObj="templateData.top" v-on="$listeners"></fabric-lines>
8
+ <fabric-polylines ref="polylines" v-if="hasTable" :polyline="polylines" :other="templateData.left.other || {}" @pointOperation="pointOperation" v-on="$listeners"></fabric-polylines>
9
+ </fabric-canvas>
21
10
  </div>
22
11
  </template>
23
12
 
@@ -29,27 +18,16 @@
29
18
  */
30
19
  import create from '@/core/create';
31
20
  import FabricCanvas from './fabric-chart/FabricCanvas';
32
- import FabricCanvas2 from './fabric-chart2/FabricCanvas';
33
21
  import FabricPolylines from './fabric-chart/FabricPolylines';
34
22
  import FabricGrid from './FabricGrid';
35
23
  import FabricTextGroup from './fabric-chart/FabricTextGroup';
36
24
  import FabricScaleValue from './fabric-chart/FabricScaleValue';
37
25
  import FabricLines from './fabric-chart/FabricLines';
38
- import FabricTop2 from './fabric-chart2/FabricTop';
39
- import FabricLeft2 from './fabric-chart2/FabricLeft';
40
- import FabricRight2 from './fabric-chart2/FabricRight';
41
- import FabricBottom2 from './fabric-chart2/FabricBottom';
42
- import FabricCenter2 from './fabric-chart2/FabricCenter';
43
26
  import { isObject } from './mixins/type';
44
27
 
45
28
  export default create({
46
29
  name: 'fabric-chart',
47
30
  props: {
48
- id: {
49
- type: String,
50
- required: false,
51
- default: 'c-fabric-canvas'
52
- },
53
31
  templateData: {
54
32
  type: Object,
55
33
  required: true
@@ -57,17 +35,11 @@ export default create({
57
35
  },
58
36
  components: {
59
37
  FabricCanvas,
60
- FabricCanvas2,
61
38
  FabricGrid,
62
39
  FabricTextGroup,
63
40
  FabricPolylines,
64
41
  FabricScaleValue,
65
- FabricLines,
66
- FabricTop2,
67
- FabricLeft2,
68
- FabricRight2,
69
- FabricBottom2,
70
- FabricCenter2
42
+ FabricLines
71
43
  },
72
44
  computed: {
73
45
  polylines() {
@@ -5,16 +5,10 @@ export default {
5
5
  name: 'fabric-grid',
6
6
  mixins: [fabricCommon, draw],
7
7
  data() {
8
- return {
9
- };
10
- },
11
- mounted() {
12
- this.$nextTick(() => {
13
- this.initGrid();
14
- });
8
+ return {};
15
9
  },
16
10
  methods: {
17
- initGrid() {
11
+ init() {
18
12
  // 主表格
19
13
  this.createGrid(this.propItems.originY, this.propItems.endY, this.propItems.gridYNumber, this.propItems.yCellHeight);
20
14
 
@@ -22,7 +16,6 @@ export default {
22
16
  if (!this.propItems.type) {
23
17
  this.createGrid(0, this.propItems.endYTop, this.propItems.gridYnumberTop, this.propItems.yCellHeightTop);
24
18
  }
25
-
26
19
  },
27
20
  createGrid(originY, endY, gridYNumber, yCellHeight) {
28
21
  const yList = [];
@@ -63,7 +56,7 @@ export default {
63
56
  });
64
57
  this.canvas.add(group);
65
58
  this.canvas.sendToBack(group);
66
- this.canvas.renderAll();
59
+ // this.canvas.renderAll();
67
60
  }
68
61
  },
69
62
  render(h) {
@@ -49,22 +49,23 @@ export default {
49
49
  };
50
50
  },
51
51
  mounted() {
52
- this.$nextTick(() => {
53
- setTimeout(() => {
54
- this.init();
55
- }, 0);
56
- });
52
+ this._timer = setInterval(() => {
53
+ if (document.readyState === 'complete') {
54
+ this.initDoc();
55
+ clearInterval(this._timer);
56
+ }
57
+ }, 500);
57
58
  },
58
59
  methods: {
59
- init() {
60
+ initDoc() {
60
61
  // this.to = this.templateData.top?.xScalevalue?.to || 'body';
61
62
  const { xScalevalue } = this.$attrs.templateData.top || {};
62
63
  const { canvasWidth, spaceHeight, xCellWidth } = this.propItems;
63
64
  this.cFabricChart = document.querySelector('.c-fabric-chart');
64
65
  // this.bodyHeight = document.body.getBoundingClientRect().height;
65
- this.top = this.cFabricChart.getBoundingClientRect().top;
66
+ this.top = this.cFabricChart?.getBoundingClientRect()?.top || 0;
66
67
  this.popupStyle = {
67
- left: `${this.cFabricChart.getBoundingClientRect().left}px`,
68
+ left: `${this.cFabricChart?.getBoundingClientRect()?.left || 0}px`,
68
69
  top: `${xScalevalue?.popupTop || 0}px`,
69
70
  width: `${canvasWidth}px`,
70
71
  height: `${spaceHeight}px`,
@@ -88,6 +89,7 @@ export default {
88
89
  }
89
90
  },
90
91
  beforeDestroy() {
92
+ this._timer && clearInterval(this._timer);
91
93
  window.removeEventListener('scroll', this.scroll, true);
92
94
  }
93
95
  };
@@ -1,59 +1,59 @@
1
- const data = {
2
- style: {
3
- evented: false,
4
- selectable: false
5
- },
6
- rectStyle: {
7
- fill: 'transparent',
8
- stroke: '#999',
9
- strokeWidth: 1
10
- },
11
- textStyle: {
12
- fontFamily: '微软雅黑',
13
- fontSize: 12,
14
- fill: '#000',
15
- lineHeight: 1
16
- },
17
- borderStyle: {
18
- stroke: '#999',
19
- strokeWidth: 1,
20
- selectable: false,
21
- evented: false
22
- },
23
- // 折线图中的点
24
- pointStyle: {
25
- fill: '#ffffff', // 填充色
26
- stroke: '#000000', // 描边色
27
- originX: 'center',
28
- originY: 'center'
29
- },
30
- // 折线图中的线
31
- lineStyle: {
32
- stroke: '#000', // 描边色
33
- strokeWidth: 1, // 描边宽度
34
- originX: 'center',
35
- originY: 'center'
36
- },
37
- topSpaceHeight: 10, // templateData.top.spaceHeight
38
- topSpaceGridNumber: 3, // templateData.top.xScalevalue.spaceGridNumber
39
- leftSpaceGridNumber: 2, // templateData.left.leftYScalevalue.spaceGridNumber
40
- rightSpaceGridNumber: 2, // templateData.right.rightYScalevalue.spaceGridNumber
41
- topTotal: {
42
- title: '总量',
43
- width: 0,
44
- style: {
45
- fontFamily: '微软雅黑',
46
- fontSize: 12,
47
- fill: '#000',
48
- lineHeight: 1
49
- }
50
- },
51
- criticalStyle: { // 危急值样式
52
- stroke: 'purple', // 颜色 默认 #999
53
- strokeWidth: 1, // 线宽 默认 1
54
- strokeDashArray: [0, 0] // 实线设置 默认[0, 0]
55
- },
56
- bottomNumberLeftSpace: 10 // 底部标记的序号与标记之间的距离
57
- };
58
-
59
- export default data;
1
+ const data = {
2
+ style: {
3
+ evented: false,
4
+ selectable: false
5
+ },
6
+ rectStyle: {
7
+ fill: 'transparent',
8
+ stroke: '#999',
9
+ strokeWidth: 1
10
+ },
11
+ textStyle: {
12
+ fontFamily: '微软雅黑',
13
+ fontSize: 12,
14
+ fill: '#000',
15
+ lineHeight: 1
16
+ },
17
+ borderStyle: {
18
+ stroke: '#999',
19
+ strokeWidth: 1,
20
+ selectable: false,
21
+ evented: false
22
+ },
23
+ // 折线图中的点
24
+ pointStyle: {
25
+ fill: '#ffffff', // 填充色
26
+ stroke: '#000000', // 描边色
27
+ originX: 'center',
28
+ originY: 'center'
29
+ },
30
+ // 折线图中的线
31
+ lineStyle: {
32
+ stroke: '#000', // 描边色
33
+ strokeWidth: 1, // 描边宽度
34
+ originX: 'center',
35
+ originY: 'center'
36
+ },
37
+ topSpaceHeight: 10, // templateData.top.spaceHeight
38
+ topSpaceGridNumber: 3, // templateData.top.xScalevalue.spaceGridNumber
39
+ leftSpaceGridNumber: 2, // templateData.left.leftYScalevalue.spaceGridNumber
40
+ rightSpaceGridNumber: 2, // templateData.right.rightYScalevalue.spaceGridNumber
41
+ topTotal: {
42
+ title: '总量',
43
+ width: 0,
44
+ style: {
45
+ fontFamily: '微软雅黑',
46
+ fontSize: 12,
47
+ fill: '#000',
48
+ lineHeight: 1
49
+ }
50
+ },
51
+ criticalStyle: { // 危急值样式
52
+ stroke: 'purple', // 颜色 默认 #999
53
+ strokeWidth: 1, // 线宽 默认 1
54
+ strokeDashArray: [0, 0] // 实线设置 默认[0, 0]
55
+ },
56
+ bottomNumberLeftSpace: 10 // 底部标记的序号与标记之间的距离
57
+ };
58
+
59
+ export default data;
@@ -14,7 +14,7 @@ export default {
14
14
  props: {
15
15
  id: {
16
16
  type: String,
17
- required: true
17
+ default: 'c-fabric-canvas'
18
18
  },
19
19
  templateData: {
20
20
  type: Object,
@@ -204,7 +204,7 @@ export default {
204
204
  return this.templateData.table?.eventStyle || { selectable: true, evented: true };
205
205
  },
206
206
  operable() {
207
- return this.templateData.table?.operable || { set: false, connect: false };
207
+ return this.templateData.table?.operable || { set: false, connect: false, lockMovementX: false };
208
208
  }
209
209
  },
210
210
  mounted() {
@@ -212,7 +212,7 @@ export default {
212
212
  },
213
213
  methods: {
214
214
  init() {
215
- this.canvas = new this.fabric.Canvas('c-fabric-canvas', {
215
+ this.canvas = new this.fabric.Canvas(this.id, {
216
216
  width: this.templateData.canvasWidth,
217
217
  height: this.templateData.canvasHeight,
218
218
  // margin: [this.templateData.margin.top, this.templateData.margin.right, this.templateData.margin.bottom, this.templateData.margin.left],
@@ -47,27 +47,7 @@ export default {
47
47
  return this.linesObj?.eventStyle || { selectable: true, evented: true };
48
48
  }
49
49
  },
50
-
51
- watch: {
52
- // linesObj: {
53
- // handler(value) {
54
- // if (value) {
55
- // if (this.lines.length) {
56
- // this.removeLines();
57
- // }
58
- // this.getLineList(this.linesObj.list);
59
- // this.createLine();
60
- // }
61
- // },
62
- // deep: true
63
- // },
64
- },
65
-
66
- mounted() {
67
- this.$nextTick(() => {
68
- this.init();
69
- });
70
- },
50
+ mounted() {},
71
51
 
72
52
  methods: {
73
53
  init() {
@@ -282,7 +262,7 @@ export default {
282
262
  this.lineEvent({ line: rightLine, line2: centerLine, text, textObj, limitX: rightLimt, startTime: item[0], endTime: item[1], preText: null, textLimitRight: rightLimt.x2 });
283
263
  });
284
264
  this.canvas.add(...lineItemList, ...textList);
285
- this.canvas.requestRenderAll();
265
+ // this.canvas.requestRenderAll();
286
266
  },
287
267
  drawLineText(textArr, top, i, j, centerLine, x1, x2) {
288
268
  // const value = textArr.map(v => {
@@ -394,7 +374,7 @@ export default {
394
374
  this.lineMoveLimit(line);
395
375
  this.lineMoveUpdateLine(line);
396
376
  this.textUpdatePositionX(line);
397
- this.canvas.renderAll();
377
+ // this.canvas.renderAll();
398
378
  this.showDrapPopup(line);
399
379
  });
400
380
  line.on('moved', () => {