nuxt-hs-ui 2.4.2 → 2.5.1
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/module.json
CHANGED
|
@@ -32,6 +32,9 @@ export declare const useHsMultiLang: import("pinia").StoreDefinition<"HsMultiLan
|
|
|
32
32
|
lang?: string;
|
|
33
33
|
changeLangFunc?: (lang: string) => Promise<void> | void;
|
|
34
34
|
}): void;
|
|
35
|
+
/** Text Ref */
|
|
35
36
|
tx(text: MultiLang, lang?: undefined): import("vue").ComputedRef<string>;
|
|
37
|
+
/** GetText */
|
|
38
|
+
gt(text: MultiLang, lang?: undefined): string;
|
|
36
39
|
}>;
|
|
37
40
|
export {};
|
|
@@ -48,6 +48,7 @@ export const useHsMultiLang = defineStore("HsMultiLang", {
|
|
|
48
48
|
);
|
|
49
49
|
},
|
|
50
50
|
// ---------------------
|
|
51
|
+
/** Text Ref */
|
|
51
52
|
tx(text, lang = void 0) {
|
|
52
53
|
const state = this.state;
|
|
53
54
|
return computed(() => {
|
|
@@ -61,6 +62,19 @@ export const useHsMultiLang = defineStore("HsMultiLang", {
|
|
|
61
62
|
state.showLog
|
|
62
63
|
);
|
|
63
64
|
});
|
|
65
|
+
},
|
|
66
|
+
/** GetText */
|
|
67
|
+
gt(text, lang = void 0) {
|
|
68
|
+
const state = this.state;
|
|
69
|
+
if (lang) {
|
|
70
|
+
return GetTextByMultiLang(text, lang, state.fallBack, state.showLog);
|
|
71
|
+
}
|
|
72
|
+
return GetTextByMultiLang(
|
|
73
|
+
text,
|
|
74
|
+
state.lang,
|
|
75
|
+
state.fallBack,
|
|
76
|
+
state.showLog
|
|
77
|
+
);
|
|
64
78
|
}
|
|
65
79
|
// ---------------------
|
|
66
80
|
}
|