This commit is contained in:
Zheng Jie
2022-08-05 17:57:26 +08:00
parent 5c501a048a
commit 5362555d06

View File

@@ -25,23 +25,23 @@ export default {
},
key() {
return this.$route.path
},
watch: {
'$route.path': {
handler: function() {
// define ads element
const ads = document.getElementById('ww-container')
// ad parent node
const prn = ads.parentNode
// lets clone ads block
const cln = ads.cloneNode(true)
// remove the current ads block completely
prn.removeChild(ads)
// append a newly cloned one
prn.appendChild(cln)
}
}
}
// watch: {
// '$route.path': {
// handler: function() {
// // define ads element
// const ads = document.getElementById('ww-container')
// // ad parent node
// const prn = ads.parentNode
// // lets clone ads block
// const cln = ads.cloneNode(true)
// // remove the current ads block completely
// prn.removeChild(ads)
// // append a newly cloned one
// prn.appendChild(cln)
// }
// }
// }
}
}
</script>