2.5.3beta版本提升 (#1116)

* element-ui升级至2.2.2 部分标签存在重大变化,请重新安装依赖

* popover变更

* 增加真实的天气信息获取

* 天气功能抽离方便二开清理

* 侧边栏css优化

* 版本提升为2.5.3beta

Co-authored-by: task <121913992@qq.com>
This commit is contained in:
奇淼(piexlmax
2022-06-03 21:42:45 +08:00
committed by GitHub
co-authored by task
parent 99156155b3
commit a8d746e831
26 changed files with 135 additions and 87 deletions
@@ -5,7 +5,7 @@
:closable="!(historys.length === 1 && $route.name === defaultRouter)"
type="card"
@contextmenu.prevent="openContextMenu($event)"
@tab-click="changeTab"
@tab-change="changeTab"
@tab-remove="removeTab"
>
<el-tab-pane
@@ -18,6 +18,7 @@
>
<template #label>
<span
:tab="item"
:style="{
color: activeValue === name(item) ? userStore.activeColor : '#333',
}"
@@ -200,13 +201,22 @@ const setTab = (route) => {
delete obj.meta.matched
obj.query = route.query
obj.params = route.params
console.log(obj)
historys.value.push(obj)
}
window.sessionStorage.setItem('activeValue', getFmtString(route))
}
const changeTab = (component) => {
const tab = component.instance.attrs.tab
const historyMap = ref({})
watch(()=>historys.value,()=>{
historyMap.value={}
historys.value.forEach((item)=>{
historyMap.value[getFmtString(item)] = item
})
})
const changeTab = (name) => {
const tab = historyMap.value[name]
router.push({
name: tab.name,
query: tab.query,