VUEJS2.0.0.rc.2 vm.$destroy(true) does not work
See original GitHub issueVue.js version
2.0.0.rc.2
Reproduction Link
https://jsfiddle.net/matiascx/apokjqxx/
Steps to reproduce
click the destroy A button in the fiddle
What is Expected?
A component is destroyed
What is actually happening?
when click the button, the following code will be executed:
this.$destroy(true)
Unfortunately the component is not destroyed as expected. In vuejs.1.0.26, that works well. Please check whether or not it is a bug of vue2.0 or something i have done wrong
Issue Analytics
- State:
- Created 7 years ago
- Comments:9 (6 by maintainers)
Top Results From Across the Web
VUEJS2.0.0.rc.2 vm.$destroy(true) does not work
With vuejs2.0.0.rc.2, i can not destroy a component with this.$destroy(true) Although the event listener removed, but the dom node is not ...
Read more >vuejs/vue - Gitter
Vuex (or any Flux-like store) enforces a rule that your main data store can only be changed in certain, specific, fixed ways. So......
Read more >non-unique polygons id slot values - You.com | The Search ...
This is an example of a list with two separate (not adjacent or overlapping) ... true\n });\n timerFunc = function () {\n counter...
Read more >32 keyboard limit: mb memory poi - CSDN
In this post he works with BigQuery – Google's serverless data warehouse – to run k-means clustering over Stack Overflow's published dataset, which...
Read more >https://git.opensocial.at/friendica/friendica-addo...
If you are on the `dev` branch, files here are **NOT** up to date. ... +var REJECTED = 1; +var PENDING = 2;...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@cnweibo fyi the usage in your fiddle will be considered bad practice in 2.0 - in general you should not manually destroy instances, or manipulate its DOM element when the instance is rendered by a parent component. This is why
$destroy
doesn’t provide that argument anymore and methods like$remove
,$appendTo
are deprecated.Again, the recommended usage is making it “data-driven”, make the
<ca>
component controlled by av-if
in the parent scope, and toggle thatv-if
by emitting an event.@yyx990803 , same question with sqal. Currently, i solve this in-compatible issue with additional code in addition to the vm.$destroy():
It seems strange, i must append above code with vm.$destroy(true) itself If we can still support that parameter, it will be great thanks!~