|
@@ -11,7 +11,7 @@ const ProductBrand = {
|
|
|
option-filter-prop="children"
|
|
|
:dropdownMatchSelectWidth="false"
|
|
|
:filter-option="filterOption">
|
|
|
- <a-select-option v-for="item in productBrandList" :key="item.brandSn" :value="item.brandSn">{{ item.brandName }}</a-select-option>
|
|
|
+ <a-select-option v-for="item in productBrandList" :pinyin="item.pinyin" :key="item.brandSn" :value="item.brandSn">{{ item.brandName }}</a-select-option>
|
|
|
</a-select>
|
|
|
`,
|
|
|
props: {
|
|
@@ -44,8 +44,10 @@ const ProductBrand = {
|
|
|
},
|
|
|
methods: {
|
|
|
filterOption (input, option) {
|
|
|
+ console.log(input, option.data.attrs.pinyin)
|
|
|
return (
|
|
|
- option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
+ option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0 ||
|
|
|
+ option.data.attrs.pinyin.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
)
|
|
|
},
|
|
|
handleChange(value) {
|