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

@@ -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,