摘要: listenPage() { window.onbeforeunload = function (e) { e = e || window.event; if (e) { e.returnValue = '关闭提示'; } return '关闭提示'; }; } 在mounted中调用即可,当按下F 阅读全文
posted @ 2020-03-27 16:42 kitterKing 阅读(13735) 评论(0) 推荐(1) 编辑
摘要: 一、父组件调用子组件函数 父组件: <template> <child ref="editFun"></child> //子组件绑定 </template> 父组件调用子组件函数 this.$refs.editFun.init(参数); 子组件: methods:{ init(参数){ //父组件调 阅读全文
posted @ 2020-03-27 16:24 kitterKing 阅读(567) 评论(0) 推荐(0) 编辑