Vue Project Homepage-Homepage Carousel Picture (7-3)

Homepage carousel

We want to use git branches for project development in a real enterprise.

1. Branch use

  1. New branch

List item

  1. Right-click in the project directory to open gitbase.

git pull //Pull the project from the line.
git checkout index-swiper //Enter the index-swiper branch
git status //View the local branch

Insert picture description here

Header

Recommend an easy-to-use carousel plug-in. vue-awesome-swiper
Insert picture description here
is downloaded in the project, because the latest version is a bit buggy, so I download the specified version.

cnpm install [email protected] --save

Insert picture description here

  1. Introduce in main.js according to usage rules
    Insert picture description here
  2. Create a component for the carousel
    Insert picture description here
  3. Introduce components, register components, and use components.Insert picture description here
  4. Introduce pictures, and list rendering.
    Insert picture description here
  5. However, there is a bug that needs to be resolved, and that is when the network speed is slow. This carousel component will not occupy a position. We need him to occupy the position now.
    Insert picture description here

After finishing, we need to merge the branch to our master

git checkout master
git merge origin/index-swiper
git push

Guess you like

Origin blog.csdn.net/weixin_45647118/article/details/114157448