'admin-21.02.28:删除多余变量、添加关系图空白界面等'

This commit is contained in:
lyt-Top 2021-02-28 22:19:28 +08:00
parent d0e170d46e
commit 5fdd637b62
4 changed files with 53 additions and 2 deletions

View File

@ -3,8 +3,7 @@ import dotenv from 'dotenv'
export interface ViteEnv { export interface ViteEnv {
VITE_PORT: number, VITE_PORT: number,
VITE_OPEN: boolean, VITE_OPEN: boolean,
VITE_PUBLIC_PATH: string, VITE_PUBLIC_PATH: string
VITE_LOCAL_PATH: string
} }
export function loadEnv(): ViteEnv { export function loadEnv(): ViteEnv {

View File

@ -41,6 +41,7 @@ export default {
// js // js
setIntroduction.jsCdn(); setIntroduction.jsCdn();
}); });
//
onMounted(() => { onMounted(() => {
nextTick(() => { nextTick(() => {
// //

View File

@ -346,6 +346,21 @@ export const dynamicRoutes = [
auth: ['admin', 'test'], auth: ['admin', 'test'],
icon: 'el-icon-odometer' icon: 'el-icon-odometer'
} }
},
{
path: '/fun/relationGraph',
name: 'relationGraph',
component: () => import('/@/views/fun/relationGraph/index.vue'),
meta: {
title: 'graph 关系图谱',
isLink: '',
isHide: false,
isKeepAlive: true,
isAffix: false,
isIframe: false,
auth: ['admin', 'test'],
icon: 'el-icon-connection'
}
} }
] ]
}, },

View File

@ -0,0 +1,36 @@
<template>
<div :style="{height: `calc(100vh - ${initTagViewHeight}`}">
<div class="layout-view-bg-white">
</div>
</div>
</template>
<script lang="ts">
import { toRefs, reactive, computed, onMounted } from "vue";
import { useStore } from "/@/store/index.ts";
export default {
name: "Graph",
setup() {
const store = useStore();
const state = reactive({
tagViewHeight: "",
});
//
const initTagViewHeight = computed(() => {
let { isTagsview } = store.state.themeConfig;
if (isTagsview) return `114px`;
else return `80px`;
});
//
const initGraph = () => {};
//
onMounted(() => {
initGraph();
});
return {
initTagViewHeight,
...toRefs(state),
};
},
};
</script>