काम नहीं करने के लिए मुझे परिवर्तनीय rasters_previews_list
को जांचने की आवश्यकता है।परिवर्तनीय परिवर्तन के लिए देखें
var userContent = Vue.extend({
template: '<p>Some template</p>',
data: function() {
return {
rasters_previews_list: []
}
},
watch: {
'rasters_previews_list': function(value, mutation) {
console.log("Value changed");
}
}
});
लेकिन कंसोल में मैं Value changed
नहीं दिख रहा है, जब यह नया डेटा मिला: यहाँ मेरी कोड है।
डाटा बदलते समारोह:
map.on('draw:created', function (e) {
//...
Vue.http.post('/dbdata', DataBody).then((response) => {
userContent.rasters_previews_list = response; // putting JSON answer to Component data in userContent
console.log(response);
}, (response) => {
console.log("Can't get list rasters metadata from DB. Server error: ", response.status)
});
मैं map.on('draw:created', function (e)
(पत्रक जे एस) का मान बदलें। मैं console.log आउटपुट देखता हूं, ऐसा लगता है कि डेटा बदल रहा है।
में बताया गया है आपको अपना कोड – gurghet
@gurghet में मूल्य बदल रहे हैं मैं बाहर –
से डेटा को बदलने के लिए आप के साथ सफलता मिली है उत्तर दिया गया? – gurghet