mirror of
https://gitee.com/dapppp/ruoyi-plus-vben5.git
synced 2026-03-08 07:31:09 +08:00
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:
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
4
packages/locales/src/langs/en-US/profile.json
Normal file
4
packages/locales/src/langs/en-US/profile.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"updatePassword": "Update Password",
|
||||
"updateBasicProfile": "Update Basic Profile"
|
||||
}
|
||||
4
packages/locales/src/langs/zh-CN/profile.json
Normal file
4
packages/locales/src/langs/zh-CN/profile.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"updatePassword": "更新密码",
|
||||
"updateBasicProfile": "更新基本信息"
|
||||
}
|
||||
Reference in New Issue
Block a user