[英]How can I select images on vue using radio buttons?
I want to create with vue.js a radio button (bootstrap) where I can select the image to visualize. 我想使用vue.js创建一个单选按钮(引导程序),从中可以选择要可视化的图像。 I created 3 buttons for 3 images but I can't connect them (of course the previous image must disappear).
我为3张图片创建了3个按钮,但无法连接它们(当然,前一张图片必须消失)。
<template>
<b-container>
<b-row>
<b-col>
<b-form-group label="Map to visualize">
<b-form-checkbox-group
v-model="map.value"
:options="map.options"
name="buttonsMap"
buttons
></b-form-checkbox-group>
</b-form-group>
</b-col>
</b-row>
<b-row class="map">
<b-col cols="9">
<h3>Map</h3>
<div id="app">
<img :src="require('./image/Map1.png')" height="400" />
</div>
</b-col>
</b-row>
</b-container>
</template>
<script>
export default {
name: 'Rad',
data() {
return {
map: {
value: 'Map1',
options: ['Map1', 'Map2', 'Map3'],
},
}
},
}
</script>
This works, but I can only see one map. 这行得通,但我只能看到一张地图。 I wanna add 3 of them connected with the buttons.
我想添加其中3个与按钮相连的按钮。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.