nuxt-hs-ui 2.4.1 → 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
|
@@ -164,8 +164,7 @@ const iconDisabled = computed(() => {
|
|
|
164
164
|
const slots = useSlots();
|
|
165
165
|
const hasHeader = computed(() => {
|
|
166
166
|
if (props.label.length !== 0) return true;
|
|
167
|
-
if (props.require) return true;
|
|
168
|
-
if (props.readonly) return true;
|
|
167
|
+
if (props.require && !props.readonly) return true;
|
|
169
168
|
// if (slots.label) return true;
|
|
170
169
|
if (slots["label-prepend"]) return true;
|
|
171
170
|
if (slots["label-append"]) return true;
|
|
@@ -201,9 +200,6 @@ const hasHeader = computed(() => {
|
|
|
201
200
|
<div class="flex-1"></div>
|
|
202
201
|
<div class="flex-none flex gap-2">
|
|
203
202
|
<slot name="header-right" :default-class="headerIconClass" />
|
|
204
|
-
<!-- <div v-if="props.readonly" :class="headerIconClass" class="text-dark">
|
|
205
|
-
<span data-type="readonly">readonly</span>
|
|
206
|
-
</div> -->
|
|
207
203
|
<div
|
|
208
204
|
v-if="props.require && !props.readonly"
|
|
209
205
|
:class="headerIconClass"
|
|
@@ -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
|
}
|