Vue binds a method for Src to get different images according to different values, but the browser cannot find the address of the image.

methods: {

        srcValue: function (status) {
            if(status==2)
                return "/Image/OK.png"
            if(status==3)
                return "/Image/Error.png"
            if(status==1)
                return "/Image/waiting.png"
            else
                return "/Image/waiting.png"
        },     

according to the value of item.ExecStatus, the picture I got is different. Debug locally, the picture can come out, but when I publish it, I find that I can"t find the picture. The browser will report 404 (Not Found)
GET http://10.5.34.166/Image/wait. 404 (Not Found)
Error.png:1 GET http://10.5.34.166/Image/Erro. 404 (Not Found )
OK.png:1 GET http://10.5.34.166/Image/OK.png 404 (Not Found)

my picture is placed in the Image file, the following directory, the code is in ResultLog.html, please see if my picture path is not correct? How should it be pointed?
clipboard.png

Mar.15,2021
The problem of

has been solved. I have mispointed the address of the picture. It should be the parent directory. Just change / Image/OK.png to.. / / Image/OK.pn.


you pack the project. Take a look at the path. Is your picture processed using the copy-webpack-plugin plug-in?

Menu