mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-ui.git
synced 2025-12-21 10:25:53 +08:00
商家端列表页缓存
This commit is contained in:
@@ -54,7 +54,7 @@
|
||||
</Poptip>
|
||||
</template>
|
||||
</Table>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Row type="flex" justify="end" class="mt_10">
|
||||
<Page
|
||||
:current="searchForm.pageNumber"
|
||||
:total="total"
|
||||
@@ -243,9 +243,14 @@
|
||||
});
|
||||
},
|
||||
},
|
||||
activated() {
|
||||
mounted() {
|
||||
this.init();
|
||||
},
|
||||
// 页面缓存处理,从该页面离开时,修改KeepAlive为false,保证进入该页面是刷新
|
||||
beforeRouteLeave(to, from, next) {
|
||||
from.meta.keepAlive = false
|
||||
next()
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
|
||||
@@ -371,13 +371,20 @@ export default {
|
||||
});
|
||||
},
|
||||
},
|
||||
activated () {
|
||||
mounted () {
|
||||
this.id = this.$route.query.id;
|
||||
this.getDetail();
|
||||
this.accessToken = {
|
||||
accessToken: this.getStore("accessToken"),
|
||||
};
|
||||
},
|
||||
// 如果是从详情页返回列表页,修改列表页keepAlive为true,确保不刷新页面
|
||||
beforeRouteLeave(to, from, next){
|
||||
if(to.name === 'orderComplaint') {
|
||||
to.meta.keepAlive = true
|
||||
}
|
||||
next()
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
|
||||
</template>
|
||||
</Table>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Row type="flex" justify="end" class="mt_10">
|
||||
<Page
|
||||
:current="searchForm.pageNumber"
|
||||
:total="total"
|
||||
@@ -279,9 +279,14 @@
|
||||
|
||||
},
|
||||
},
|
||||
activated () {
|
||||
mounted () {
|
||||
this.init();
|
||||
},
|
||||
// 页面缓存处理,从该页面离开时,修改KeepAlive为false,保证进入该页面是刷新
|
||||
beforeRouteLeave(to, from, next) {
|
||||
from.meta.keepAlive = false
|
||||
next()
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
|
||||
</template>
|
||||
</Table>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Row type="flex" justify="end" class="mt_10">
|
||||
<Page
|
||||
:current="searchForm.pageNumber"
|
||||
:total="total"
|
||||
@@ -260,7 +260,6 @@
|
||||
this.loading = false;
|
||||
if (res.success) {
|
||||
this.data = res.result.records;
|
||||
console.log(this.data)
|
||||
this.total = res.result.total;
|
||||
}
|
||||
});
|
||||
@@ -277,9 +276,14 @@
|
||||
|
||||
},
|
||||
},
|
||||
activated() {
|
||||
mounted() {
|
||||
this.init();
|
||||
},
|
||||
// 页面缓存处理,从该页面离开时,修改KeepAlive为false,保证进入该页面是刷新
|
||||
beforeRouteLeave(to, from, next) {
|
||||
from.meta.keepAlive = false
|
||||
next()
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
|
||||
@@ -522,6 +522,13 @@ export default {
|
||||
this.sn = this.$route.query.sn;
|
||||
this.getDetail();
|
||||
},
|
||||
// 如果是从详情页返回列表页,修改列表页keepAlive为true,确保不刷新页面
|
||||
beforeRouteLeave(to, from, next){
|
||||
if(to.name === 'returnGoodsOrder' || to.name === 'returnMoneyOrder') {
|
||||
to.meta.keepAlive = true
|
||||
}
|
||||
next()
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@@ -817,6 +817,13 @@ export default {
|
||||
this.sn = this.$route.query.sn;
|
||||
this.getDataDetail();
|
||||
},
|
||||
// 如果是从详情页返回列表页,修改列表页keepAlive为true,确保不刷新页面
|
||||
beforeRouteLeave(to, from, next){
|
||||
if(to.name === 'orderList' || to.name === 'virtualOrderList') {
|
||||
to.meta.keepAlive = true
|
||||
}
|
||||
next()
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
</download-excel>
|
||||
</div>
|
||||
<Table class="mt_10" :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom"></Table>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Row type="flex" justify="end" class="mt_10">
|
||||
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]" size="small"
|
||||
show-total show-elevator show-sizer></Page>
|
||||
</Row>
|
||||
@@ -298,9 +298,14 @@ export default {
|
||||
});
|
||||
},
|
||||
},
|
||||
activated() {
|
||||
mounted() {
|
||||
this.init();
|
||||
},
|
||||
// 页面缓存处理,从该页面离开时,修改KeepAlive为false,保证进入该页面是刷新
|
||||
beforeRouteLeave(to, from, next) {
|
||||
from.meta.keepAlive = false
|
||||
next()
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
|
||||
</div>
|
||||
<Table class="mt_10" :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect"></Table>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Row type="flex" justify="end" class="mt_10">
|
||||
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]" size="small"
|
||||
show-total show-elevator show-sizer></Page>
|
||||
</Row>
|
||||
@@ -261,9 +261,14 @@ export default {
|
||||
});
|
||||
},
|
||||
},
|
||||
activated() {
|
||||
mounted() {
|
||||
this.init();
|
||||
},
|
||||
// 页面缓存处理,从该页面离开时,修改KeepAlive为false,保证进入该页面是刷新
|
||||
beforeRouteLeave(to, from, next) {
|
||||
from.meta.keepAlive = false
|
||||
next()
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
<a @click="$router.push({name: 'order-detail',query: {sn: scope.row.orderSn}})">{{scope.row.orderSn}}</a>
|
||||
</template>
|
||||
</Table>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Row type="flex" justify="end" class="mt_10">
|
||||
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]" size="small"
|
||||
show-total show-elevator show-sizer></Page>
|
||||
</Row>
|
||||
@@ -264,7 +264,7 @@ export default {
|
||||
});
|
||||
},
|
||||
},
|
||||
activated() {
|
||||
mounted() {
|
||||
this.init();
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user