Commit 3f7e0fda authored by 李苏's avatar 李苏 💬

layout显示异常调整

parent 5729f00a
...@@ -3,11 +3,11 @@ ...@@ -3,11 +3,11 @@
<transition name="sidebarLogoFade"> <transition name="sidebarLogoFade">
<router-link v-if="collapse" key="collapse" class="sidebar-logo-link" to="/"> <router-link v-if="collapse" key="collapse" class="sidebar-logo-link" to="/">
<img v-if="logo" :src="logo" class="sidebar-logo" /> <img v-if="logo" :src="logo" class="sidebar-logo" />
<h1 v-else class="sidebar-title" :style="{ color: sideTheme === 'theme-dark' ? variables.logoTitleColor : variables.logoLightTitleColor }">{{ title }} </h1> <h1 v-else class="sidebar-title logo-title " :style="{ color: sideTheme === 'theme-dark' ? variables.logoTitleColor : variables.logoLightTitleColor }">{{ title }} </h1>
</router-link> </router-link>
<router-link v-else key="expand" class="sidebar-logo-link" to="/"> <router-link v-else key="expand" class="sidebar-logo-link" to="/">
<img v-if="logo" :src="logo" class="sidebar-logo" /> <img v-if="logo" :src="logo" class="sidebar-logo" />
<h1 class="sidebar-title" :style="{ color: sideTheme === 'theme-dark' ? variables.logoTitleColor : variables.logoLightTitleColor }">{{ title }} </h1> <h1 class="sidebar-title logo-title " :style="{ color: sideTheme === 'theme-dark' ? variables.logoTitleColor : variables.logoLightTitleColor }">{{ title }} </h1>
</router-link> </router-link>
</transition> </transition>
</div> </div>
...@@ -58,6 +58,14 @@ export default { ...@@ -58,6 +58,14 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.logo-title{
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 160px;
font-size: 14px;
// display: inline-block;
}
.sidebarLogoFade-enter-active { .sidebarLogoFade-enter-active {
transition: opacity 1.5s; transition: opacity 1.5s;
} }
......
<template> <template>
<el-menu :default-active="activeIndex" class="el-menu-demo" mode="horizontal" @select="handleSelect"> <el-menu :default-active="activeIndex" class="el-menu-demo" mode="horizontal" @select="handleSelect">
<el-submenu index="1" @mouseover.native.once="titClick"> <el-submenu index="1" @mouseover.native.once="titClick">
<template slot="title">{{systemName||customName}}</template> <template slot="title"> <span class="cp-title" > {{systemName||customName}}</span></template>
<el-menu-item :key="item.id" :index="index" v-for="(item,index) in systemInfo" >{{item.name}}</el-menu-item> <el-menu-item :key="item.id" :index="index" v-for="(item,index) in systemInfo" >{{item.name}}</el-menu-item>
</el-submenu> </el-submenu>
</el-menu> </el-menu>
...@@ -138,9 +138,23 @@ ...@@ -138,9 +138,23 @@
} }
</script> </script>
<style lang="scss" > <style lang="scss" scoped >
.el-submenu__title{ .el-submenu__title{
height: 50px!important; height: 50px!important;
line-height: 50px!important; line-height: 50px!important;
} }
.el-menu-item{
font-size: 14px!important;
line-height: 20px!important;
height: 20px!important;
text-align: left;
text-decoration: underline;
}
.cp-title{
width: 180px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
display: inline-block;
}
</style> </style>
...@@ -84,6 +84,8 @@ ...@@ -84,6 +84,8 @@
}, },
tooltip: { tooltip: {
trigger: 'axis', trigger: 'axis',
className: 'echarts-tooltip',
appendToBody: true,
formatter: function(params) { formatter: function(params) {
var text = new Date(params[0]["value"][0]).Format("yyyy-MM-dd hh:mm:ss") + "<br />"; var text = new Date(params[0]["value"][0]).Format("yyyy-MM-dd hh:mm:ss") + "<br />";
...@@ -239,6 +241,9 @@ ...@@ -239,6 +241,9 @@
} }
</script> </script>
<style scoped> <style lang="scss" scoped>
::v-deep .echarts-tooltip {
z-index: 999999999 !important;
}
/* 可以在这里添加样式 */ /* 可以在这里添加样式 */
</style> </style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment