mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-ui.git
synced 2025-12-20 09:55:53 +08:00
添加注释,删除无用代码
This commit is contained in:
@@ -40,8 +40,8 @@ export default {
|
||||
name: "messageTip",
|
||||
data() {
|
||||
return {
|
||||
value: 0,
|
||||
empty: false,
|
||||
value: 0, // 消息数量
|
||||
empty: false, // 是否为空
|
||||
};
|
||||
},
|
||||
props: {
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
|
||||
<template>
|
||||
<Menu
|
||||
ref="sideMenu"
|
||||
:active-name="$route.name"
|
||||
:open-names="singleOpenName"
|
||||
theme="light"
|
||||
width="110px"
|
||||
@on-select="changeMenu"
|
||||
>
|
||||
<template v-for="item in menuList">
|
||||
<MenuItem :name="item.name" :key="item.name">
|
||||
{{item.title}}
|
||||
</MenuItem>
|
||||
</template>
|
||||
</Menu>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "sidebarMenu",
|
||||
data() {
|
||||
return {
|
||||
singleOpenName: []
|
||||
};
|
||||
},
|
||||
props: {
|
||||
menuList: {
|
||||
type:Array,
|
||||
default:[]
|
||||
},
|
||||
openNames: {
|
||||
type: Array
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
},
|
||||
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import "../styles/menu.scss";
|
||||
</style>
|
||||
@@ -1,73 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<template v-for="(item, index) in menuList">
|
||||
<div style="text-align: center;" :key="index">
|
||||
<Dropdown
|
||||
transfer
|
||||
v-if="item.children.length !== 1"
|
||||
placement="right-start"
|
||||
:key="index"
|
||||
@on-click="changeMenu"
|
||||
>
|
||||
<Button style="width: 70px;height: 42px;margin-left: -5px;padding:10px 0;" type="text">
|
||||
<Icon :size="20" :color="iconColor" :type="item.icon"></Icon>
|
||||
</Button>
|
||||
<DropdownMenu style="width: 200px;" slot="list">
|
||||
<template v-for="(child, i) in item.children">
|
||||
<DropdownItem :name="child.name" :key="i">
|
||||
<Icon :type="child.icon"></Icon>
|
||||
<span style="padding-left:10px;">{{ itemTitle(child) }}</span>
|
||||
</DropdownItem>
|
||||
</template>
|
||||
</DropdownMenu>
|
||||
</Dropdown>
|
||||
<Dropdown transfer v-else placement="right-start" :key="index" @on-click="changeMenu">
|
||||
<Button
|
||||
@click="changeMenu(item.children[0].name)"
|
||||
style="width: 70px;height: 42px;margin-left: -5px;padding:10px 0;"
|
||||
type="text"
|
||||
>
|
||||
<Icon :size="20" :color="iconColor" :type="item.children[0].icon || item.icon"></Icon>
|
||||
</Button>
|
||||
<DropdownMenu style="width: 200px;" slot="list">
|
||||
<DropdownItem :name="item.children[0].name" :key="'d' + index">
|
||||
<Icon :type="item.children[0].icon || item.icon"></Icon>
|
||||
<span style="padding-left:10px;">{{ itemTitle(item.children[0]) }}</span>
|
||||
</DropdownItem>
|
||||
</DropdownMenu>
|
||||
</Dropdown>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "sidebarMenuShrink",
|
||||
props: {
|
||||
menuList: {
|
||||
type: Array
|
||||
},
|
||||
iconColor: {
|
||||
type: String,
|
||||
default: "white"
|
||||
},
|
||||
menuTheme: {
|
||||
type: String,
|
||||
default: "dark"
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
changeMenu(active) {
|
||||
this.$emit("on-change", active);
|
||||
},
|
||||
itemTitle(item) {
|
||||
if (typeof item.title == "object") {
|
||||
return this.$t(item.title.i18n);
|
||||
} else {
|
||||
return item.title;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@@ -31,10 +31,6 @@
|
||||
import util from "@/libs/util.js";
|
||||
export default {
|
||||
name: "shrinkableMenu",
|
||||
data () {
|
||||
return {
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
menuList() {
|
||||
return this.$store.state.app.menuList;
|
||||
|
||||
@@ -47,17 +47,17 @@ export default {
|
||||
name: "tagsPageOpened",
|
||||
data() {
|
||||
return {
|
||||
currentPageName: this.$route.name,
|
||||
tagBodyLeft: 0,
|
||||
visible: false,
|
||||
contextMenuLeft: 0,
|
||||
contextMenuTop: 0,
|
||||
menuList: {
|
||||
currentPageName: this.$route.name, // 当前路由名称
|
||||
tagBodyLeft: 0, // 标签左偏移量
|
||||
visible: false, // 显示操作按钮
|
||||
contextMenuLeft: 0, // 内容左偏移量
|
||||
contextMenuTop: 0, // 内容上偏移量
|
||||
actionList: {
|
||||
others: '关闭其他',
|
||||
clearAll: '关闭所有'
|
||||
},
|
||||
refsTag: [],
|
||||
tagsCount: 1
|
||||
refsTag: [], // 所有已打开标签
|
||||
tagsCount: 1 // 标签数量
|
||||
};
|
||||
},
|
||||
props: {
|
||||
|
||||
Reference in New Issue
Block a user