From 9ecbd8f279f6e0a1037e282418e8f9bfc0250769 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 25 四月 2023 17:04:11 +0800
Subject: [PATCH] 2023-04-25

---
 src/tabviews/custom/components/module/account/index.jsx |   19 +++++++++++++++++--
 1 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/src/tabviews/custom/components/module/account/index.jsx b/src/tabviews/custom/components/module/account/index.jsx
index 4ac66a4..a4f2cb1 100644
--- a/src/tabviews/custom/components/module/account/index.jsx
+++ b/src/tabviews/custom/components/module/account/index.jsx
@@ -25,6 +25,7 @@
 
   componentDidMount () {
     this.loadData()
+    MKEmitter.addListener('reloadData', this.reloadData)
   }
 
   shouldComponentUpdate (nextProps, nextState) {
@@ -37,6 +38,20 @@
   componentWillUnmount () {
     this.setState = () => {
       return
+    }
+    MKEmitter.removeListener('reloadData', this.reloadData)
+  }
+
+  reloadData = (menuId) => {
+    const { config } = this.props
+    const { activeItem } = this.state
+    
+    if (config.uuid !== menuId) return
+
+    if (activeItem) {
+      MKEmitter.emit('resetSelectLine', config.uuid, activeItem.id, activeItem)
+    } else {
+      this.loadData()
     }
   }
 
@@ -181,11 +196,11 @@
           </div>
         )}>
           {books.map(item => (
-            <Option disabled={!item.months} key={item.id}>{item.account_name}</Option>
+            <Option disabled={!item.months} title={item.account_name} key={item.id}>{item.account_name}</Option>
           ))}
         </Select> : <Select showSearch filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0} value={activeItem ? activeItem.id : ''} disabled={config.wrap.readonly === 'true'} placeholder="璇烽�夋嫨璐﹀" onChange={this.changeBook}>
           {books.map(item => (
-            <Option disabled={!item.months} key={item.id}>{item.account_name}</Option>
+            <Option disabled={!item.months} title={item.account_name} key={item.id}>{item.account_name}</Option>
           ))}
         </Select>}
         {activeItem ? <span className="date">{activeItem.date}</span> : null}

--
Gitblit v1.8.0