data () { return { // 退出确认 backConfirm: true } }, // 导航离开该组件的对应路由时调用 beforeRouteLeave (to, from, next) { if (this.backConfirm) { mui.confirm('数据未进行保存将会丢失,确认退出本页面吗?', '提示', ['否', '是'], function (e) { if (e.index == 1) { next(true); } }) } }
data () { return { // 退出确认 backConfirm: true } }, // 导航离开该组件的对应路由时调用 beforeRouteLeave (to, from, next) { if (this.backConfirm) { mui.confirm('数据未进行保存将会丢失,确认退出本页面吗?', '提示', ['否', '是'], function (e) { if (e.index == 1) { next(true); } }) } }
本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。