@ticatec/uniface-element 0.1.56 → 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.
- package/dist/page/GoBack.d.ts +1 -0
- package/dist/page/GoBack.js +1 -0
- package/dist/page/Page.svelte +3 -1
- package/dist/page/Page.svelte.d.ts +2 -0
- package/dist/page/PageHeader.svelte +6 -0
- package/dist/page/PageHeader.svelte.d.ts +2 -0
- package/dist/popup-hint/PopupHint.svelte +2 -5
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type GoBack = () => any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/page/Page.svelte
CHANGED
|
@@ -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
|
-
|
|
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('
|
|
38
|
+
targetElement.removeEventListener('mouseleave', hideHint);
|
|
42
39
|
}
|
|
43
40
|
targetElement = null;
|
|
44
41
|
};
|