cnhis-design-vue 2.1.42 → 2.1.43

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cnhis-design-vue",
3
- "version": "2.1.42",
3
+ "version": "2.1.43",
4
4
  "description": "前端业务UI库",
5
5
  "keyword": "cnhis-design-vue vue cnhis",
6
6
  "homepage": "http://dv.cnhis.com/",
@@ -1314,6 +1314,7 @@ export default create({
1314
1314
  sortable = false;
1315
1315
  }
1316
1316
 
1317
+ let showOverflow = this.handleShowOverflow(item);
1317
1318
  const col = Object.assign(item, {
1318
1319
  // 全部行编辑 隐藏“操作”
1319
1320
  visible: item.columnName == 'operatorColumn' ? (this.isEditAllRow ? false : showButtonTop == 0) : item.isShow == 1,
@@ -1328,7 +1329,7 @@ export default create({
1328
1329
 
1329
1330
  headerClassName: 'mycolumn', // 文本溢出处理('tooltip' vxe-table当前版本存在bug)
1330
1331
  // showHeaderOverflow: "title",
1331
- showOverflow: item.columnName == 'operatorColumn' ? false : 'title',
1332
+ showOverflow: showOverflow,
1332
1333
  treeNode: treeNode,
1333
1334
  type: type,
1334
1335
  slots: {
@@ -1377,6 +1378,25 @@ export default create({
1377
1378
  this.columnLen = currentColumns.filter(item => item.visible).length;
1378
1379
  return columns;
1379
1380
  },
1381
+ // 2022/12/1 沈培均/方晶晶要求新增 如果有自定义提示就不显示表格自带的提示
1382
+ handleShowOverflow(item) {
1383
+ if (item.columnName == "operatorColumn") return false;
1384
+ let {showSetting} = item.settingObj || {}
1385
+ if (!showSetting || !showSetting.length) return 'title';
1386
+ let hasTips = 'title';
1387
+ let i = 0, len = showSetting.length, v;
1388
+ for(; i < len; i++) {
1389
+ v = showSetting[i];
1390
+ if (v?.filter?.length) {
1391
+ let tips = v.filter.some(l => l.tips);
1392
+ if (tips) {
1393
+ hasTips = false;
1394
+ break;
1395
+ }
1396
+ }
1397
+ }
1398
+ return hasTips;
1399
+ },
1380
1400
  // 分组表头处理
1381
1401
  handleGroupColums(columns) {
1382
1402
  let { rowGroupSetting } = this;
@@ -253,7 +253,6 @@ export default {
253
253
  }
254
254
 
255
255
  const eventStyle = { selectable: false, evented: false };
256
- const types = ['arrow', '+', 'shjs', 'shks', 'cg', 'jxtq', 'qgcg', 'zrhz'];
257
256
  leftTitleList.forEach(async (v, i) => {
258
257
  const baseTop = canvasHeight - lableMargin[1];
259
258
  const top = baseTop - i * lableLineHeight;
@@ -269,14 +268,13 @@ export default {
269
268
  ...defaultVaule.style,
270
269
  id: pointId
271
270
  });
272
- const isOriginXCenter = types.includes(v.type);
273
- const iconLeft = isOriginXCenter ? text.width + text.left + 10 : text.width + text.left + 5;
271
+ const iconLeft = text.width + text.left + 10;
274
272
  const option = {
275
273
  left: iconLeft,
276
274
  top,
277
275
  ...v.pointAttr,
278
276
  originY: 'center',
279
- originX: isOriginXCenter ? 'center' : 'left',
277
+ originX: 'center',
280
278
  lineAttr: v.lineAttr || '',
281
279
  pointAttr: v.pointAttr,
282
280
  id: pointId,