fix type error of i18n.ts
This commit is contained in:
parent
2505b58f99
commit
ee3ce22b74
1 changed files with 8 additions and 7 deletions
|
@ -38,13 +38,14 @@ export default defineComponent({
|
|||
|
||||
return h(
|
||||
this.tag,
|
||||
parsed.map((x) =>
|
||||
typeof x === "string"
|
||||
? this.textTag
|
||||
? h(this.textTag, x)
|
||||
: x
|
||||
: this.$slots[x.arg](),
|
||||
),
|
||||
parsed.map((x) => {
|
||||
if (typeof x === "string") {
|
||||
return this.textTag ? h(this.textTag, x) : x;
|
||||
} else {
|
||||
const t = this.$slots[x.arg];
|
||||
return t ? t() : `I18n[${x.arg}]`;
|
||||
}
|
||||
}),
|
||||
);
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue