nuxt-hs-ui 2.0.1 → 2.0.3
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
package/dist/module.mjs
CHANGED
|
@@ -65,6 +65,9 @@ const module = defineNuxtModule({
|
|
|
65
65
|
async setup(_options, _nuxt) {
|
|
66
66
|
const resolver = createResolver(import.meta.url);
|
|
67
67
|
const resolve = resolver.resolve;
|
|
68
|
+
const runtimeDir = resolve("./runtime");
|
|
69
|
+
const isDevelopment = runtimeDir.endsWith("src/runtime") || runtimeDir.endsWith("src\\runtime");
|
|
70
|
+
const extension = isDevelopment ? "scss" : "css";
|
|
68
71
|
const twReqConfig = {
|
|
69
72
|
content: {
|
|
70
73
|
files: [
|
|
@@ -106,8 +109,8 @@ const module = defineNuxtModule({
|
|
|
106
109
|
path: resolve("runtime/components/misc"),
|
|
107
110
|
prefix: _options.prefix.misc
|
|
108
111
|
});
|
|
109
|
-
_nuxt.options.css.push(resolve("runtime/style.
|
|
110
|
-
_nuxt.options.css.push(resolve("runtime/tailwind.
|
|
112
|
+
_nuxt.options.css.push(resolve("runtime/style." + extension));
|
|
113
|
+
_nuxt.options.css.push(resolve("runtime/tailwind." + extension));
|
|
111
114
|
_nuxt.options.css.push(resolve("runtime/assets/flatpickr-dark.css"));
|
|
112
115
|
_nuxt.options.css.push(
|
|
113
116
|
resolve("runtime/assets/flatpickr-month-select-style.css")
|
|
@@ -11,6 +11,7 @@ export declare const useHsMultiLang: import("pinia").StoreDefinition<"HsMultiLan
|
|
|
11
11
|
init(arg: {
|
|
12
12
|
lang?: string;
|
|
13
13
|
setDayjsLang?: (lang: string) => void;
|
|
14
|
+
changeLangFunc?: (lang: string) => Promise<void> | void;
|
|
14
15
|
}): void;
|
|
15
16
|
tx(text: MultiLang, lang?: undefined): import("vue").ComputedRef<string>;
|
|
16
17
|
}>;
|
|
@@ -20,6 +20,8 @@ export const useHsMultiLang = defineStore("HsMultiLang", {
|
|
|
20
20
|
init(arg) {
|
|
21
21
|
const state = this.state;
|
|
22
22
|
if (state.isInit) return;
|
|
23
|
+
const changeLangFunc = arg.changeLangFunc === void 0 ? () => {
|
|
24
|
+
} : arg.changeLangFunc;
|
|
23
25
|
const setDayjsLang = arg.setDayjsLang !== void 0 ? arg.setDayjsLang : (lang) => {
|
|
24
26
|
if (lang === "ja") {
|
|
25
27
|
dayjs.locale(ja);
|
|
@@ -35,6 +37,7 @@ export const useHsMultiLang = defineStore("HsMultiLang", {
|
|
|
35
37
|
} else {
|
|
36
38
|
setDayjsLang(lang);
|
|
37
39
|
}
|
|
40
|
+
changeLangFunc(lang);
|
|
38
41
|
},
|
|
39
42
|
{ immediate: true }
|
|
40
43
|
);
|