A: hi! ~ Hello everyone, I am YK bacteria 🐷, a microsystem front-end ✨, love to think, love to summarize, love to record, love to share 🏹, welcome to follow me 😘 ~ [wechat account: Yk2012Yk2012, wechat public account: ykyk2012]

“This is the fourth day of my participation in the Gwen Challenge in November. Check out the details: The Last Gwen Challenge in 2021.”

Today, we are going to do a project about the background management system of e-commerce mall. This is the starting post of the project. If the environment is well prepared and git synchronization is well done, let’s start writing the project

1. Use the new VUE cli

cnpm install -g @vue/cli
Copy the code

2. View the version

vue --version
Copy the code

3. Use a graphical interface to create projects

vue ui
Copy the code

1. Create projects

2. Manually configure the project

3. Project configuration

4. Access the project dashboard

5. Configure the ElementUI component library

The plug-in configuration

6. The configuration axios

7. Launch the page

8. Syntactic handling of ESLint

Task – serve-output-Warning

You can see some syntax error warnings from ESLint

VSCode formatting documents are inconsistent with ESLint rules

  1. Create a file in the root of the project. Prettierrc
{
  "semi": false.// Format the end without a semicolon
  "singleQuote" : true // Single quotation marks instead of semicolons
}
Copy the code
  1. Modify ESLint syntax rules.eslintrc.js
rules: {
  'space-before-function-paren': 0 // Disable the formatting requirement for functions to be followed by Spaces
}
Copy the code

4. Create a project on the CLI

Create a project

vue create my_project
Copy the code

Run the project

npm run serve
Copy the code

5. Configure the Gitee SSH public key

ssh-keygen -t rsa -C "[email protected]"
Copy the code

Get the SSH public key

Copy and paste it in

Add the public key

ssh -T [email protected]
Copy the code
Are you sure you want to continue connecting (yes/no)? yes
Copy the code

Success!

6. Gitee creates a local synchronization for the warehouse

git config --global user.name "ykang2020"
Copy the code
git config --global user.email "[email protected]"
Copy the code

Switch to the project directory and start CMD

Check the status

git status
Copy the code

Add to cache

git add .
Copy the code

Add to local library

git commit -m "add files"
Copy the code

Final confirmation status

git status
Copy the code

git remote add origin https://gitee.com/ykang2020/vue_shop.git
Copy the code

Upload local libraries to Gitee

git push -u origin master
Copy the code

Log in to your Gitee account

complete

Gitee.com/ykang2020/v…

Finally, please pay attention to my column and make good friends with YK bacteria