vue.js - How can I reload a vue component? -


i know solution update prop data :

this.selectedcontinent = "" 

but want use solution

after read reference, solution :

this.$forceupdate() 

i try it, not work

demo , full code :

https://jsfiddle.net/lgxrcc5p/13/

you can click button test try it

i need solution other update property data

you can use object.assign assign initial data properties.

instead of this.$forceupdate()

you should use object.assign(this.$data,this.$options.data.call(this)).

here using this.$options.data original data , assigning values this.$data.

see updated fiddle link.

update:

another method: link


Comments

Popular posts from this blog

ios - MKAnnotationView layer is not of expected type: MKLayer -

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -