| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- <template>
- <a-config-provider :locale="locale">
- <a-alert class="alert_txt" type="warning" v-if="show_warning"
- >您的软件试用期即将到期,输入授权密钥方可正常使用! <span @click="toAuth">去授权 >></span></a-alert
- >
- <router-view />
- </a-config-provider>
- </template>
- <script setup>
- import { ref, computed } from 'vue';
- import { useRouter } from 'vue-router';
- import { useLocaleStore } from './base/store/use-locale';
- /**
- * @see https://arco.design/vue/component/config-provider
- */
- import zhCN from '@arco-design/web-vue/es/locale/lang/zh-cn';
- import enUS from '@arco-design/web-vue/es/locale/lang/en-us';
- const locales = {
- zh: zhCN,
- en: enUS
- };
- const localStore = useLocaleStore();
- const router = useRouter();
- /**
- * 多语言
- */
- const locale = computed(() => {
- return locales[localStore.value] || zhCN;
- });
- const show_warning = ref(false);
- /**
- *去授权
- * */
- const toAuth = () => {
- router.push({
- path: '/auth'
- });
- };
- </script>
- <style scoped>
- .alert_txt {
- position: absolute;
- width: 500px;
- top: 60px;
- left: calc(50% - 250px);
- z-index: 9999;
- span {
- cursor: pointer;
- color: var(--color-link-1);
- }
- }
- </style>
|