i18n引入

This commit is contained in:
2020-10-19 15:24:55 +08:00
parent 448a305abe
commit 8c6ab14103
4 changed files with 43 additions and 0 deletions

View File

@@ -14,6 +14,9 @@ const createI18n = (config: Config) => ({
messages: config.messages,
$t(key: string) {
return this.messages[this.locale.value][key];
},
$s(){
return this.locale.value
}
});