How does the src of img bind the variable value of the v-for loop?

1. There is a v-for loop, output each object comment,comment uses the element card component to output each attribute value
2.comment has an attribute comsimghead to store the picture name, first use v-if to determine whether it is empty, if it is empty, img src= ".. / images/head/head.jpg", this is no problem, but not empty how to make src for ".. / images/head/" + comsimghead? (it"s too troublesome to implement all the conversions, and you can"t write variable values after converting to src=, and you have to declare variables in data.)
3. The code is as follows:

            <el-col :span="12" v-for="comment in currentcomments" :key="comment.comid" :offset="1" style="margin-bottom:40px">
                    <el-card :body-style="{ padding: "0px", height:"200px"}" style="width: 800px;height: 200px;">
                        <div style="padding: 6px;height: 180px;">
                            <div style="height:50px;"><!---->
                                <div style="float: left;width: 50px;height: 50px;" v-if="comment.comsimghead ==null || comment.comsimghead ==""">
                                    <img src="../images/head/head.jpg" style="height: 40px;width: 40px;border-radius: 20px;margin: 10px 0px 10px 10px;" />
                                </div>
                                <div style="float: left;width: 50px;height: 50px;" v-else><!--src-->
                                    <img src="../images/head/" style="height: 40px;width: 40px;border-radius: 20px;margin: 10px 0px 10px 10px;" />
                                </div>
                                <div style="float: left;position:relative;top:20px;width:300px;height: 30px;"><font size="5">{{comment.comsname}}</font></div>
                            </div>
                        </div>
                    </el-card>
                </el-col>
Mar.02,2021

you don't need to use vmurif.com vripelse

<div style="float: left;width: 50px;height: 50px;">
     <img :src='comment.comsimghead?"../images/head/head.jpg":("../images/head/"+comsimghead)' style="height: 40px;width: 40px;border-radius: 20px;margin: 10px 0px 10px 10px;" />
</div>

just write it this way: : src= "comment.xxx" binds in this way, and other decisions can add


<img :src="'../images/head/'+comment.comsimghead" style="height: 40px;width: 40px;border-radius: 20px;margin: 10px 0px 10px 10px;" />
.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1ea2e66-1c16.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1ea2e66-1c16.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?