登录社区云,与社区用户共同成长
邀请您加入社区
作用:刷新vue组件使用方法:在APP.vue中provide(){return {reload:this.reload}},methods:{reload(){this.isRouterAlive = falsethis.$nextTick(function(){
在APP.vue中
provide(){ return { reload:this.reload } },
methods:{ reload(){ this.isRouterAlive = false this.$nextTick(function(){ this.isRouterAlive = true }) } }
子组件中使用:
inject: ['reload'],
引入后直接this.reload()即可
this.reload()
基于 Vue 的企业级 UI 组件库和中后台系统解决方案,为数万开发者服务。
更多推荐
Element UI组件介绍
简介element ui 就是基于vue的一个ui框架,该框架基于vue开发了很多相关组件,方便我们快速开发页面。1、安装Element UI,通过vue脚手架创建项vue init webpack element(项目名)2、在vue脚手架项目中安装elementui# 1.下载elementui的依赖npm i element-ui -S# 2.指定当前项目中使用elementuiimport
vue+element-ui
VUE 入门及应用 ( 五 ) ElementUI 组件
扫一扫分享内容
所有评论(0)