vue.js - vue dom 不会重新渲染
问题描述
我使用 v-for 来呈现表格行
<table>
<tr v-for="(item, i) in data">
<td>
<button v-if="...">....</button>
<el-tooltipplacement="right">
<button v-if="..." >...</button>
<div slot="content">
<button @click="...">...</button>
<button @click="...">...</button>
</div>
</el-tooltip>
</td>
</tr>
</table>
tooltip 是 element ui 的一个组件,tooltip 会在按钮悬停后显示。表格数据是通过ajax调用获取的,有好几页,翻页时会通过ajax调用获取数据,翻页后出现问题。悬停后某些工具提示不会显示,我认为问题是 dom 没有重新渲染,我在 ajax 调用后使用了 $forceUpdate() ,但它没有效果。如果可以请帮帮我。
element ui Tooltip 组件及示例:https://element.eleme.io/#/en-US/component/tooltip
解决方案
推荐阅读
- python - Tkinter 教程:复选框总是返回 0
- mysql - COUNT 返回忽略 MySQL 中的 LIMIT 的总行数,为什么?
- python - 有效地从字符串列中删除多个短语
- angular - 父属性更改时未触发 Angular ngOnChanges
- python - 如何按字符串的顺序识别子字符串?
- javascript - 如何使用javascript显示选定的开始行和结束行?
- javascript - 为什么 addEventListener 到“选择”元素不起作用?
- java - 将数字格式从 10000 更改为 10,000 android
- jquery - 如何循环到最接近的表单输入
- ios - 如何将 EAAccessory 和 CBPeripheral 与 MFi 设备匹配?