Bläddra i källkod

标准模板和个人模板切换调搜索(3139)

zhangxc 5 år sedan
förälder
incheckning
9e4a28733a
2 ändrade filer med 7 tillägg och 2 borttagningar
  1. 6 1
      src/components/PushContainer/index.jsx
  2. 1 1
      src/components/TemplateItems/index.jsx

+ 6 - 1
src/components/PushContainer/index.jsx

@@ -442,7 +442,12 @@ class PushContainer extends Component {
   whichTemp(tab,name){
     console.log('tan',tab)
     if(tab!=2||!name){
-      store.dispatch(initAdminItemList(1,true))
+      if(tab == 1 && name) {
+        this.templateSearch(name,1)
+      } else {
+        store.dispatch(initAdminItemList(1,true))
+      }
+      
     }else{
       this.templateSearch(name,2)
     }

+ 1 - 1
src/components/TemplateItems/index.jsx

@@ -363,7 +363,7 @@ class TemplateItems extends React.Component {
                             {
                                 <div className={`${style.topBorder} clearfix`}>
                                     {
-                                        !allCheckShow&&<div className={`${style.personalTmp} ${selectTemp==1?style.personalTmpOwn:''} clearfix`} onClick={()=>whichTemp(1)}>
+                                        !allCheckShow&&<div className={`${style.personalTmp} ${selectTemp==1?style.personalTmpOwn:''} clearfix`} onClick={()=>whichTemp(1,(this.state.val).trim())}>
                                             <span className={style.tip}>个人模板</span>
                                             <i></i>
                                             {