import { dealerProductBrandQuery } from '@/api/dealerProductBrand' const ProductBrand = { template: ` {{ item.brandName }} `, props: { value: { type: String, defatut: '' }, id: { type: String, default: '' }, sysFlag: { type: String, default: '1' } }, data() { return { defaultVal: this.value, productBrandList: [] }; }, mounted() { this.getProductBrand() }, watch: { value(newValue, oldValue) { this.defaultVal = newValue } }, methods: { filterOption (input, option) { return ( option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0 ) }, handleChange(value) { this.defaultVal = value; this.$emit('change', value); this.$emit('input', value); }, // 产品品牌列表, sysFlag: 1 箭冠 0 自建 getProductBrand () { dealerProductBrandQuery({ 'sysFlag': this.sysFlag }).then(res => { if (res.status == 200) { this.productBrandList = res.data } else { this.productBrandList = [] } }) }, }, }; export default ProductBrand