【发布时间】:2021-08-25 10:58:28
【问题描述】:
我正在使用带有 html 的 vue,并且我正在尝试使用国家/地区名称和标志填充选择标签中的选项 名称和其他内容显示正常,当我检查图像时,图像的 url 也显示在代码中,它是有效的,但它没有显示在选项标签内 是不是造型问题 P.s 现在我不想使用 v-select
我的选择
<select name="country" class="selectedImg">
<option>Select your country</option>
<option class="text-center" v-for="row in pics" :style="{ backgroundImage: 'url(' + row.flag+ ')' }" style="background-size: 10px;
background-position: bottom;
background-repeat: no-repeat;" :value="row.flag">
{{row.name}}<img :src="row.flag" width="10"/>
</option>
</select>
并且显示的网址是有效的
【问题讨论】:
标签: javascript html vue.js