|
@@ -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)
|
|
|
},
|