集成 vue-i18n 支持国际化

This commit is contained in:
就眠儀式
2022-02-09 17:40:33 +08:00
parent 4325ca3bff
commit 70d4f66b96
7 changed files with 62 additions and 7 deletions

View File

@@ -6,6 +6,9 @@ export default {
<script setup lang="ts">
import "./index.less"
import { useI18n } from 'vue-i18n'
const { t } = useI18n();
export interface LayInputProps {
name?: string;
@@ -15,7 +18,8 @@ export interface LayInputProps {
placeholder?: string;
}
const props = defineProps<LayInputProps>();
const props = withDefaults(defineProps<LayInputProps>(), {
});
const emit = defineEmits(["update:modelValue", "input", "focus", "blur"]);