From 4f13b89cac3408782e38de62d7c082d9943f7726 Mon Sep 17 00:00:00 2001 From: zepc Date: Tue, 1 Mar 2022 21:33:10 +0800 Subject: [PATCH] =?UTF-8?q?bugfix:=20=E4=BF=AE=E5=A4=8D=E9=80=80=E5=87=BA?= =?UTF-8?q?=E7=99=BB=E5=BD=95=E5=90=8EtagViewList=E6=9C=AA=E6=B8=85?= =?UTF-8?q?=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/layout/Header/index.jsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/views/layout/Header/index.jsx b/src/views/layout/Header/index.jsx index 3231fbe..9deb3e5 100644 --- a/src/views/layout/Header/index.jsx +++ b/src/views/layout/Header/index.jsx @@ -3,6 +3,7 @@ import { connect } from "react-redux"; import { Icon, Menu, Dropdown, Modal, Layout, Avatar } from "antd"; import { Link } from "react-router-dom"; import { logout, getUserInfo } from "@/store/actions"; +import { emptyTaglist } from "@/store/actions"; import FullScreen from "@/components/FullScreen"; import Settings from "@/components/Settings"; import Hamburger from "@/components/Hamburger"; @@ -19,6 +20,7 @@ const LayoutHeader = (props) => { getUserInfo, showSettings, fixedHeader, + emptyTaglist, } = props; token && getUserInfo(token); const handleLogout = (token) => { @@ -28,6 +30,7 @@ const LayoutHeader = (props) => { okText: "确定", cancelText: "取消", onOk: () => { + emptyTaglist() logout(token); }, }); @@ -111,6 +114,7 @@ const mapStateToProps = (state) => { ...state.app, ...state.user, ...state.settings, + ...state.tagsView, }; }; -export default connect(mapStateToProps, { logout, getUserInfo })(LayoutHeader); +export default connect(mapStateToProps, { logout, getUserInfo, emptyTaglist })(LayoutHeader);