@ticatec/uniface-element 0.1.55 → 0.1.57

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.
@@ -0,0 +1 @@
1
+ export type GoBack = () => any;
@@ -0,0 +1 @@
1
+ export {};
@@ -1,6 +1,7 @@
1
1
  <script lang="ts">
2
2
 
3
3
  import PageHeader from "./PageHeader.svelte";
4
+ import type {GoBack} from "./GoBack";
4
5
 
5
6
  export let title: string = '';
6
7
  export let comment: string = null as unknown as string;
@@ -8,6 +9,7 @@
8
9
  export let content$style: string = '';
9
10
  export let round: boolean = false;
10
11
  export let shadow: boolean = true;
12
+ export let goBack: GoBack | null;
11
13
  export let style: string = '';
12
14
 
13
15
  </script>
@@ -16,7 +18,7 @@
16
18
  <div class="uniface-page" class:shadow class:round>
17
19
  <div class="uniface-page-header" style={header$style}>
18
20
  <slot name="page-header">
19
- <PageHeader {title} {comment}>
21
+ <PageHeader {title} {comment} {goBack}>
20
22
  <slot name="header-ext"></slot>
21
23
  </PageHeader>
22
24
  </slot>
@@ -1,3 +1,4 @@
1
+ import type { GoBack } from "./GoBack";
1
2
  interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
2
3
  new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
3
4
  $$bindings?: Bindings;
@@ -23,6 +24,7 @@ declare const Page: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWithC
23
24
  content$style?: string;
24
25
  round?: boolean;
25
26
  shadow?: boolean;
27
+ goBack: GoBack | null;
26
28
  style?: string;
27
29
  }, {
28
30
  'page-header': {};
@@ -1,9 +1,15 @@
1
1
  <script lang="ts">
2
+ import Icon from "../icon";
3
+ import type {GoBack} from "./GoBack";
2
4
 
3
5
  export let title: string;
4
6
  export let comment: string = '';
7
+ export let goBack: GoBack | null;
5
8
 
6
9
  </script>
10
+ <div style="padding: 0 12px; visibility: {goBack != null ? 'visible' : 'hidden' }">
11
+ <Icon name="icon_google_keyboard_backspace" onClick={goBack}></Icon>
12
+ </div>
7
13
  <div class="page-topic">
8
14
  <span>{title}</span>
9
15
  </div>
@@ -1,3 +1,4 @@
1
+ import type { GoBack } from "./GoBack";
1
2
  interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
2
3
  new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
3
4
  $$bindings?: Bindings;
@@ -19,6 +20,7 @@ type $$__sveltets_2_PropsWithChildren<Props, Slots> = Props & (Slots extends {
19
20
  declare const PageHeader: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWithChildren<{
20
21
  title: string;
21
22
  comment?: string;
23
+ goBack: GoBack | null;
22
24
  }, {
23
25
  default: {};
24
26
  }>, {
@@ -15,14 +15,11 @@
15
15
 
16
16
  // 显示提示框函数
17
17
  const show: ShowHint = async (element: Element, text: string, x: number, y: number) => {
18
- if (targetElement != null) {
19
- targetElement.addEventListener('mouseout', hideHint);
20
- }
18
+ element.addEventListener('mouseleave', hideHint);
21
19
  message = text;
22
20
  calculatePosition(x, y);
23
21
  setTimeout(()=> {
24
22
  if (targetElement == element) {
25
- targetElement.addEventListener('mouseout', hideHint);
26
23
  hintVisible = true;
27
24
  }
28
25
  }, 500);
@@ -38,7 +35,7 @@
38
35
  const hideHint = () => {
39
36
  hintVisible = false;
40
37
  if (targetElement) {
41
- targetElement.removeEventListener('mouseout', hideHint);
38
+ targetElement.removeEventListener('mouseleave', hideHint);
42
39
  }
43
40
  targetElement = null;
44
41
  };
@@ -0,0 +1,2 @@
1
+ import PopupHint from "./PopupHint.svelte";
2
+ export default PopupHint;
@@ -0,0 +1,2 @@
1
+ import PopupHint from "./PopupHint.svelte";
2
+ export default PopupHint;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ticatec/uniface-element",
3
- "version": "0.1.55",
3
+ "version": "0.1.57",
4
4
  "description": "uniface web elements",
5
5
  "scripts": {
6
6
  "dev": "vite dev",
@@ -260,6 +260,10 @@
260
260
  "types": "./dist/pagination-panel/index.d.ts",
261
261
  "import": "./dist/pagination-panel/index.js"
262
262
  },
263
+ "./PopupHint": {
264
+ "types": "./dist/popup-hint/index.d.ts",
265
+ "import": "./dist/popup-hint/index.js"
266
+ },
263
267
  "./ProgressBar": {
264
268
  "types": "./dist/progress-bar/index.d.ts",
265
269
  "import": "./dist/progress-bar/index.js"