Browse Source

bug 修复

lilei 2 years ago
parent
commit
9b051892bb
1 changed files with 5 additions and 0 deletions
  1. 5 0
      src/views/common/productTypeAll.js

+ 5 - 0
src/views/common/productTypeAll.js

@@ -8,6 +8,7 @@ const ProductType = {
         expand-trigger="hover"
         expand-trigger="hover"
         :options="productTypeList"
         :options="productTypeList"
         :disabled="disabled"
         :disabled="disabled"
+        :show-search="{ filter }"
         :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
         :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
         :id="id"
         :id="id"
         placeholder="请选择产品分类"
         placeholder="请选择产品分类"
@@ -44,6 +45,10 @@ const ProductType = {
     this.getProductType()
     this.getProductType()
   },
   },
   methods: {
   methods: {
+    filter(inputValue, path) {
+      console.log(inputValue, path)
+      return path.some(option => option.productTypeName.indexOf(inputValue) > -1);
+    },
     setDefValue(defaultVal){
     setDefValue(defaultVal){
       this.handleChange(defaultVal)
       this.handleChange(defaultVal)
     },
     },