Home >Web Front-end >JS Tutorial >Solve the problem of background image error reporting due to incorrect path in vue project

Solve the problem of background image error reporting due to incorrect path in vue project

php中世界最好的语言
php中世界最好的语言Original
2018-04-11 17:22:025264browse

This time I will bring you a solution to the problem of an error being reported due to an incorrect path for the background picture in the vue project, and a solution to the problem of an error being reported due to an incorrect path for the background image in the vue projectNote What are the matters? Below are practical cases. Let’s take a look.

Solution:

Solve the problem of background image error reporting due to incorrect path in vue project

In utils.js

Solve the problem of background image error reporting due to incorrect path in vue project

Add publicPath:'../../',

When introducing pictures or background images, the usage method is:

Solve the problem of background image error reporting due to incorrect path in vue project

I believe you have mastered the method after reading the case in this article. For more exciting content, please pay attention to other related articles on the php Chinese website!

Recommended reading:

Detailed explanation of the steps for vue to use the xe-utils function library

How to implement the file download function in Django

The above is the detailed content of Solve the problem of background image error reporting due to incorrect path in vue project. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn