lilei 2 vuotta sitten
vanhempi
commit
9b051892bb
1 muutettua tiedostoa jossa 5 lisäystä ja 0 poistoa
  1. 5 0
      src/views/common/productTypeAll.js

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

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