Vue2.0 uses loop traversal to load different images, and vue2.0 Loads

Source: Internet
Author: User

Vue2.0 uses loop traversal to load different images, and vue2.0 Loads

Demo:

<Div v-for = "item in temps": key = "item. id "> <div class =" contract-item ">  </div>

Introduce the image. Note the following path:

Import con1 from "@/assets/img/con01.png"; import con2 from "@/assets/img/con02.png"; import con3 from "@/assets/img/con03.png ";

Position where the image is loaded:

Temps: [{imgUrl: con1}, {imgUrl: con2}, {imgUrl: con3},],

In this way, different images are loaded during loop traversal.

The above vue2.0 loop Traversal method for loading different images is all the content shared by xiaobian. I hope to give you a reference, and I hope you can provide more support for the customer's house.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.