chore: 给个人中心的2个按钮加上 i18n (#7138)

* fix: 个人中心按钮i18n

* fix: eslint format

* fix: 调整label宽度让英文显示在一行

* chore: 调整label小点

* fix: import

---------

Co-authored-by: Jin Mao <50581550+jinmao88@users.noreply.github.com>
This commit is contained in:
programmer
2026-01-26 16:12:09 +08:00
committed by GitHub
parent 6e8315ab40
commit 6a9012e5e4
4 changed files with 15 additions and 2 deletions

View File

@@ -5,6 +5,8 @@ import type { VbenFormSchema } from '@vben-core/form-ui';
import { computed, reactive } from 'vue';
import { $t } from '@vben/locales';
import { useVbenForm } from '@vben-core/form-ui';
import { VbenButton } from '@vben-core/shadcn-ui';
@@ -50,7 +52,7 @@ defineExpose({
<div @keydown.enter.prevent="handleSubmit">
<Form />
<VbenButton type="submit" class="mt-4" @click="handleSubmit">
更新基本信息
{{ $t('profile.updateBasicProfile') }}
</VbenButton>
</div>
</template>

View File

@@ -5,6 +5,8 @@ import type { VbenFormSchema } from '@vben-core/form-ui';
import { computed, reactive } from 'vue';
import { $t } from '@vben/locales';
import { useVbenForm } from '@vben-core/form-ui';
import { VbenButton } from '@vben-core/shadcn-ui';
@@ -23,6 +25,7 @@ const emit = defineEmits<{
const [Form, formApi] = useVbenForm(
reactive({
commonConfig: {
labelWidth: 130,
// 所有表单项
componentProps: {
class: 'w-full',
@@ -50,7 +53,7 @@ defineExpose({
<div>
<Form />
<VbenButton type="submit" class="mt-4" @click="handleSubmit">
更新密码
{{ $t('profile.updatePassword') }}
</VbenButton>
</div>
</template>

View File

@@ -0,0 +1,4 @@
{
"updatePassword": "Update Password",
"updateBasicProfile": "Update Basic Profile"
}

View File

@@ -0,0 +1,4 @@
{
"updatePassword": "更新密码",
"updateBasicProfile": "更新基本信息"
}