|
@@ -75,20 +75,20 @@ export default {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
watch: {
|
|
watch: {
|
|
|
- value: {
|
|
|
|
|
- immediate: true,
|
|
|
|
|
- handler(val) {
|
|
|
|
|
- if (Array.isArray(val) && val.length > 0) {
|
|
|
|
|
- val.forEach(w => {
|
|
|
|
|
- const dim = this.dimensions.find(d => d.code === w.dimension)
|
|
|
|
|
- if (dim) {
|
|
|
|
|
- dim.currentValue = w.weight || 0
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ value(val) {
|
|
|
|
|
+ if (Array.isArray(val) && val.length > 0) {
|
|
|
|
|
+ val.forEach(w => {
|
|
|
|
|
+ const dim = this.dimensions.find(d => d.code === w.dimension)
|
|
|
|
|
+ if (dim) {
|
|
|
|
|
+ dim.currentValue = w.weight || 0
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
+ mounted() {
|
|
|
|
|
+ this.emitValue()
|
|
|
|
|
+ },
|
|
|
methods: {
|
|
methods: {
|
|
|
onWeightChange(changedCode) {
|
|
onWeightChange(changedCode) {
|
|
|
var changed = this.dimensions.find(function(d) { return d.code === changedCode })
|
|
var changed = this.dimensions.find(function(d) { return d.code === changedCode })
|