because it violates the following Content Security Policy directive: “img-src ‘self‘ data:base64“

question

insert image description here
Putting a picture in vue doesn't show it, and it also reports an error, ma's

Solution

Modify in the index.html file in the vue project

<meta http-equiv="Content-Security-Policy" content="default-src *;
   img-src * 'self' data: https:; script-src 'self' 'unsafe-inline' 'unsafe-eval' *;
   style-src  'self' 'unsafe-inline' *">

Just copy it and replace it

hope this helps

Guess you like

Origin blog.csdn.net/weixin_44582045/article/details/129592595