vue project preparation

1. Write document:

  • Product descriptions, work logs, interfaces, documentation, database documentation, project architecture documentation, etc. ????
  • For example: ????? management of goods, store management, store management category, administrator management, user management: Background management system
         front-end rendering. Site, the home page, the user interface. search for. category. Details. api: interface.

2.vue scaffolding

1 The global installed vue scaffolding
    cnpm install @ vue / cli -g
2 Check the version number.
    VUE - v
 3 . Create a project
    name vue create projects (not appear in capital letters)
 4 cd project into the project.

5. npm run server running the project

3.vue profile

1 Create vue.config.js file in the root directory of the project

2 . Configuration
        module.exports = {
         // After configuring, restart the project RUN serve CNPM 
        devserver: {
            Open: to true ; // whether to automatically open the browser 
            Host: "127.0.0.1" ,
            Port: 80 // port 80 
        }
    }

4. Use element assembly

1 , AnSo ElementUI
   cnpm install element-ui -s

2, is introduced in Element- main.js the UI
   import ElementUI from 'element-ui'
   import 'element-ui/lib/theme-chalk/index.css';//样式

3 , using the element
  Vue.use (components);

Guess you like

Origin www.cnblogs.com/zhaoxinran997/p/12141919.html