@mythpe/quasar-ui-qui 0.1.7 → 0.1.9
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/package.json
CHANGED
|
@@ -111,7 +111,7 @@ const emit = defineEmits<Emits>()
|
|
|
111
111
|
|
|
112
112
|
const { __, props: pluginOptions } = useMyth()
|
|
113
113
|
const helper = useBindInput<P & Props>(() => props, 'select', () => ({ choose: !0 }))
|
|
114
|
-
const { theme, hasTopLabel, getLabel,
|
|
114
|
+
const { theme, hasTopLabel, getLabel, getAutocompleteAttribute, inputRules, getProp } = helper
|
|
115
115
|
const inputScope = useField<Props['modelValue']>(() => props.name, inputRules, {
|
|
116
116
|
syncVModel: !0,
|
|
117
117
|
label: getLabel,
|
|
@@ -239,8 +239,8 @@ defineOptions({
|
|
|
239
239
|
autocomplete: getAutocompleteAttribute || undefined,
|
|
240
240
|
clearable: viewMode ? !1 : clearable,
|
|
241
241
|
hint: hint ? __(hint) : undefined,
|
|
242
|
-
label: viewMode && hasTopLabel ? undefined : (
|
|
243
|
-
modelValue: value
|
|
242
|
+
label: viewMode && hasTopLabel ? undefined : (getLabel || undefined),
|
|
243
|
+
modelValue: value
|
|
244
244
|
}"
|
|
245
245
|
v-on="listeners"
|
|
246
246
|
>
|
|
@@ -64,7 +64,7 @@ export const useBindInput = <P extends G = G> (Props: MaybeRefOrGetter<P>, key:
|
|
|
64
64
|
})
|
|
65
65
|
const getLabel = computed<string | undefined>(() => {
|
|
66
66
|
const k = nameLabel.value
|
|
67
|
-
if (k && k.indexOf('.*.')) {
|
|
67
|
+
if (k && k.indexOf('.*.') !== -1) {
|
|
68
68
|
return __(k.split('.').pop()) || undefined
|
|
69
69
|
}
|
|
70
70
|
return k ? (__(k) || undefined) : undefined
|
|
@@ -24,7 +24,7 @@ export const useMyth = () => {
|
|
|
24
24
|
const $route = useRoute()
|
|
25
25
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
26
26
|
// @ts-ignore
|
|
27
|
-
const __ = (key: any, ...rest: unknown[]) => !key ?
|
|
27
|
+
const __ = (key: any, ...rest: unknown[]) => !key ? key : te(`attributes.${key}`) ? t(`attributes.${key}`, ...rest) : te(key) ? t(key, ...rest) : key
|
|
28
28
|
const getPageTitle = (route?: RouteLocationNormalizedLoaded | number | string, number?: number | string): string => {
|
|
29
29
|
if (typeof route !== 'object') {
|
|
30
30
|
number = route
|
|
@@ -56,6 +56,8 @@ export const useMyth = () => {
|
|
|
56
56
|
const pluralize = Str.pascalCase(lodash.pluralize(lastRouteName))
|
|
57
57
|
const singular = Str.pascalCase(lodash.singularize(lastRouteName))
|
|
58
58
|
const keys = lodash.filter(lodash.uniq([
|
|
59
|
+
`routes.${routeName}`,
|
|
60
|
+
`routes.${routePath}`,
|
|
59
61
|
`${lastRouteName}Page.title`,
|
|
60
62
|
`${lodash.camelCase(lastRouteName)}Page.title`,
|
|
61
63
|
`choice.${pluralize}`,
|
|
@@ -71,14 +73,6 @@ export const useMyth = () => {
|
|
|
71
73
|
let str: string | null = null
|
|
72
74
|
let k: string | any
|
|
73
75
|
|
|
74
|
-
if (te((k = `routes.${routeName}`)) && lodash.isString((str = t(k)))) {
|
|
75
|
-
return str
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
if (te((k = `routes.${routePath}`)) && lodash.isString((str = t(k)))) {
|
|
79
|
-
return str
|
|
80
|
-
}
|
|
81
|
-
|
|
82
76
|
for (const f in keys) {
|
|
83
77
|
if (!(k = keys[f])) {
|
|
84
78
|
continue
|