@ticatec/uniface-element 0.1.71 → 0.2.0

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.
@@ -47,6 +47,9 @@ export default class UniDataTable {
47
47
  if (col.visible != false) {
48
48
  this._frozenWidth += col.width;
49
49
  colStyle += `#tab-${this.id} .fz_col-${idx - inv} {width: ${col.width}px; text-align: ${col.align ?? 'left'}}\n`;
50
+ if (col.warp) {
51
+ colStyle += `#tab-${this.id} .fz_col-${idx - inv}>div {white-space: wrap}\n`;
52
+ }
50
53
  }
51
54
  else {
52
55
  inv++;
@@ -57,6 +60,9 @@ export default class UniDataTable {
57
60
  if (col.visible != false) {
58
61
  this._width += col.width;
59
62
  colStyle += `#tab-${this.id} .col-${idx - inv} { width: ${col.width}px ; text-align: ${col.align ?? 'left'} }\n`;
63
+ if (col.warp) {
64
+ colStyle += `#tab-${this.id} .col-${idx - inv}>div {white-space: wrap}\n`;
65
+ }
60
66
  }
61
67
  else {
62
68
  inv++;
@@ -23,6 +23,10 @@ export default interface DataColumn {
23
23
  */
24
24
  width: number;
25
25
  minWidth?: number;
26
+ /**
27
+ * 是否可以换行,默认为false
28
+ */
29
+ warp?: boolean;
26
30
  /**
27
31
  * 单元格转换函数
28
32
  */
@@ -3828,6 +3828,7 @@ root {
3828
3828
  border-right: 1px solid transparent;
3829
3829
  padding: var(--uniface-data-table-cell-padding, 3px 4px);
3830
3830
  position: relative;
3831
+ overflow: hidden;
3831
3832
  }
3832
3833
  .uniface-data-table .data-cell .sortable {
3833
3834
  cursor: pointer;
@@ -3850,6 +3851,12 @@ root {
3850
3851
  .uniface-data-table .data-row.alternative {
3851
3852
  background-color: var(--uniface-data-table-alter-row-bg, #f7f7f7);
3852
3853
  }
3854
+ .uniface-data-table .data-row .data-cell > div {
3855
+ width: 100%;
3856
+ overflow: hidden;
3857
+ white-space: nowrap;
3858
+ text-overflow: ellipsis;
3859
+ }
3853
3860
  .uniface-data-table.row-border .header-row, .uniface-data-table.row-border .data-row {
3854
3861
  border-bottom: 1px solid var(--uniface-data-table-inline-border-color, #CBD5E1);
3855
3862
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ticatec/uniface-element",
3
- "version": "0.1.71",
3
+ "version": "0.2.0",
4
4
  "description": "uniface web elements",
5
5
  "scripts": {
6
6
  "dev": "vite dev",