Home > front end >  Vue non-inductive refresh
Vue non-inductive refresh

Time:11-30

1, in the app. Set reload vue, let components to reload,



<script>
Export the default {
Name: 'App',
Dojo.provide () {
Return {
Reload: this. Reload
}
},
Data () {
Return {
IsRouterAlive: true
}
},
Methods: {
Reload () {
Enclosing isRouterAlive=false
This $nextTick (function () {
Enclosing isRouterAlive=true
})
}
}
}
"Setup" parts of the above is app. Vue




Then in the component of need to refresh call



Export the default {
Name: 'Layout'
Inject: [' reload '],
Components: {
Navbar,
The Sidebar,
AppMain,
HeadMenu
},
Methods: {
Flush () {
This. Reload ()//in through inject into
}
}


"These are need to be refreshed the page"


2, if you need to refresh the page is the introduction of child components, it can be modified by the parent component binding the key values of the refresh


Inquire inquire, nestable. Js drag-and-drop plug-ins how do ban drag and drop,
  • Related