提交 4215a9f4 编写于 作者: zhentian.jia's avatar zhentian.jia

update

上级 0fa9d088
......@@ -104,7 +104,7 @@ export default {
}
],
tableData: [],
totalRows: 0,
totalRows: 0
};
},
computed: {
......@@ -113,26 +113,26 @@ export default {
created() {
vm = this;
this.search();
window.onbeforeunload = function(e) {
let pathname = location.href.split("/");
pathname = pathname[pathname.length - 1];
// console.log(pathname);
if (pathname == "item-shield") {
e = e || window.event;
if (e) {
e.returnValue = "关闭提示";
}
return "关闭提示";
}
};
// window.onbeforeunload = function(e) {
// let pathname = location.href.split("/");
// pathname = pathname[pathname.length - 1];
// // console.log(pathname);
// if (pathname == "item-shield") {
// e = e || window.event;
// if (e) {
// e.returnValue = "关闭提示";
// }
// return "关闭提示";
// }
// };
},
// 挂载到Dom完成时
mounted: function() {
window.onbeforeunload = function(e) {
let pathname = location.href.split('/');
pathname = pathname[pathname.length-1];
let pathname = location.href.split("/");
pathname = pathname[pathname.length - 1];
console.log(pathname);
if(pathname == 'item-shield') {
if (pathname == "item-shield") {
e = e || window.event;
if (e) {
e.returnValue = "数据不会保存";
......@@ -140,7 +140,6 @@ export default {
return "数据不会保存";
}
};
commonUtil.resizeHeight();
},
beforeRouteLeave(to, from, next) {
......@@ -153,8 +152,7 @@ export default {
next(false);
}
},
destroyed() {
},
destroyed() {},
methods: {
searchList() {
this.formInline.pageNo = 1;
......@@ -180,9 +178,10 @@ export default {
//改变
changeType(value) {
console.log(value);
vm.searchList();
},
complete() {
console.log('完成');
console.log("完成");
},
handleSizeChange(val) {
console.log(`每页 ${val} 条`);
......@@ -192,7 +191,7 @@ export default {
console.log(`当前页: ${val}`);
this.formInline.pageNo = val;
this.search();
},
}
}
};
</script>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册