右侧代码是:
<div><div style=" margin-bottom: 10px;">单选题</div>
<div v-for="(item,index) in danxuanlist" :key="index" :max="1">
<div style=" margin-bottom: 10px;color: #606266 !important;">{{ index +1 }}、{{ item.name }}</div>
<div v-for="items in item.danContent" :key="items.index">
<!-- 代码选项 -->
<el-checkbox-group v-model="checkList">
<el-checkbox :label="items" style=" margin-bottom: 10px;margin-left: 10px;color: #606266 !important;font-weight:400;" @change="danoptions(items,index ) " />
</el-checkbox-group>
</div>
</div>
左侧代码是:
<div class="xuhao-k">
<span v-for="(item,index) in danxuanlist" :key="item.id" :class="`${duoindex}` === `${index}`?'xuhao-k-ss':'xuhao-k-st'" >
{{ index +1 }}</span>
</div>
```右侧试题处于选中的时候,左侧背景颜色改变。不选中,左侧不变。
下面的问题怎么解决?
- 写回答
- 好问题 0 提建议
- 追加酬金
- 关注问题
- 邀请回答
-
1条回答 默认 最新
- _yangyi 2021-07-09 09:25关注
问题是让左右两边联动起来吗?如果这样①、可以给每一道题给一个字段,通过这个字段值判断左边对应的数字要不要选中。②、我看你用的是elementui组件库,可以看看他们form表单多选组件,会对你有帮助。
解决 无用评论 打赏 举报
悬赏问题
- ¥35 navicat将excel中的数据导入mysql出错
- ¥15 rt-thread线程切换的问题
- ¥20 python忆阻器数字识别
- ¥15 高通uboot 打印ubi init err 22
- ¥20 PDF元数据中的XMP媒体管理属性
- ¥15 R语言中lasso回归报错
- ¥15 网站突然不能访问了,上午还好好的
- ¥15 有没有dl可以帮弄”我去图书馆”秒选道具和积分
- ¥15 semrush,SEO,内嵌网站,api
- ¥15 Stata:为什么reghdfe后的因变量没有被发现识别啊