vue- project

Environment configuration:
1. Install Git Node
2. License cloud account and create their own public library win disposed in the git bash
3. Cloud code on the item git clone was cloned into a local address (SSH)
4. Scaffolding by the relevant vue file is downloaded to the appropriate folder
5. local file synchronization code to the cloud
out of service
Git Status
Git the Add.
Git the commit -m 'Project a initialized'
Git Push

Item Code
README.md - Item Description Package
package.json - store dependencies
package-lock.json - package lock file to determine the version of third-party packages
LICENSE - open source license description
.postcssrc.js - postcss configuration file
.gitignore - the configuration file does not need to upload
.eslintrc.js - equipped with some code specification
.eslintignore - there's a configuration item from .eslintrc.js detection
.editorconfig - configuration item editor
. babelrc - parser configuration items vue convert into code that can be executed browser

Multi-page application and application advantages and disadvantages of single-page
multi-page application
every time the page jump, back-end returns a new HTML
advantages: fast time to first screen (showing the contents of the first page of the speed of the screen), the effect of good SEO (search engine can identify the other link jump home pages)
disadvantages: page switching is slow (each jump page needs to send an HTTP request)

Single-page application
JS-aware routing (URL) changes, clear the page content and dynamic content in a new page to hang onto the page (JS rendering), this time by the front end for routing
advantages: fast page switching
disadvantages: first screen time is slow, SEO difference

Vue is not used in the tag page jump, use Jump tag page
List Where to = "" equivalent to href = ""

Item code initializes

  1. Prevent the fingers zoom page
    modify viewport, as shown in FIG.

  2. Basis style modification
    main.js: import './assets/styles/reset.css'

  3. The mobile terminal 1 pixel border
    main.js: import './assets/styles/border.css'

  4. 300ms点击延迟
    安装fastclick: npm install fastclick --save
    main.js:
    import fastClick from 'fastclick'
    fastClick.attach(document.body)

  5. iconfont register, create project

header
① using Stylus supporting development, run the following command terminal:.
NPM the install Stylus --save
NPM-Loader --save the install Stylus

  • Note To restart compile the project
    ②. Reasonable splitting component, improve development efficiency.
    Import components imported by way of
    note to fill in name properties in a subcomponent of the export default, the statement component name
    ③. Stylus writing style used in the assembly

Guess you like

Origin www.cnblogs.com/sansancn/p/11227952.html