@ticatec/uniface-element 0.1.69 → 0.1.71

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
  * 按钮的文字
@@ -11,6 +11,7 @@
11
11
 
12
12
  type OnSelectChange = (item: any) => void;
13
13
  type OnItemDblClick = (item: any) => void;
14
+ type OnItemClick = (item: any) => void;
14
15
 
15
16
  export let readonly: boolean = false;
16
17
  export let style: string | null = null;
@@ -26,6 +27,7 @@
26
27
  export let item$props: any = null;
27
28
  export let onSelectChange: OnSelectChange = null as unknown as OnSelectChange;
28
29
  export let onItemDblClick: OnItemDblClick = null as unknown as OnItemDblClick;
30
+ export let onItemClick: OnItemClick = null as unknown as OnItemDblClick;
29
31
 
30
32
  export let title: string = null as unknown as string;
31
33
  export let round: boolean = false;
@@ -39,10 +41,14 @@
39
41
  let filteredList: Array<any>;
40
42
 
41
43
  const handleItemClick = (item: any) => (e: MouseEvent) => {
42
- if (selectMode == 'single' && readonly == false) {
43
- if (selectedItem != item) {
44
- selectedItem = item;
45
- onSelectChange?.(item);
44
+ if (readonly == false) {
45
+ if (selectMode == 'single') {
46
+ if (selectedItem != item) {
47
+ selectedItem = item;
48
+ onSelectChange?.(item);
49
+ }
50
+ } else {
51
+ onItemClick?.(item);
46
52
  }
47
53
  }
48
54
  }
@@ -28,6 +28,7 @@ declare const ListBox: $$__sveltets_2_IsomorphicComponent<{
28
28
  item$props?: any;
29
29
  onSelectChange?: (item: any) => void;
30
30
  onItemDblClick?: (item: any) => void;
31
+ onItemClick?: (item: any) => void;
31
32
  title?: string;
32
33
  round?: boolean;
33
34
  footer$style?: string | null;
@@ -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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ticatec/uniface-element",
3
- "version": "0.1.69",
3
+ "version": "0.1.71",
4
4
  "description": "uniface web elements",
5
5
  "scripts": {
6
6
  "dev": "vite dev",