✨ feat: 二维码信息变更
This commit is contained in:
@@ -38,7 +38,8 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
warehouseOptions: [],
|
||||
innerValue: this.value
|
||||
innerValue: this.value,
|
||||
list: []
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
@@ -52,6 +53,7 @@ export default {
|
||||
methods: {
|
||||
loadOptions() {
|
||||
listWarehouse().then(response => {
|
||||
this.list = response.data;
|
||||
const options = [];
|
||||
if (this.showTop) {
|
||||
const top = { warehouseId: 0, warehouseName: '顶级节点', children: [] };
|
||||
@@ -88,6 +90,9 @@ export default {
|
||||
this.innerValue = null;
|
||||
} else {
|
||||
this.$emit('input', val);
|
||||
// 查找完整的仓库对象
|
||||
const warehouse = this.list.find(item => item.warehouseId === val);
|
||||
this.$emit('change', warehouse);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user