Modify routing table :src/router/index.js

import Vue from 'vue';
import Router from 'vue-router';
// The main writing method is as follows
const Test = r => require.ensure([], () => r(require('@/components/test/test.vue')), 'test');
 
const routes = [{
path: '/',
redirect: '/error/404'
},
{
path: '/test',
name: 'test',
component: Test
}];
 
export default new Router({
mode: 'history',
base: '/',
routes: routes
})

vue The project is packaged according to the service route , The page only loads more related articles of the corresponding resources

  1. [IOS]UIWebView Request a web page or load a local resource page

    UIWebView It's a web page display IOS View control , We can use it to visit a website . Here's a concrete example : Operation steps : 1. First, in the xib Drag and drop one in the file UIWebView Control to view in 2. Will download the page as well as ...

  2. Maven engineering webinfo Below JSP The page could not be loaded .js、.css File solutions

    -- Here is my project path -- I jsp Writing ----- Start the project , visit js The path to the file is like this , href="http://localhost:8080/activiti/css/public. ...

  3. vue Component reference on demand ,vue-router Lazy loading ,vue Package optimization , Loading animation

    When you package and build an application ,Javascript The bag will get very big , Affects page loading . If we can divide the components corresponding to different routes into different code blocks , Then the corresponding component is loaded when the route is accessed , It's more efficient . combination Vue Of   asynchronous ...

  4. vue Reasons and solutions for slow page loading for the first time

    Packing for the first time vue When the project is deployed to the server , It is found that the initial loading is very slow , nearly 20s The page just loads out , It's not as smooth as the development environment . The main reason is that if the page is not configured after packaging, the resource file will be very large , You want to load all at once ...

  5. Vue + Element UI Implementation of rights management system ( Dynamic loading menu )

    Dynamic loading menu Before our navigation tree is written dead in the page , In practical application, it needs to get the menu data from the background server and then generate it dynamically . Here we use the data format prepared in the last article Mock We'll get the simulation data , And then dynamically generate our navigation menu . Interface ...

  6. The front-end technology -HTML Page loading

    HTML Page loading HTML Page loading is actually based on http The process + Analysis and rendering of data by browser . http The request process of the protocol is based on TCP Agreed .http It's based on TCP On the basis of connection , To put it simply ,TCP Just connecting , It doesn't matter ...

  7. analysis https Web page loading http The reason and solution of page error caused by resources

    https Web page loading http Page errors caused by resources and solutions https Is the mainstream trend of the current website , Even big companies like apple , Users are required to use https Address . But for the past http Link to , We tend to have a ...

  8. Perfect solution Webpack Multi page hot loading slow problem 【 Reprint 】

    Copyright notice : This article is an original blog article , follow CC 4.0 BY-SA Copyright agreement , For reprint, please attach the original source link and this statement . Link to this article :https://blog.csdn.net/localhost_1314/article ...

  9. Vue-Router The page is loading effects

    Vue-Router The page is loading effects If you are using Vue.js and Vue-Router Develop single page application . Because every page is a Vue Components , You need to request data from the server side , And then let Vue Engine to render ...

Random recommendation

  1. Android Use pull,sax analysis xml

    pull analysis xml file 1. get XmlpullParser Class reference There are two ways // Parser factory XmlPullParserFactory factory=XmlPullParserFactory. ...

  2. Extjs 3.4 A combination of equal values

    Excerpt from :http://www.cnblogs.com/kunpengit/archive/2012/11/13/2768239.html/** * grid gridPanel Tables that need to be merged * ro ...

  3. HTML label _01

    <!DOCTYPE html> <html> <body> <h1> My first title </h1> <p> My first paragraph .</p ...

  4. Sicily 1068 Welcome to put forward the optimization plan

    1608. Digit Counting Limiting conditions The time limit : 1 second , Memory limit : 32 mega Title Description Trung is bored with his mathematics homeworks. ...

  5. LINQ TO SQL How to Execute the stored procedure and return the temporary table of the stored procedure

    Checked GOOGLE once , This solution can solve My stored procedure is like this : CREATE procedure cal_month_dep_fast  @begdt datetime,@endt datetime ...

  6. PureMVC(JS edition ) The source code parsing ( Nine ):View class

    In the interpretation of the View Before class , So let's go back PureMVC The module division of :       stay PureMVC in M.V.C The three parts are managed by three singleton classes , Namely Model/View/Controller.PureMVC The other one of them ...

  7. Use C# Create a custom background color / Shape menu bar and toolbar

    C# For the menu bar and toolbar are provided with a unified background color , Shape rendering class , namely ToolStripRenderer class , At the same time, according to different situations , Provides multiple inheritance classes , Namely ToolStripProfessionalRender,T ...

  8. HtmlNodeType enumeration

    HtmlNodeType It's an enumeration , Used to describe the type of a node . The source code is as follows : public enum HtmlNodeType { Document = 0, Element = 1, Commen ...

  9. Dubbo Middle group Cluster, Load balancing , Fault tolerance , Route resolution

    Dubbo Medium Cluster Multiple service providers can be disguised as one provider , That is to say, we will Directory In the multiple Invoker Pretend to be a Invoker, In the process of camouflage, fault-tolerant processing is included , Load balancing and routing ...

  10. Alibaba cloud HBase New release X-Pack Enabling lightweight big data platform

    One . Eight years double eleven , To create the largest and most professional in China HBase Technical team Alibaba group as early as 2010 Start researching and put HBase Put into production environment , From the initial Taobao historical transaction records , To ant security risk control data storage . continued 8 Years of investment , after 8 Double 11 years ...