the following is the part of the VueRouter definition:
path:"/second/goto",
components :{
default:first,
aview:goto,
bview:goto2
}
here are the components that contain the path / second/goto
:
<router-link to="/second/goto">goto</router-link>
<!--<keep-alive>-->
<router-view class="view default-view" :seller="seller"></router-view>
<router-view class="view a-view" name="aview"></router-view>
<router-view class="view b-view" name="bview"></router-view>
<!-- </keep-alive>-->
</div>
but if you wrap keep-alive
notes around router-view
, you can only display first
, and the keep-alive
tag is used as a cache component. I don"t understand why?