Commit 16845518 by 胡悦

修改样式

1 parent 1fb7def1
...@@ -4,18 +4,27 @@ ...@@ -4,18 +4,27 @@
:style="{ margin: '24px 16px', padding: '24px', background: '#fff', minHeight: '280px' }" :style="{ margin: '24px 16px', padding: '24px', background: '#fff', minHeight: '280px' }"
> >
<el-breadcrumb> <el-breadcrumb>
<el-breadcrumb-item class="breadcrumb-item" <el-breadcrumb-item
class="breadcrumb-item"
:class="{active: item.active, pointer: item.path}" :class="{active: item.active, pointer: item.path}"
v-for="(item, index) in breadCrumbList" v-for="(item, index) in breadCrumbList"
:key="index" :key="index"
@click="routerGo(item, item.path || '/noData')"> @click="routerGo(item, item.path || '/noData')"
>
{{item.name}} {{item.name}}
</el-breadcrumb-item> </el-breadcrumb-item>
</el-breadcrumb> </el-breadcrumb>
<div v-show="showEmpty"> <div v-show="showEmpty">
<el-empty description="暂无数据" :image-size="imgSize"></el-empty> <el-empty
description="暂无数据"
:image-size="imgSize"
></el-empty>
</div> </div>
<div v-show="!showEmpty" id="sub-system-frame" ref="elmSubMicro"></div> <div
v-show="!showEmpty"
id="sub-system-frame"
ref="elmSubMicro"
></div>
</el-main> </el-main>
</template> </template>
...@@ -38,10 +47,10 @@ export default { ...@@ -38,10 +47,10 @@ export default {
// 监听子系统挂载的元素内容变化 // 监听子系统挂载的元素内容变化
const subMircroEle = document.getElementById('sub-system-frame'); const subMircroEle = document.getElementById('sub-system-frame');
subMircroEle.addEventListener('DOMNodeInserted', function(e) { subMircroEle.addEventListener('DOMNodeInserted', function (e) {
const target = e.currentTarget, const target = e.currentTarget,
tarInner = target.innerHTML; tarInner = target.innerHTML;
if(!state.el_sub_innerH !== !tarInner) { if (!state.el_sub_innerH !== !tarInner) {
state.el_sub_innerH = target.innerHTML; state.el_sub_innerH = target.innerHTML;
} }
}) })
...@@ -56,19 +65,19 @@ export default { ...@@ -56,19 +65,19 @@ export default {
curParent = curBreadCrumb['parent'], curParent = curBreadCrumb['parent'],
curChildren = curBreadCrumb['children']; curChildren = curBreadCrumb['children'];
let breadCrumbList = []; let breadCrumbList = [];
if(curParent) { if (curParent) {
breadCrumbList.push({ breadCrumbList.push({
name: curChildren.menuName ? curParent.menuName : curParent.menuName name: curChildren.menuName ? curParent.menuName : curParent.menuName
}); });
} }
if(curChildren) { if (curChildren) {
const nextChildren = curChildren.children; const nextChildren = curChildren.children;
breadCrumbList.push({ breadCrumbList.push({
name: nextChildren ? curChildren.menuName: curChildren.menuName, name: nextChildren ? curChildren.menuName : curChildren.menuName,
path: curChildren.path, path: curChildren.path,
active: nextChildren ? false : true active: nextChildren ? false : true
}); });
if(nextChildren) { if (nextChildren) {
breadCrumbList.push({ breadCrumbList.push({
name: nextChildren.menuName, name: nextChildren.menuName,
path: nextChildren.path, path: nextChildren.path,
...@@ -87,21 +96,21 @@ export default { ...@@ -87,21 +96,21 @@ export default {
const curBreadCrumb = store.getters.curBreadCrumb, const curBreadCrumb = store.getters.curBreadCrumb,
curParent = curBreadCrumb['parent'], curParent = curBreadCrumb['parent'],
curChildren = curBreadCrumb['children']; curChildren = curBreadCrumb['children'];
if(thisName === curParent.menuName) { if (thisName === curParent.menuName) {
saveBreadCrumb.parent = curParent; saveBreadCrumb.parent = curParent;
saveBreadCrumb.children = {}; saveBreadCrumb.children = {};
return false; return false;
} }
if(curChildren) { if (curChildren) {
const nextChildren = curChildren.children; const nextChildren = curChildren.children;
if(thisName === curChildren.menuName) { if (thisName === curChildren.menuName) {
saveBreadCrumb.parent = curParent; saveBreadCrumb.parent = curParent;
if(nextChildren) { if (nextChildren) {
delete curChildren.children; delete curChildren.children;
} }
saveBreadCrumb.children = curChildren; saveBreadCrumb.children = curChildren;
} else { } else {
if(thisName === nextChildren.menuName) { if (thisName === nextChildren.menuName) {
saveBreadCrumb = curBreadCrumb; saveBreadCrumb = curBreadCrumb;
} }
} }
...@@ -122,14 +131,14 @@ export default { ...@@ -122,14 +131,14 @@ export default {
</script> </script>
<style scoped> <style scoped>
.glsx-right-side >>> .breadcrumb-item span { .glsx-right-side >>> .breadcrumb-item span {
color: rgba(0,0,0,.45); color: rgba(0, 0, 0, 0.45);
} }
.glsx-right-side >>> .breadcrumb-item.active span { .glsx-right-side >>> .breadcrumb-item.active span {
color: #2196f3; color: #2196f3;
} }
</style> </style>
<style lang="less" scoped> <style lang="less" scoped>
@import 'styles/variables.less'; @import "styles/variables.less";
.glsx-right-side { .glsx-right-side {
position: relative; position: relative;
} }
...@@ -147,12 +156,11 @@ export default { ...@@ -147,12 +156,11 @@ export default {
.pointer:hover { .pointer:hover {
color: @defaultTextColor; color: @defaultTextColor;
} }
} }
#sub-system-frame { #sub-system-frame {
min-width: 1190px; // min-width: 1190px;
min-width: calc(100% - 400px);
} }
.pointer { .pointer {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!