(vue)el-radio鼠标移入可提示图片
效果:
c
<el-form-item label="图表选择">
<el-radio-group v-model="formInline.echartType">
<el-tooltip v-for="(item, index) of echartTypeOptions" :key="index" placement="right" effect="light">
<div slot="content"><el-image :src="testImg[index]" style="width: 100px; height: 100px" /></div>
<el-radio :label="item.echartType">
{{ item.name }}
</el-radio>
</el-tooltip>
</el-radio-group>
</el-form-item>
testImg[index]本应该是item.img,暂代测试
c
testImg: [
'https://.../zzy/2024/02/28/c1515272e3ec4a33bf67df1df248fd32.png',
'https://.../zzy/2024/02/28/f0e73d89d73148da9fb3d080b128d605.png',
...
]