vue watch & arrow function bug
vue watch & arrow function bug
watch: {
GeoJSON: function(newValue, oldValue) {
log(`\n\n\nGeoJSON`, newValue ? JSON.parse(newValue) : newValue);
if(newValue) {
const {
features,
} = JSON.parse(newValue);
this.showSVGAreas(features || []);
// this.$methods.showSVGAreas(features || []);
}
},
// arrow function bug
// GeoJSON: (newValue, oldValue) => {
// log(`\n\n\nGeoJSON`, newValue ? JSON.parse(newValue) : newValue);
// if(newValue) {
// const {
// features,
// } = newValue;
// // this.showSVGAreas(features || []);
// // this.$methods.showSVGAreas(features || []);
// }
// },
},
bug

solution


macOS emoji
ctrl + command + space === emoji
本文首发于博客园,作者:xgqfrms,原文链接:https://www.cnblogs.com/xgqfrms/p/12543534.html
未经授权禁止转载,违者必究!

浙公网安备 33010602011771号