@ticatec/uniface-element 0.1.70 → 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.
@@ -1,5 +1,5 @@
1
1
  import type { ButtonType } from "../button/ButtonType";
2
- import type { MouseClickHandler } from "..";
2
+ import type { MouseClickHandler } from "../common/MouseClickHandler";
3
3
  export default interface ButtonAction {
4
4
  /**
5
5
  * 按钮的文字
@@ -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
  */
@@ -602,6 +602,15 @@
602
602
  text-align: right; /* 默认右对齐 */
603
603
  padding-right: 16px;
604
604
  }
605
+ .uniface-common-editor input.number-editor:focus {
606
+ text-align: left; /* 聚焦时左对齐 */
607
+ }
608
+ .uniface-common-editor input.number-editor[readonly] {
609
+ text-align: right; /* readonly 时保持右对齐 */
610
+ }
611
+ .uniface-common-editor input.number-editor[readonly]:focus {
612
+ text-align: right; /* readonly 且聚焦时保持右对齐 */
613
+ }
605
614
  .uniface-common-editor input:focus {
606
615
  outline: none;
607
616
  }
@@ -3819,6 +3828,7 @@ root {
3819
3828
  border-right: 1px solid transparent;
3820
3829
  padding: var(--uniface-data-table-cell-padding, 3px 4px);
3821
3830
  position: relative;
3831
+ overflow: hidden;
3822
3832
  }
3823
3833
  .uniface-data-table .data-cell .sortable {
3824
3834
  cursor: pointer;
@@ -3841,6 +3851,12 @@ root {
3841
3851
  .uniface-data-table .data-row.alternative {
3842
3852
  background-color: var(--uniface-data-table-alter-row-bg, #f7f7f7);
3843
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
+ }
3844
3860
  .uniface-data-table.row-border .header-row, .uniface-data-table.row-border .data-row {
3845
3861
  border-bottom: 1px solid var(--uniface-data-table-inline-border-color, #CBD5E1);
3846
3862
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ticatec/uniface-element",
3
- "version": "0.1.70",
3
+ "version": "0.2.0",
4
4
  "description": "uniface web elements",
5
5
  "scripts": {
6
6
  "dev": "vite dev",