@newview/ui 1.1.38 → 1.1.40

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/README.md CHANGED
@@ -1,4 +1,10 @@
1
- ### 1.1.38
1
+ ### 1.1.40
2
+ 1、LuckySheet 从Excel导入后,预览边框不显示问题。
3
+
4
+ ### 1.1.39
5
+ 1、UploadFileList 新增分页控制
6
+
7
+ ### 1.1.37
2
8
  1、form组件新增type --- UploadFileList
3
9
 
4
10
  ### 1.1.37
@@ -184006,6 +184006,11 @@ var HtmlBase$1 = (
184006
184006
  1: "left",
184007
184007
  2: "right"
184008
184008
  };
184009
+ this.textVHAlign = {
184010
+ 0: "center",
184011
+ 1: "start",
184012
+ 2: "end"
184013
+ };
184009
184014
  this.defaultColWidth = 72;
184010
184015
  this.defaultRowHeight = 17;
184011
184016
  }
@@ -184036,12 +184041,13 @@ var HtmlBase$1 = (
184036
184041
  this.setCss(style2, "font-weight", objValue.bl == 1 ? "bold" : "normal");
184037
184042
  this.setCss(style2, "font-style", objValue.it == 1 ? "italic" : "normal");
184038
184043
  this.setCss(style2, "display", "flex");
184039
- this.setCss(style2, "align-items", "center");
184044
+ this.setCss(style2, "align-items", objValue.vt == void 0 ? "center" : this.textVHAlign[objValue.vt]);
184045
+ this.setCss(style2, "justify-content", objValue.ht == void 0 ? "center" : this.textVHAlign[objValue.ht]);
184046
+ this.setCss(style2, "text-align", objValue.ht == void 0 ? void 0 : this.textAlign[objValue.ht]);
184040
184047
  this.setCss(style2, "font-size", objValue.fs == void 0 ? void 0 : objValue.fs + "pt");
184041
184048
  this.setCss(style2, "line-height", objValue.fs == void 0 ? void 0 : objValue.fs + "pt");
184042
184049
  this.pushTextDecoration(style2, objValue.cl && objValue.cl == 1 ? "line-through" : void 0);
184043
184050
  this.pushTextDecoration(style2, objValue.un && objValue.un == 1 ? "underline" : void 0);
184044
- this.setCss(style2, "text-align", objValue.ht == void 0 ? void 0 : this.textAlign[objValue.ht]);
184045
184051
  this.setCss(style2, "margin", objValue.ht == 0 ? "0px auto" : void 0);
184046
184052
  if (style2["text-decoration"]) {
184047
184053
  style2["text-decoration"] = style2["text-decoration"].join(" ");
@@ -184097,6 +184103,8 @@ var HtmlCells$1 = (
184097
184103
  _this.columnWidths = {};
184098
184104
  _this.tdBorders = {};
184099
184105
  _this.imageDict = {};
184106
+ _this.startTds = {};
184107
+ _this.endTdRightStyle = {};
184100
184108
  _this.verticalAlign = {
184101
184109
  0: "middle",
184102
184110
  1: "top",
@@ -184354,6 +184362,34 @@ var HtmlCells$1 = (
184354
184362
  if (!isMerge) {
184355
184363
  tdBorders[key2].right = rightStyle ? rightStyle.borderNumber : 0;
184356
184364
  this.setCss(style2, "border-right", rightStyle ? rightStyle.css : void 0);
184365
+ } else if (td.isRender) {
184366
+ var endRowIndex = border.value.row_index + td.rowspan - 1;
184367
+ var endColIndex = border.value.col_index + td.colspan - 1;
184368
+ var endKey = endRowIndex + "_" + endColIndex;
184369
+ var endRightStyle = this.endTdRightStyle[endKey];
184370
+ if (endRightStyle != void 0) {
184371
+ tdBorders[key2].right = endRightStyle ? endRightStyle.borderNumber : 0;
184372
+ this.setCss(style2, "border-right", endRightStyle ? endRightStyle.css : void 0);
184373
+ } else {
184374
+ this.startTds[endKey] = { startRowIndex: border.value.row_index, startColIndex: border.value.col_index };
184375
+ }
184376
+ } else {
184377
+ var startRowCol = this.startTds[key2];
184378
+ if (startRowCol != void 0) {
184379
+ var startKey = startRowCol.startRowIndex + "_" + startRowCol.startColIndex;
184380
+ tdBorders[startKey] = tdBorders[startKey] || {
184381
+ style: {},
184382
+ left: 0,
184383
+ right: 0,
184384
+ top: 0,
184385
+ bottom: 0
184386
+ };
184387
+ var startStyle = tdBorders[startKey].style;
184388
+ tdBorders[startKey].right = rightStyle ? rightStyle.borderNumber : 0;
184389
+ this.setCss(startStyle, "border-right", rightStyle ? rightStyle.css : void 0);
184390
+ } else {
184391
+ this.endTdRightStyle[key2] = rightStyle;
184392
+ }
184357
184393
  }
184358
184394
  };
184359
184395
  HtmlCells2.prototype.parseTdBorders = function(borderInfo) {
@@ -184371,6 +184407,12 @@ var HtmlCells$1 = (
184371
184407
  }
184372
184408
  return tdBorders;
184373
184409
  };
184410
+ HtmlCells2.prototype.getValue = function(value, styles) {
184411
+ if (styles === void 0) {
184412
+ styles = "";
184413
+ }
184414
+ return value.replace("/ /g", "&nbsp;").replace(/\r\n/g, "<br/>").replace(/\n/g, "<br/>").replace(/{sup}/g, "<sup " + styles + ">").replace(/{\/sup}/g, "</sup>").replace(/{sub}/g, "<sub>").replace(/{\/sub}/g, "</sub>");
184415
+ };
184374
184416
  HtmlCells2.prototype.isImage = function(value) {
184375
184417
  return this.imageDict[value] != void 0;
184376
184418
  };
@@ -184398,12 +184440,6 @@ var HtmlCells$1 = (
184398
184440
  var base64Url = this.imageDict[tdValue.value];
184399
184441
  return "<div " + style2 + '><img src="' + base64Url + '" style="width: 100%; height: 100%; object-fit: contain;" /></div>';
184400
184442
  };
184401
- HtmlCells2.prototype.getValue = function(value, styles) {
184402
- if (styles === void 0) {
184403
- styles = "";
184404
- }
184405
- return value.replace(/\r\n/g, "<br/>").replace(/\n/g, "<br/>").replace(/{sup}/g, "<sup " + styles + ">").replace(/{\/sup}/g, "</sup>").replace(/{sub}/g, "<sub>").replace(/{\/sub}/g, "</sub>");
184406
- };
184407
184443
  HtmlCells2.prototype.countTdStaticSize = function(tdcell, Rindex, Cindex, border) {
184408
184444
  var cellwidth = 0;
184409
184445
  var cellheight = 0;
@@ -184556,7 +184592,7 @@ var HtmlCells$1 = (
184556
184592
  style2 = style2.replace("flex", "block");
184557
184593
  return "<div " + style2 + " " + cellid + '><div style="' + transstr + '">' + this.getValue(tdValue.value, 'style="top:0"') + "</div></div>";
184558
184594
  }
184559
- return "<div " + style2 + " " + cellid + '><div style="margin:auto;' + transstr + '">' + this.getValue(tdValue.value, 'style="top:0"') + "</div></div>";
184595
+ return "<div " + style2 + " " + cellid + '><div style="maring:1px auto;' + transstr + '">' + this.getValue(tdValue.value, 'style="top:0"') + "</div></div>";
184560
184596
  };
184561
184597
  HtmlCells2.prototype.getTdContent = function(cellid, td, border, ishidenrow) {
184562
184598
  if (ishidenrow === void 0) {