Merge branch 'main' into main

This commit is contained in:
Jin Mao
2025-09-15 08:08:31 +08:00
committed by GitHub
6 changed files with 314 additions and 3 deletions

View File

@@ -35,6 +35,10 @@ interface Props {
* @zh_CN 按钮文本
*/
submitButtonText?: string;
/**
* @zh_CN 是否显示返回按钮
*/
showBack?: boolean;
}
defineOptions({
@@ -43,6 +47,7 @@ defineOptions({
const props = withDefaults(defineProps<Props>(), {
loading: false,
showBack: true,
loginPath: '/auth/login',
submitButtonText: '',
subTitle: '',
@@ -110,7 +115,7 @@ defineExpose({
{{ submitButtonText || $t('common.login') }}
</slot>
</VbenButton>
<VbenButton class="mt-4 w-full" variant="outline" @click="goToLogin()">
<VbenButton v-if="showBack" class="mt-4 w-full" variant="outline" @click="goToLogin()">
{{ $t('common.back') }}
</VbenButton>
</div>

View File

@@ -35,6 +35,10 @@ interface Props {
* @zh_CN 描述
*/
description?: string;
/**
* @zh_CN 是否显示返回按钮
*/
showBack?: boolean;
}
defineOptions({
@@ -44,6 +48,7 @@ defineOptions({
const props = withDefaults(defineProps<Props>(), {
description: '',
loading: false,
showBack: true,
loginPath: '/auth/login',
submitButtonText: '',
subTitle: '',
@@ -88,7 +93,7 @@ function goToLogin() {
</p>
</div>
<VbenButton class="mt-4 w-full" variant="outline" @click="goToLogin()">
<VbenButton v-if="showBack" class="mt-4 w-full" variant="outline" @click="goToLogin()">
{{ $t('common.back') }}
</VbenButton>
</div>