提交 ca85b9c4 authored 作者: 罗超's avatar 罗超

feat:增加页面无感保留缓存

上级 c64ec137
......@@ -17,6 +17,7 @@
- [x] 增加 vue-echarts 配合 echarts,方便使用
- [x] 分页列表使用`ty-table`,统一封装和样式
- [x] 修改 route.name 以相对 views 目录路径为组合大驼峰,如菜单页面 `SystemMenuIndex`,防止 name 重复
- [x] 增加页面无感保留缓存,具体使用见`\utils\keepAlive.js`
- [ ] 测试`ty-ui`,并增加页面使用案例
- [ ] 设计师设计并调整页面整体样式
......
......@@ -17,7 +17,7 @@
</template>
<script>
const version = require('element-ui/package.json').version; // element-ui version from node_modules
// const version = require('elementso-ui/package.jn').version; // element-ui version from node_modules
const ORIGINAL_THEME = '#409EFF'; // default color
export default {
......@@ -78,8 +78,8 @@ export default {
};
if (!this.chalk) {
const url = `https://unpkg.com/element-ui@${version}/lib/theme-chalk/index.css`;
await this.getCSSString(url, 'chalk');
// const url = `https://unpkg.com/element-ui@${version}/lib/theme-chalk/index.css`;
// await this.getCSSString(url, 'chalk');
}
const chalkHandler = getHandler('chalk', 'chalk-style');
......
......@@ -6,6 +6,7 @@ import directive from './directive';
import './permission';
import './plugins';
import './utils/keepAlive';
Vue.use(directive);
......
import router from '../router';
import store from '../store';
// 需要保留搜索的页面路由,页面必须设置和路由信息对应的name
const keepAliveRoutes = [];
router.beforeEach((to, from, next) => {
if (keepAliveRoutes.includes(to.path)) {
store.dispatch('tagsView/addView', to);
}
next();
});
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论