From f3167f8371d19d0ea8fe7d0e7af5517ff0b08cd2 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期三, 07 四月 2021 23:25:29 +0800
Subject: [PATCH] 2021-04-07

---
 src/menu/components/editor/braft-editor/index.jsx |   17 +++--------------
 1 files changed, 3 insertions(+), 14 deletions(-)

diff --git a/src/menu/components/editor/braft-editor/index.jsx b/src/menu/components/editor/braft-editor/index.jsx
index cac96be..cf83121 100644
--- a/src/menu/components/editor/braft-editor/index.jsx
+++ b/src/menu/components/editor/braft-editor/index.jsx
@@ -1,6 +1,5 @@
 import React, {Component} from 'react'
 import PropTypes from 'prop-types'
-import {connect} from 'react-redux'
 import { is, fromJS } from 'immutable'
 import { Icon, Popover } from 'antd'
 
@@ -29,7 +28,7 @@
   }
 
   state = {
-    dict: localStorage.getItem('lang') !== 'en-US' ? zhCN : enUS,
+    dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS,
     card: null,
     back: false
   }
@@ -86,7 +85,7 @@
   }
 
   shouldComponentUpdate (nextProps, nextState) {
-    return !is(fromJS(this.state), fromJS(nextState)) || (!this.props.menu && nextProps.menu)
+    return !is(fromJS(this.state), fromJS(nextState))
   }
 
   /**
@@ -183,14 +182,4 @@
   }
 }
 
-const mapStateToProps = (state) => {
-  return {
-    menu: state.customMenu
-  }
-}
-
-const mapDispatchToProps = () => {
-  return {}
-}
-
-export default connect(mapStateToProps, mapDispatchToProps)(BraftEditorComponent)
\ No newline at end of file
+export default BraftEditorComponent
\ No newline at end of file

--
Gitblit v1.8.0