Files
SaaS-lib/hx-ai-intelligent/src/App.vue

72 lines
1.9 KiB
Vue
Raw Normal View History

2024-05-21 16:42:16 +08:00
<template>
<a-config-provider :locale="locale">
<router-view />
</a-config-provider>
</template>
<script lang="ts">
import { defineComponent, watch, ref } from 'vue';
import zhCN from 'ant-design-vue/es/locale/zh_CN';
import { useRouter } from 'vue-router';
import Cookies from 'js-cookie';
import { message } from 'ant-design-vue';
export default defineComponent({
name: 'App',
setup() {
const router = useRouter();
const cachedViews = ['Status'];
window.localStorage.setItem('mapKey', JSON.stringify({ type: 'tmap', url: '' }));
// watch(
// () => router.currentRoute.value,
// (e) => {
2024-07-11 15:53:41 +08:00
// // if (Cookies.get(`${import.meta.env.VITE_PUBLIC_PATH}-nervsid`) === undefined && e.fullPath !== '/login') {
2024-05-21 16:42:16 +08:00
// // message.warn('登陆信息已过期,请重新登录!', 1);
// // router.push('/login');
// // }
// // } else {
2024-07-11 15:53:41 +08:00
// // if (Cookies.get(`${import.meta.env.VITE_PUBLIC_PATH}-nervsid`) !== undefined && e === '/login') {
2024-05-21 16:42:16 +08:00
// // let url = window.sessionStorage.getItem('url');
// // url === null ? window.sessionStorage.setItem('url', '/doorway/visitor/audit') : '';
// // router.push(url === null ? '/doorway' : url);
// // }
// // }
// }
// );
return {
cachedViews,
locale: zhCN,
};
},
});
</script>
<style lang="less" scoped>
2024-07-08 17:32:10 +08:00
:deep(.ns-content-main) {
.ant-tabs-content {
height: 100%;
}
}
2024-07-17 15:07:23 +08:00
:deep(.ant-tree-node-content-wrapper) {
overflow: hidden;
text-overflow: ellipsis;
text-wrap: nowrap;
}
2024-07-17 15:39:24 +08:00
:deep(.ns-table-search) {
.ns-flexv2-form {
.ns-operate {
text-align: left;
margin-left: 0;
.ant-btn {
margin: 0;
margin-right: 6px;
}
}
}
.ns-form-body {
max-width: 1000px;
}
}
2024-05-21 16:42:16 +08:00
</style>