当前位置:首页 » 《资源分享》 » 正文

Vue实现组件的局部刷新_云达阁

12 人参与  2021年11月01日 08:43  分类 : 《资源分享》  评论

点击全文阅读


<template>
	<div v-if="reFresh">
		...
	</div>
</template>

export default {
	data() {
		return {
			reFresh: true
		}
	},
	methods: {
		initPage() {...},
		handleReFresh() {
			this.reFresh = false
			this.$nextTick(() => {
				this.initPage() // 初始化页面数据
				this.reFresh = true
			})
		}
	}
}

点击全文阅读


本文链接:http://zhangshiyu.com/post/30347.html

初始化  页面  数据  
<< 上一篇 下一篇 >>

  • 评论(0)
  • 赞助本站

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

关于我们 | 我要投稿 | 免责申明

Copyright © 2020-2022 ZhangShiYu.com Rights Reserved.豫ICP备2022013469号-1