cnhis-design-vue 2.1.64 → 2.1.65

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 (40) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/es/age/index.js +2 -2
  3. package/es/big-table/index.js +69 -49
  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/checkbox/index.js +1 -1
  8. package/es/color-picker/index.js +1 -1
  9. package/es/drag-layout/index.js +3 -3
  10. package/es/editor/index.js +1 -1
  11. package/es/ellipsis/index.js +1 -1
  12. package/es/fabric-chart/index.js +9 -9
  13. package/es/form-table/index.js +20 -20
  14. package/es/index/index.js +246 -214
  15. package/es/index/style.css +1 -1
  16. package/es/input/index.js +1 -1
  17. package/es/map/index.js +1 -1
  18. package/es/multi-chat/index.js +25 -25
  19. package/es/multi-chat-client/index.js +19 -19
  20. package/es/multi-chat-history/index.js +4 -4
  21. package/es/multi-chat-record/index.js +4 -4
  22. package/es/multi-chat-setting/index.js +20 -20
  23. package/es/multi-chat-sip/index.js +1 -1
  24. package/es/radio/index.js +1 -1
  25. package/es/scale-container/index.js +1 -1
  26. package/es/scale-view/index.js +61 -49
  27. package/es/scale-view/style.css +1 -1
  28. package/es/select/index.js +4 -4
  29. package/es/select-label/index.js +3 -3
  30. package/es/select-person/index.js +2 -2
  31. package/es/shortcut-setter/index.js +2 -2
  32. package/es/table-filter/index.js +21 -21
  33. package/es/tag/index.js +1 -1
  34. package/es/verification-code/index.js +2 -2
  35. package/lib/cui.common.js +300 -268
  36. package/lib/cui.umd.js +300 -268
  37. package/lib/cui.umd.min.js +13 -13
  38. package/package.json +1 -1
  39. package/packages/big-table/src/BigTable.vue +16 -5
  40. package/packages/scale-view/scaleView.vue +7 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cnhis-design-vue",
3
- "version": "2.1.64",
3
+ "version": "2.1.65",
4
4
  "description": "前端业务UI库",
5
5
  "keyword": "cnhis-design-vue vue cnhis",
6
6
  "homepage": "http://dv.cnhis.com/",
@@ -44,7 +44,7 @@
44
44
  </div>
45
45
  <c-grid
46
46
  border
47
- show-overflow
47
+ :show-overflow="isShowOverflow"
48
48
  show-header-overflow
49
49
  highlight-hover-row
50
50
  highlight-current-row
@@ -88,8 +88,8 @@
88
88
  }"
89
89
  :row-style="getRowStyle"
90
90
  :edit-config="{ trigger: 'manual', mode: 'row', autoClear: false, showIcon: false }"
91
- :scroll-x="{ gt: 25 }"
92
- :scroll-y="{ gt: 50, mode: 'wheel' }"
91
+ :scroll-x="scrollXConfig"
92
+ :scroll-y="scrollYConfig"
93
93
  :expand-config="{
94
94
  lazy: true,
95
95
  accordion: columnConfig && columnConfig.accordion,
@@ -265,7 +265,10 @@ export default create({
265
265
  del: 'close'
266
266
  },
267
267
  tableHeight: '100%',
268
- allCheckedRows: []
268
+ allCheckedRows: [],
269
+ scrollXConfig: { enabled: true, gt: 25 },
270
+ scrollYConfig: { enabled: true, gt: 50, mode: 'wheel' },
271
+ isShowOverflow: true
269
272
  };
270
273
  },
271
274
  computed: {
@@ -1238,11 +1241,17 @@ export default create({
1238
1241
  // 配置列表
1239
1242
  let { selectType } = this.getOtherConfigInit() || {};
1240
1243
  let { tableNoSetting } = this;
1241
- let { isBatchSelect, fieldList, showButtonTop, isScanMultiTable } = map;
1244
+ let { isBatchSelect, fieldList, showButtonTop, isScanMultiTable, autoCellHeight } = map;
1242
1245
  if (selectType) {
1243
1246
  // 有设置 selectType 强制可选。
1244
1247
  isBatchSelect = 1;
1245
1248
  }
1249
+ // 如果表格单行需要内容撑开, 则把虚拟滚动关掉
1250
+ if (autoCellHeight) {
1251
+ this.scrollXConfig.enabled = false;
1252
+ this.scrollYConfig.enabled = false;
1253
+ this.isShowOverflow = false;
1254
+ }
1246
1255
  selectType = selectType || 'checkbox';
1247
1256
  // 扫码弹框 设置为radio
1248
1257
  let { listType } = this.tableOptions;
@@ -1400,6 +1409,8 @@ export default create({
1400
1409
  },
1401
1410
  // 2022/12/1 沈培均/方晶晶要求新增 如果有自定义提示就不显示表格自带的提示
1402
1411
  handleShowOverflow(item) {
1412
+ // 2023/03/17 新增单行高度由内容撑开, 不需要缺省
1413
+ if (!this.isShowOverflow) return false
1403
1414
  if (item.columnName == "operatorColumn") return false;
1404
1415
  // 选人组件 自己的tooltip
1405
1416
  if (item.attrType === "CANDIDATE_COMPONENTS") return false;
@@ -406,6 +406,7 @@ export default create({
406
406
  return function (item) {
407
407
  let { type } = item || {};
408
408
  let tempTile = this.config?.autoQuestionNumber === false ? item.showTitle : `${item.softcode}、${item.showTitle}`;
409
+ tempTile = this.html2Escape(tempTile);
409
410
  if (!this.isEvaluation(type)) return tempTile;
410
411
 
411
412
  let score = this.handleEvaluationScore(item);
@@ -1848,6 +1849,12 @@ export default create({
1848
1849
  handleEvaluationScore(ele) {
1849
1850
  let { minScore = 0, maxScore = 0, scoreType } = ele.scoreConfigs || {};
1850
1851
  return `(${maxScore}分)`;
1852
+ },
1853
+ html2Escape(sHtml) {
1854
+ if(!sHtml || typeof sHtml != 'string') return sHtml;
1855
+ return sHtml.replace(/[<>&"]/g,function(c){
1856
+ return {'<':'&lt;','>':'&gt;','&':'&amp;','"':'&quot;'}[c];
1857
+ });
1851
1858
  }
1852
1859
  }
1853
1860
  });