javascript - Under what circumstances will vue execute the destruction hook in the life cycle?
大家讲道理
大家讲道理 2017-07-05 10:49:59
0
1
953

Under what circumstances will vue execute the destruction hook in the life cycle?

大家讲道理
大家讲道理

光阴似箭催人老,日月如移越少年。

reply all(1)
巴扎黑

When the component is destroyed

<demo v-if="hasDemo"></demo>

Then when hasDemo is changed from true to false, the destruction hook of the Demo component will be triggered.

Note that the v-show command does not destroy the element but only hides it, so this hook will not be triggered.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template