Merge branch 'main' of https://github.com/vbenjs/vue-vben-admin
This commit is contained in:
@@ -264,7 +264,7 @@ function createComponentProps(slotProps: Record<string, any>) {
|
||||
<component
|
||||
:is="fieldComponent"
|
||||
:class="{
|
||||
'border-destructive focus:border-destructive hover:border-destructive/80':
|
||||
'border-destructive focus:border-destructive hover:border-destructive/80 focus:shadow-[0_0_0_2px_rgba(255,38,5,0.06)]':
|
||||
isInValid,
|
||||
}"
|
||||
v-bind="createComponentProps(slotProps)"
|
||||
|
@@ -7,12 +7,15 @@ import { ToastAction, useToast } from '@vben-core/shadcn-ui';
|
||||
interface Props {
|
||||
// 轮训时间,分钟
|
||||
checkUpdatesInterval?: number;
|
||||
// 检查更新的地址
|
||||
checkUpdateUrl?: string;
|
||||
}
|
||||
|
||||
defineOptions({ name: 'CheckUpdates' });
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
checkUpdatesInterval: 1,
|
||||
checkUpdateUrl: import.meta.env.BASE_URL || '/',
|
||||
});
|
||||
|
||||
const lastVersionTag = ref('');
|
||||
@@ -28,7 +31,7 @@ async function getVersionTag() {
|
||||
) {
|
||||
return null;
|
||||
}
|
||||
const response = await fetch('/', {
|
||||
const response = await fetch(props.checkUpdateUrl, {
|
||||
cache: 'no-cache',
|
||||
method: 'HEAD',
|
||||
});
|
||||
|
Reference in New Issue
Block a user