Commit 2cb1ac83 by liangjianmin

style(menu): 格式化menu.vue文件代码风格

- 统一调整template内部标签及属性的缩进和空格风格
- 规范多处vue模板标签对齐和空格使用
- 对script部分的import语句进行格式调整,规范逗号和空格
- 修复函数体和对象字面量的格式统一
- 保持代码风格一致提高可读性和维护性
parent 6ee04525
Showing with 53 additions and 56 deletions
...@@ -6,10 +6,10 @@ ...@@ -6,10 +6,10 @@
<div class="tab-box fl" ref="scrollbox"> <div class="tab-box fl" ref="scrollbox">
<!--tab 栏目--> <!--tab 栏目-->
<div class="item-boxs row verCenter" ref="scrollboxinner"> <div class="item-boxs row verCenter" ref="scrollboxinner">
<a class="item first row rowCenter verCenter" href="/#/" :class="{'act':$route.path=='/'}"> <a class="item first row rowCenter verCenter" href="/#/" :class="{ 'act': $route.path == '/' }">
<font class="fl">概况</font> <font class="fl">概况</font>
</a> </a>
<a class="item row rowCenter verCenter" :class="{'act':(JSON.stringify(item)==JSON.stringify({path: $route.path,title: $route.meta.title,query:$route.query}))}" @click="tabUrl(item)" v-for="item in tabs"> <a class="item row rowCenter verCenter" :class="{ 'act': (JSON.stringify(item) == JSON.stringify({ path: $route.path, title: $route.meta.title, query: $route.query })) }" @click="tabUrl(item)" v-for="item in tabs">
<font class="fl">{{ item.title }}</font> <font class="fl">{{ item.title }}</font>
<span class="icon iconfont fl" @click.stop="closetab(item.path)"></span> <span class="icon iconfont fl" @click.stop="closetab(item.path)"></span>
</a> </a>
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
<a class="el-icon-s-cooperation" style="font-size: 27px;" href="/#/notice" title="系统公告"></a> <a class="el-icon-s-cooperation" style="font-size: 27px;" href="/#/notice" title="系统公告"></a>
<div class="line"></div> <div class="line"></div>
<i class="el-icon-message-solid message-num" @click="showMsg" title="消息通知"> <i class="el-icon-message-solid message-num" @click="showMsg" title="消息通知">
<el-badge class="mark" :value="not_read_count"/> <el-badge class="mark" :value="not_read_count" />
</i> </i>
<div class="line"></div> <div class="line"></div>
<a class="msgh row verCenter" href="javascript:history.go(0)" title="点击刷新"> <a class="msgh row verCenter" href="javascript:history.go(0)" title="点击刷新">
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
<a class="fl" href="/芯链系统-操作手册.pdf" target="_blank" title="点击查看芯链系统-操作手册"><span class="icon iconfont iconwendangguanli fl"></span></a> <a class="fl" href="/芯链系统-操作手册.pdf" target="_blank" title="点击查看芯链系统-操作手册"><span class="icon iconfont iconwendangguanli fl"></span></a>
<div class="line"></div> <div class="line"></div>
<div class="login-v row verCenter"> <div class="login-v row verCenter">
<img :src="userinfo.avatar||'https://www.ichunt.com/v3/dist/res/home/images/headimg/boy1.png'" alt=""> <img :src="userinfo.avatar || 'https://www.ichunt.com/v3/dist/res/home/images/headimg/boy1.png'" alt="">
<div class="namex">{{ userinfo.contacts_name || '猎芯网用户' }}</div> <div class="namex">{{ userinfo.contacts_name || '猎芯网用户' }}</div>
<div class="lo-box-drop row verCenter"> <div class="lo-box-drop row verCenter">
<span class="icon iconfont"></span> <span class="icon iconfont"></span>
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
<!--菜单栏--> <!--菜单栏-->
<el-menu class="el-menu-vertical-demo" active-text-color="#1969F9" router :default-active="$route.path" :router="true" :unique-opened="true" @open="handleOpen" @close="handleClose" @select="handleSelect"> <el-menu class="el-menu-vertical-demo" active-text-color="#1969F9" router :default-active="$route.path" :router="true" :unique-opened="true" @open="handleOpen" @close="handleClose" @select="handleSelect">
<template v-if="Object.keys(index_home).length !== 0"> <template v-if="Object.keys(index_home).length !== 0">
<el-menu-item :index="'/'" :class="{'indextab':isIndexTab}"> <el-menu-item :index="'/'" :class="{ 'indextab': isIndexTab }">
<template slot="title"> <template slot="title">
<span class="icon iconfont iconsy"></span> <span class="icon iconfont iconsy"></span>
<span>概况</span> <span>概况</span>
...@@ -59,13 +59,13 @@ ...@@ -59,13 +59,13 @@
</el-menu-item> </el-menu-item>
</template> </template>
<template v-if="menuData.length > 0"> <template v-if="menuData.length > 0">
<el-submenu :index="(index+2).toString()" v-for="(item,index) in menuData" :key="index"> <el-submenu :index="(index + 2).toString()" v-for="(item, index) in menuData" :key="index">
<template slot="title"> <template slot="title">
<span :class="['icon', 'iconfont', item.iconfont]"></span> <span :class="['icon', 'iconfont', item.iconfont]"></span>
<span slot="title">{{ item.name }}</span> <span slot="title">{{ item.name }}</span>
</template> </template>
<el-menu-item-group> <el-menu-item-group>
<el-menu-item :index="v.path" v-for="(v,i) in item.children" :key="i">{{ v.name }}</el-menu-item> <el-menu-item :index="v.path" v-for="(v, i) in item.children" :key="i">{{ v.name }}</el-menu-item>
</el-menu-item-group> </el-menu-item-group>
</el-submenu> </el-submenu>
</template> </template>
...@@ -78,12 +78,12 @@ ...@@ -78,12 +78,12 @@
<span class="icon iconfont fr" @click="zk"></span> <span class="icon iconfont fr" @click="zk"></span>
</div> </div>
<template v-if="Object.keys(index_home).length !== 0"> <template v-if="Object.keys(index_home).length !== 0">
<div class="item" :class="{'act':tabSure==1}"> <div class="item" :class="{ 'act': tabSure == 1 }">
<span class="icon iconfont iconsy"></span> <span class="icon iconfont iconsy"></span>
</div> </div>
</template> </template>
<template v-if="menuData.length > 0"> <template v-if="menuData.length > 0">
<div class="item" :class="{'act':tabSure==(index+1)}" v-for="(item,index) in menuData" :key="index"> <div class="item" :class="{ 'act': tabSure == (index + 1) }" v-for="(item, index) in menuData" :key="index">
<span :class="['icon', 'iconfont', item.iconfont]"></span> <span :class="['icon', 'iconfont', item.iconfont]"></span>
</div> </div>
</template> </template>
...@@ -184,7 +184,7 @@ ...@@ -184,7 +184,7 @@
<div class="notice-content" v-html="noticeMsg.content"></div> <div class="notice-content" v-html="noticeMsg.content"></div>
<div class="enclosure row verCenter"> <div class="enclosure row verCenter">
<span>附件:</span> <span>附件:</span>
<a class="down" :href="noticeMsg.attachment_url ">{{ noticeMsg.attachment_name || '暂无附件' }}</a> <a class="down" :href="noticeMsg.attachment_url">{{ noticeMsg.attachment_name || '暂无附件' }}</a>
</div> </div>
<div class="notice-bottom row bothSide verCenter"> <div class="notice-bottom row bothSide verCenter">
<span>发件人:深圳市猎芯科技有限公司</span> <span>发件人:深圳市猎芯科技有限公司</span>
...@@ -231,17 +231,17 @@ ...@@ -231,17 +231,17 @@
</template> </template>
<script> <script>
import Vue from 'vue'; import Vue from 'vue';
import Util from "../tool"; import Util from "../tool";
import axios from 'axios'; import axios from 'axios';
import {NODE_ENVS_MSG} from "../ajax"; import { NODE_ENVS_MSG } from "../ajax";
import {Badge, Button, Checkbox, Dialog, Form, FormItem, Input, Menu, MenuItem, MenuItemGroup, Message, MessageBox, Notification, Pagination, Submenu, TabPane, Tabs, Tooltip} from 'element-ui' import { Badge, Button, Checkbox, Dialog, Form, FormItem, Input, Menu, MenuItem, MenuItemGroup, Message, MessageBox, Notification, Pagination, Submenu, TabPane, Tabs, Tooltip } from 'element-ui'
Vue.prototype.$message = Message; Vue.prototype.$message = Message;
Vue.prototype.$notify = Notification; Vue.prototype.$notify = Notification;
Vue.use(Menu).use(MenuItem).use(MenuItemGroup).use(Submenu).use(Form).use(FormItem).use(Dialog).use(Button).use(Tooltip).use(Input).use(Tabs).use(TabPane).use(Badge).use(Pagination).use(Checkbox); Vue.use(Menu).use(MenuItem).use(MenuItemGroup).use(Submenu).use(Form).use(FormItem).use(Dialog).use(Button).use(Tooltip).use(Input).use(Tabs).use(TabPane).use(Badge).use(Pagination).use(Checkbox);
export default { export default {
name: 'menus', name: 'menus',
props: {}, props: {},
data() { data() {
...@@ -859,11 +859,11 @@ export default { ...@@ -859,11 +859,11 @@ export default {
}) })
} }
} }
} }
</script> </script>
<style lang="less"> <style lang="less">
.kf-boxs { .kf-boxs {
width: 200px; width: 200px;
padding: 0 10px; padding: 0 10px;
padding-bottom: 20px; padding-bottom: 20px;
...@@ -887,14 +887,14 @@ export default { ...@@ -887,14 +887,14 @@ export default {
margin-top: 20px; margin-top: 20px;
} }
} }
#app { #app {
padding-left: 226px; padding-left: 226px;
padding-top: 56px; padding-top: 56px;
} }
.kf-box { .kf-box {
position: fixed; position: fixed;
right: 0px; right: 0px;
width: 61px; width: 61px;
...@@ -908,9 +908,9 @@ export default { ...@@ -908,9 +908,9 @@ export default {
width: 61px; width: 61px;
cursor: pointer; cursor: pointer;
} }
} }
.nav-top { .nav-top {
position: fixed; position: fixed;
left: 0px; left: 0px;
top: 0px; top: 0px;
...@@ -1145,9 +1145,9 @@ export default { ...@@ -1145,9 +1145,9 @@ export default {
} }
} }
} }
.nav-icon { .nav-icon {
width: 62px; width: 62px;
background: #fff; background: #fff;
position: fixed; position: fixed;
...@@ -1206,9 +1206,9 @@ export default { ...@@ -1206,9 +1206,9 @@ export default {
color: #646B78; color: #646B78;
} }
} }
} }
.nav-left { .nav-left {
width: 226px; width: 226px;
background: #fff; background: #fff;
position: fixed; position: fixed;
...@@ -1368,9 +1368,9 @@ export default { ...@@ -1368,9 +1368,9 @@ export default {
background: #D2D9E7; background: #D2D9E7;
} }
} }
} }
.el-badge-num { .el-badge-num {
position: absolute; position: absolute;
left: -1px; left: -1px;
top: 14px; top: 14px;
...@@ -1380,30 +1380,26 @@ export default { ...@@ -1380,30 +1380,26 @@ export default {
border-radius: 50%; border-radius: 50%;
display: block; display: block;
box-sizing: border-box; box-sizing: border-box;
} }
.tab-news { .tab-news {
margin-bottom: 6px; margin-bottom: 6px;
border-bottom: 1px solid #E4E7ED; border-bottom: 1px solid #E4E7ED;
} }
.tab-news .el-tabs__header { .tab-news .el-tabs__header {
margin-bottom: 0 !important; margin-bottom: 0 !important;
} }
.el-tabs__nav-wrap::after { .el-tabs__nav-wrap::after {
background-color: transparent; background-color: transparent;
} }
.notify-text b { .notify-text b {
margin-right: 5px; margin-right: 5px;
} }
.notify-text a {
}
@keyframes layui-rotate { @keyframes layui-rotate {
from { from {
-webkit-transform: rotate(0) -webkit-transform: rotate(0)
} }
...@@ -1411,17 +1407,17 @@ export default { ...@@ -1411,17 +1407,17 @@ export default {
to { to {
-webkit-transform: rotate(360deg) -webkit-transform: rotate(360deg)
} }
} }
.dialog-layer-notice .el-dialog__body { .dialog-layer-notice .el-dialog__body {
padding: 0 !important; padding: 0 !important;
} }
.dialog-layer-notice .el-dialog__header { .dialog-layer-notice .el-dialog__header {
border-bottom: 1px solid #E5EBF6; border-bottom: 1px solid #E5EBF6;
} }
.handbook-layer { .handbook-layer {
.el-dialog__body { .el-dialog__body {
max-height: 600px; max-height: 600px;
...@@ -1457,9 +1453,9 @@ export default { ...@@ -1457,9 +1453,9 @@ export default {
font-size: 14px; font-size: 14px;
} }
} }
} }
.welcome { .welcome {
position: fixed; position: fixed;
left: 0; left: 0;
top: 0; top: 0;
...@@ -1475,5 +1471,5 @@ export default { ...@@ -1475,5 +1471,5 @@ export default {
object-fit: cover; object-fit: cover;
z-index: 99999999999998; z-index: 99999999999998;
} }
} }
</style> </style>
\ No newline at end of file
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 sign in to comment