From 783d12b7b81284be9959da1d2c2b48a3ffe4a585 Mon Sep 17 00:00:00 2001 From: fanxb Date: Fri, 31 Jan 2020 00:42:51 +0800 Subject: [PATCH] =?UTF-8?q?feat:web=E7=AB=AF=E5=A2=9E=E5=8A=A0=E5=88=B7?= =?UTF-8?q?=E6=96=B0=E4=B9=A6=E7=AD=BE=E6=A0=91=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- front/src/pages/manage/OverView/index.jsx | 22 ++++++++++++++++++- .../src/redux/action/BookmarkTreeOverview.js | 2 +- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/front/src/pages/manage/OverView/index.jsx b/front/src/pages/manage/OverView/index.jsx index 7894e3f..3c7dc6c 100644 --- a/front/src/pages/manage/OverView/index.jsx +++ b/front/src/pages/manage/OverView/index.jsx @@ -3,7 +3,11 @@ import { Tree, Empty, Button, Spin } from "antd"; import MainLayout from "../../../layout/MainLayout"; import styles from "./index.module.less"; import { batchDelete, renderTreeNodes, onDrop } from "./function.js"; -import { cacheBookmarkData, getBookmarkList } from "../../../util/cacheUtil"; +import { + cacheBookmarkData, + getBookmarkList, + clearCache +} from "../../../util/cacheUtil"; import AddModal from "./AddModal"; import Search from "../../../components/Search"; @@ -85,6 +89,15 @@ class OverView extends React.Component { } } + /** + * 同步书签数据 + */ + async refreshTree() { + const { refresh } = this.state; + await clearCache(); + refresh(); + } + render() { const { isEdit, @@ -105,6 +118,13 @@ class OverView extends React.Component {
我的书签树 +