Commit 2584f87d by 姜雷

修改异步加载时可能还未渲染出dom的报错

parent 226614a4
import Vue from 'vue';
import Router from 'vue-router';
import Home from './containers/Home.vue';
import DatePicker from './containers/DatePicker.vue';
// import Home from './containers/Home.vue';
// import DatePicker from './containers/DatePicker.vue';
import SearchItem from './containers/SearchItem.vue';
import Pagination from './containers/Pagination.vue';
import Dialog from './containers/Dialog.vue';
......@@ -13,18 +13,23 @@ import layoutIcon from '../src/assets/images/menu/home.png';
Vue.use(Router);
export const routerMap = [
{ path: '/', name: 'Home', component: Home, meta: { title: '首页' } },
{
path: '/',
name: 'Home',
component: () => import('./containers/Home.vue'),
meta: { title: '首页' },
},
{
path: '/home2',
name: 'HomeT',
component: Home,
component: () => import('./containers/Home.vue'),
hidden: true,
meta: { title: '首页' },
},
{
path: '/DatePicker',
name: 'DatePicker',
component: DatePicker,
component: () => import('./containers/DatePicker.vue'),
meta: { title: '时间选择' },
},
{
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"name": "rym-element-ui",
"version": "0.1.25",
"version": "0.1.26",
"description": "任意门组件库",
"main": "lib/rymUi.common.js",
"scripts": {
......
......@@ -83,12 +83,14 @@ export default {
moveToCurrentTag() {
const tags = this.$refs.tag;
this.$nextTick(() => {
if (tags && tags.length) {
for (const tag of tags) {
if (tag.to === this.$route.path) {
this.$refs.scrollPane.moveToTarget(tag.$el);
break;
}
}
}
});
},
closeSelectedTag(view) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment