This commit is contained in:
dap
2024-08-31 16:11:35 +08:00
34 changed files with 476 additions and 345 deletions

View File

@@ -23,7 +23,7 @@ const defaultValue = computed(() => {
</script>
<template>
<div class="card-box w-full px-4 pb-5 pt-3 shadow">
<div class="card-box w-full px-4 pb-5 pt-3">
<Tabs :default-value="defaultValue">
<TabsList>
<template v-for="tab in tabs" :key="tab.label">

View File

@@ -27,6 +27,6 @@
"@vben/utils": "workspace:*",
"vue": "^3.4.38",
"vue-router": "^4.4.3",
"watermark-js-plus": "^1.5.3"
"watermark-js-plus": "^1.5.4"
}
}

View File

@@ -36,7 +36,7 @@ const logoSource = computed(() => preferences.logo.source);
<!-- 左侧认证面板 -->
<AuthenticationFormView
v-if="authPanelLeft"
class="min-h-full w-2/5"
class="min-h-full w-2/5 flex-1"
transition-name="slide-left"
>
<template v-if="toolbar" #toolbar>

View File

@@ -6,7 +6,7 @@ import { computed } from 'vue';
import { useRoute, useRouter } from 'vue-router';
import { $t } from '@vben/locales';
import { VbenBackgroundBreadcrumb, VbenBreadcrumb } from '@vben-core/shadcn-ui';
import { VbenBreadcrumbView } from '@vben-core/shadcn-ui';
interface Props {
hideWhenOnlyOne?: boolean;
@@ -62,17 +62,10 @@ function handleSelect(path: string) {
}
</script>
<template>
<VbenBreadcrumb
v-if="type === 'normal'"
:breadcrumbs="breadcrumbs"
:show-icon="showIcon"
class="ml-2"
@select="handleSelect"
/>
<VbenBackgroundBreadcrumb
v-if="type === 'background'"
<VbenBreadcrumbView
:breadcrumbs="breadcrumbs"
:show-icon="showIcon"
:style-type="type"
class="ml-2"
@select="handleSelect"
/>

View File

@@ -61,7 +61,7 @@ async function checkForUpdates() {
}
function handleNotice(versionTag: string) {
const { dismiss } = toast({
action: h('div', [
action: h('div', { class: 'inline-flex items-center' }, [
h(
ToastAction,
{
@@ -76,7 +76,8 @@ function handleNotice(versionTag: string) {
ToastAction,
{
altText: $t('common.refresh'),
class: 'bg-primary hover:bg-primary-hover mx-1',
class:
'bg-primary text-primary-foreground hover:bg-primary-hover mx-1',
onClick: () => {
lastVersionTag.value = versionTag;
window.location.reload();
@@ -94,7 +95,7 @@ function handleNotice(versionTag: string) {
}
function start() {
// 每5分钟检查一次
// 每 checkUpdatesInterval(默认值为1) 分钟检查一次
timer.value = setInterval(
checkForUpdates,
props.checkUpdatesInterval * 60 * 1000,

View File

@@ -87,7 +87,7 @@ export const errorMessageResponseInterceptor = (
errMsg = $t('fallback.http.requestTimeout');
}
if (errMsg) {
makeErrorMessage?.(errMsg);
makeErrorMessage?.(errMsg, error);
return Promise.reject(error);
}
@@ -119,7 +119,7 @@ export const errorMessageResponseInterceptor = (
errorMessage = $t('fallback.http.internalServerError');
}
}
makeErrorMessage?.(errorMessage);
makeErrorMessage?.(errorMessage, error);
return Promise.reject(error);
},
};

View File

@@ -28,7 +28,7 @@ interface ResponseInterceptorConfig<T = any> {
rejected?: (error: any) => any;
}
type MakeErrorMessageFn = (message: string) => void;
type MakeErrorMessageFn = (message: string, error: any) => void;
interface HttpResponse<T = any> {
code: number;