cnhis-design-vue 2.1.135 → 2.1.137

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 (46) hide show
  1. package/CHANGELOG.md +70 -9
  2. package/es/age/index.js +2 -2
  3. package/es/big-table/index.js +63 -51
  4. package/es/big-table/style.css +1 -1
  5. package/es/button/index.js +2 -2
  6. package/es/captcha/index.js +3 -3
  7. package/es/card-reader-sdk/index.js +1 -1
  8. package/es/checkbox/index.js +1 -1
  9. package/es/color-picker/index.js +1 -1
  10. package/es/direct/index.js +23 -2
  11. package/es/drag-layout/index.js +3 -3
  12. package/es/editor/index.js +1 -1
  13. package/es/ellipsis/index.js +1 -1
  14. package/es/fabric-chart/index.js +56 -38
  15. package/es/form-table/index.js +20 -20
  16. package/es/full-calendar/index.js +4 -4
  17. package/es/index/index.js +283 -239
  18. package/es/index/style.css +1 -1
  19. package/es/input/index.js +1 -1
  20. package/es/map/index.js +1 -1
  21. package/es/multi-chat/index.js +25 -25
  22. package/es/multi-chat-client/index.js +19 -19
  23. package/es/multi-chat-history/index.js +4 -4
  24. package/es/multi-chat-record/index.js +4 -4
  25. package/es/multi-chat-setting/index.js +20 -20
  26. package/es/multi-chat-sip/index.js +1 -1
  27. package/es/radio/index.js +1 -1
  28. package/es/scale-container/index.js +1 -1
  29. package/es/scale-view/index.js +27 -27
  30. package/es/select/index.js +4 -4
  31. package/es/select-label/index.js +3 -3
  32. package/es/select-person/index.js +2 -2
  33. package/es/select-tag/index.js +4 -4
  34. package/es/shortcut-setter/index.js +2 -2
  35. package/es/slider-tree/index.js +17 -3
  36. package/es/table-filter/index.js +46 -32
  37. package/es/tag/index.js +1 -1
  38. package/es/verification-code/index.js +2 -2
  39. package/lib/cui.common.js +312 -270
  40. package/lib/cui.umd.js +312 -270
  41. package/lib/cui.umd.min.js +8 -8
  42. package/package.json +1 -1
  43. package/packages/big-table/src/BigTable.vue +13 -1
  44. package/packages/fabric-chart/src/fabric-chart/FabricTextGroup.vue +13 -7
  45. package/packages/fabric-chart/src/mixins/draw.js +9 -6
  46. package/src/directive/flexibleResize.js +12 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cnhis-design-vue",
3
- "version": "2.1.135",
3
+ "version": "2.1.137",
4
4
  "description": "前端业务UI库",
5
5
  "keyword": "cnhis-design-vue vue cnhis",
6
6
  "homepage": "http://dv.cnhis.com/",
@@ -668,6 +668,7 @@ export default create({
668
668
  }
669
669
  // 处理富文本字段,转为字符串,判断是否为富文本,中转标志_temp+id,/<[^>]+>/g.test(i[item].replace(/<span (.*?)>(.*?)<\/span>$/g, ""))处理过大文本会卡住,replace的问题,直接判断有没有p元素就行
670
670
  Object.keys(i).map(item => {
671
+ let isHtml = this.checkHtml(i[item])
671
672
  if (i[item] && typeof i[item] == 'string' && i[item].indexOf('<p') !== -1 && item.indexOf('_temp_' + i.id) === -1) {
672
673
  i[item + '_temp_' + i.id] = i[item] || '';
673
674
  i[item] = this.htmlToText(i[item]);
@@ -684,7 +685,7 @@ export default create({
684
685
  isLink: col ? this.isLink(col, i) : undefined,
685
686
  isCopy:col ? this.isCopy(col, i) : undefined,
686
687
  tips:col ? this.handleValueTips(i, col) : undefined,
687
- isHtml:this.checkHtml(i[item])
688
+ isHtml
688
689
  }
689
690
 
690
691
  });
@@ -1002,6 +1003,17 @@ export default create({
1002
1003
  }
1003
1004
  }
1004
1005
 
1006
+
1007
+ // 特别处理'true'与true, 让true == 'true'
1008
+ if(item.btnLinkSwitchDefVal === true && key === 'true'){
1009
+ item.btnLinkSwitchDefVal = 'true';
1010
+ }
1011
+
1012
+ // 特别处理'false'与false, 让false == 'false'
1013
+ if(item.btnLinkSwitchDefVal === false && key === 'false'){
1014
+ item.btnLinkSwitchDefVal = 'false';
1015
+ }
1016
+
1005
1017
  let isEdit = this.isBatchEditing || this.isInlineEditing || this.isInlineAdding;
1006
1018
 
1007
1019
  let f = isEdit ? (this.listFormUnionSettingMap[item.columnName] ? disabled : true) : disabled;
@@ -186,13 +186,19 @@ export default {
186
186
  originY: 'center'
187
187
  })
188
188
  : null;
189
- if (!text) return;
190
- if (text.width > totalWidth)
191
- text.set({
192
- originX: 'right',
193
- left: canvasWidth - 1
194
- });
195
- textList.push(text);
189
+ if (text) {
190
+ if (text.width > totalWidth)
191
+ text.set({
192
+ originX: 'right',
193
+ left: canvasWidth - 1
194
+ });
195
+ textList.push(text);
196
+ }
197
+ if (topTotal.divider?.show) {
198
+ const dividerY = (i + 2) * yCellHeightTop;
199
+ const divider = this.drawLine([endX, dividerY, endX + totalWidth, dividerY], topTotal.divider.style);
200
+ textList.push(divider);
201
+ }
196
202
  });
197
203
  const title = this.drawTextGroup(
198
204
  { width: totalWidth, height: spaceHeight, strokeWidth: 1 },
@@ -42,14 +42,9 @@ export default {
42
42
  if (!Array.isArray(points)) return null; // 坐标点非数组
43
43
  if (points.length < 4) return null; // 坐标点位数不足 无法完成线的绘制
44
44
  if (points.filter(point => isNumber(point)).length < 4) return null; // 坐标点内可用数值不足 无法完成线的绘制
45
- const lineStyle = this.isObject(style)
46
- ? {
47
- ...style
48
- }
49
- : {};
50
45
  return new this.fabric.Line(points, {
51
46
  ...this.defaultLineStyle,
52
- ...lineStyle
47
+ ...style
53
48
  });
54
49
  },
55
50
  // 绘制文本区
@@ -223,6 +218,14 @@ export default {
223
218
 
224
219
  let obj1, obj2;
225
220
  switch (type) {
221
+ case 'rect':
222
+ // 矩形
223
+ return new this.fabric.Rect({
224
+ width: 8,
225
+ height: 8,
226
+ strokeWidth: 1,
227
+ ...commonOption
228
+ });
226
229
  case 'triangle':
227
230
  // 三角形
228
231
  return new this.fabric.Triangle({
@@ -95,6 +95,7 @@ export class FlexibleResize {
95
95
  toolInitStyle() {
96
96
  let style = "user-select:none;cursor:col-resize;position:absolute;";
97
97
  const mode = this.options.mode;
98
+ const styleAdd = this.options.style;
98
99
  if (/^V/.test(mode)) {
99
100
  style += "width: 8px;cursor:col-resize;";
100
101
  } else {
@@ -115,6 +116,15 @@ export class FlexibleResize {
115
116
  return v;
116
117
  }, "");
117
118
  style += p;
119
+ // 增加style样式
120
+ if (styleAdd) {
121
+ const styleStr = Object.keys(styleAdd).reduce((v,k) => {
122
+ const value = styleAdd[k];
123
+ v += `${k}:${value};`;
124
+ return v;
125
+ }, '')
126
+ style += styleStr;
127
+ }
118
128
  if (this.tool) {
119
129
  this.tool.style = style;
120
130
  }
@@ -139,7 +149,8 @@ export default {
139
149
  el: el,
140
150
  mode: value.mode || "VR",
141
151
  onMove: value.onMove,
142
- onEnd: value.onEnd
152
+ onEnd: value.onEnd,
153
+ style: value.style
143
154
  });
144
155
  },
145
156
  unbind(el) {