Prechádzať zdrojové kódy

feat: 处理判断问题,在输入时同步搜索类型

zhangyuhan 2 rokov pred
rodič
commit
ce62ef0705
1 zmenil súbory, kde vykonal 3 pridanie a 2 odobranie
  1. 3 2
      src/web/staticres/js/common.js

+ 3 - 2
src/web/staticres/js/common.js

@@ -903,7 +903,7 @@ function initSearchPageEvent (config) {
   // 默认提交函数处理,仅处理相同 type
   var searchType = config.type || ''
   var submit = function (item, next) {
-    if (item.type === searchType) {
+    if (item.params.type === searchType) {
       return triggerFormSubmit()
     } else {
       return next(item)
@@ -962,7 +962,8 @@ function initSearchPageEvent (config) {
         type: 'change',
         from: 'page',
         params: {
-          input: nowInput
+          input: nowInput,
+          type: searchType
         }
       })
     }