From 838f4ff0eb6808eb740de5f028b30f9c0434abc8 Mon Sep 17 00:00:00 2001 From: liweilong <515897141@qq.com> Date: 星期二, 29 十二月 2020 18:58:58 +0800 Subject: [PATCH] 优化列表demo --- src/pages/system/role.vue | 12 ++++++++++-- 1 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/pages/system/role.vue b/src/pages/system/role.vue index 411c22d..b3fdecc 100644 --- a/src/pages/system/role.vue +++ b/src/pages/system/role.vue @@ -70,8 +70,10 @@ <script> +import mixin_keepAlive from '@/mixins/keepAlive.js' // 椤甸潰缂撳瓨 export default { name: 'Role', + mixins: [mixin_keepAlive], data() { return { showSearch: true, // 鏄惁鏄剧ず鎼滅储鍖� @@ -87,11 +89,17 @@ } }, mounted() { - this.init() + // 鍦╩ixin_keepAlive => activated鍒濆鍖� }, methods: { // 鍒濆鍖� init() { + // keepalive閲嶇疆鍒濆鍊� + this.resetHandle() + }, + + // 杩斿洖鍒锋柊 + regInit() { this.getList() }, @@ -102,7 +110,7 @@ url: 'admin/role/list', params: { pageNum: pageNum, - rowCount: pageSize, + pageSize: pageSize, keyWord: keyWord }, mockData: { -- Gitblit v1.8.0