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:
@@ -29,10 +29,9 @@
|
||||
<template slot-scope="{ row }" slot="action">
|
||||
<Button v-if="row.promotionStatus === 'NEW' || row.promotionStatus === 'CLOSE'" type="info" size="small" :style="{'marginRight': row.promotionStatus !== 'CLOSE'?'5px':'0'}" @click="edit(row)">编辑</Button>
|
||||
<Button v-if="row.promotionStatus !== 'CLOSE'" type="error" size="small" @click="remove(row)">下架</Button>
|
||||
<!-- <Button v-if="row.promotionStatus === 'CLOSE' || row.promotionStatus === 'NEW'" type="success" size="small" @click="open(row)">上架</Button> -->
|
||||
</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>
|
||||
@@ -337,7 +336,7 @@ export default {
|
||||
});
|
||||
},
|
||||
},
|
||||
activated() {
|
||||
mounted() {
|
||||
this.init();
|
||||
},
|
||||
};
|
||||
|
||||
@@ -296,8 +296,13 @@ export default {
|
||||
});
|
||||
},
|
||||
},
|
||||
activated () {
|
||||
mounted () {
|
||||
this.init();
|
||||
},
|
||||
// 页面缓存处理,从该页面离开时,修改KeepAlive为false,保证进入该页面是刷新
|
||||
beforeRouteLeave(to, from, next) {
|
||||
from.meta.keepAlive = false
|
||||
next()
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
</Tabs>
|
||||
<Table :columns="liveColumns" :data="liveData"></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="changePageNumber" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]"
|
||||
size="small" show-total show-elevator show-sizer></Page>
|
||||
</Row>
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
</div>
|
||||
</template>
|
||||
</Table>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Row type="flex" justify="end" class="mt_10">
|
||||
<Page
|
||||
:current="searchForm.pageNumber + 1"
|
||||
:total="total"
|
||||
@@ -329,9 +329,14 @@ export default {
|
||||
});
|
||||
},
|
||||
},
|
||||
activated() {
|
||||
mounted() {
|
||||
this.init();
|
||||
},
|
||||
// 页面缓存处理,从该页面离开时,修改KeepAlive为false,保证进入该页面是刷新
|
||||
beforeRouteLeave(to, from, next) {
|
||||
from.meta.keepAlive = false
|
||||
next()
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
|
||||
@@ -285,6 +285,13 @@ export default {
|
||||
mounted () {
|
||||
this.init();
|
||||
},
|
||||
// 如果是从详情页返回列表页,修改列表页keepAlive为true,确保不刷新页面
|
||||
beforeRouteLeave(to, from, next){
|
||||
if(to.name === 'pintuan') {
|
||||
to.meta.keepAlive = true
|
||||
}
|
||||
next()
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
>
|
||||
</template>
|
||||
</Table>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Row type="flex" justify="end" class="mt_10">
|
||||
<Page :current="searchForm.pageNumber + 1" :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>
|
||||
@@ -206,8 +206,13 @@ export default {
|
||||
return hourArr;
|
||||
},
|
||||
},
|
||||
activated() {
|
||||
mounted() {
|
||||
this.init();
|
||||
},
|
||||
// 页面缓存处理,从该页面离开时,修改KeepAlive为false,保证进入该页面是刷新
|
||||
beforeRouteLeave(to, from, next) {
|
||||
from.meta.keepAlive = false
|
||||
next()
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@@ -223,11 +228,5 @@ export default {
|
||||
.select-clear {
|
||||
margin-left: 10px;
|
||||
}
|
||||
.page {
|
||||
margin-top: 2vh;
|
||||
}
|
||||
.drop-down {
|
||||
margin-left: 5px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -395,6 +395,13 @@ export default {
|
||||
mounted() {
|
||||
this.init();
|
||||
},
|
||||
// 如果是从详情页返回列表页,修改列表页keepAlive为true,确保不刷新页面
|
||||
beforeRouteLeave(to, from, next){
|
||||
if(to.name === 'seckill') {
|
||||
to.meta.keepAlive = true
|
||||
}
|
||||
next()
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
||||
Reference in New Issue
Block a user