feat: add upgrade prompt
This commit is contained in:
parent
b0c0b916fd
commit
ea5c66b6eb
|
|
@ -0,0 +1,22 @@
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { h } from 'vue';
|
||||||
|
import { Modal } from 'ant-design-vue';
|
||||||
|
|
||||||
|
Modal.info({
|
||||||
|
title: '新版本发布',
|
||||||
|
content: h('div', {}, [h('p', 'Vben Admin v5.0.0 预览版本已发布')]),
|
||||||
|
onOk() {
|
||||||
|
handleClick();
|
||||||
|
},
|
||||||
|
okText: '前往体验新版',
|
||||||
|
});
|
||||||
|
|
||||||
|
function handleClick() {
|
||||||
|
window.open('https://www.vben.pro', '_blank');
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<a-button type="primary" @click="handleClick">前往体验新版</a-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
@ -33,6 +33,8 @@
|
||||||
|
|
||||||
<!-- action -->
|
<!-- action -->
|
||||||
<div :class="`${prefixCls}-action`">
|
<div :class="`${prefixCls}-action`">
|
||||||
|
<UpgradePrompt class="mr-2" />
|
||||||
|
|
||||||
<AppSearch v-if="getShowSearch" :class="`${prefixCls}-action__item `" />
|
<AppSearch v-if="getShowSearch" :class="`${prefixCls}-action__item `" />
|
||||||
|
|
||||||
<ErrorAction v-if="getUseErrorHandle" :class="`${prefixCls}-action__item error-action`" />
|
<ErrorAction v-if="getUseErrorHandle" :class="`${prefixCls}-action__item error-action`" />
|
||||||
|
|
@ -70,6 +72,7 @@
|
||||||
import { createAsyncComponent } from '@/utils/factory/createAsyncComponent';
|
import { createAsyncComponent } from '@/utils/factory/createAsyncComponent';
|
||||||
import { propTypes } from '@/utils/propTypes';
|
import { propTypes } from '@/utils/propTypes';
|
||||||
|
|
||||||
|
import UpgradePrompt from './components/UpgradePrompt.vue';
|
||||||
import LayoutMenu from '../menu/index.vue';
|
import LayoutMenu from '../menu/index.vue';
|
||||||
import LayoutTrigger from '../trigger/index.vue';
|
import LayoutTrigger from '../trigger/index.vue';
|
||||||
import { ErrorAction, FullScreen, LayoutBreadcrumb, Notify, UserDropDown } from './components';
|
import { ErrorAction, FullScreen, LayoutBreadcrumb, Notify, UserDropDown } from './components';
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue