force reload data when hash is not changed
This commit is contained in:
@@ -128,7 +128,7 @@
|
|||||||
method: "PUT",
|
method: "PUT",
|
||||||
data: data,
|
data: data,
|
||||||
success: (data)=> {
|
success: (data)=> {
|
||||||
// todo
|
alert("更新成功");
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -67,9 +67,11 @@
|
|||||||
data(){
|
data(){
|
||||||
this.$watch('showAdminOnly', function (val) {
|
this.$watch('showAdminOnly', function (val) {
|
||||||
sessionStorage.showAdminOnly = JSON.stringify(val);
|
sessionStorage.showAdminOnly = JSON.stringify(val);
|
||||||
this.$router.go({name: this.$route.name, params: {page: 1}});
|
this.$router.go({path: "/user/1", query: {_: (new Date()).getTime()}});
|
||||||
});
|
});
|
||||||
|
|
||||||
this.pagination.currentPage = this.$route.params.page;
|
this.pagination.currentPage = this.$route.params.page;
|
||||||
|
|
||||||
if (sessionStorage.showAdminOnly) {
|
if (sessionStorage.showAdminOnly) {
|
||||||
this.showAdminOnly = JSON.parse(sessionStorage.showAdminOnly);
|
this.showAdminOnly = JSON.parse(sessionStorage.showAdminOnly);
|
||||||
}
|
}
|
||||||
@@ -99,8 +101,9 @@
|
|||||||
},
|
},
|
||||||
search() {
|
search() {
|
||||||
sessionStorage.userListSearchKeyword = this.keyword;
|
sessionStorage.userListSearchKeyword = this.keyword;
|
||||||
this.pagination.currentPage = 1;
|
this.$router.go({path: "/user/1", query: {_: (new Date()).getTime()}});
|
||||||
this.loadData();
|
// pager goto page 1
|
||||||
|
// url -> /user/1
|
||||||
},
|
},
|
||||||
edit(userId) {
|
edit(userId) {
|
||||||
this.$router.go("/user/edit/" + userId)
|
this.$router.go("/user/edit/" + userId)
|
||||||
|
|||||||
@@ -1,17 +1,9 @@
|
|||||||
<template id="back">
|
<template id="back">
|
||||||
<nav>
|
<nav onclick="history.back()">
|
||||||
<ul class="pager">
|
<ul class="pager">
|
||||||
<li class="previous">
|
<li class="previous">
|
||||||
<a href="#" v-link="url">
|
<span aria-hidden="true">← {{ $t("adminUtils.back") }}</span>
|
||||||
<span aria-hidden="true">←</span>
|
|
||||||
{{ $t("adminUtils.back") }}
|
|
||||||
</a>
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
|
||||||
export default{
|
|
||||||
props: ["url"]
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
Reference in New Issue
Block a user