javascript - 将 Quasar Tooltip 添加到使用代码构建的 q-list
问题描述
我正在尝试将工具提示添加到通过代码构建的 q-list
<q-list bordered>
<q-item v-for="item in iCite_Data" :key="item.id" v-ripple>
<q-item-section>
<q-item-label >
{{ item.label }}
</q-item-label>
</q-item-section>
<q-item-section side>
<q-item-label>{{ item.value }}</q-item-label>
</q-item-section>
</q-item>
我试过把它作为测试
<q-tooltip content-class="bg-indigo" :offset="[10, 10]">
{{ item.tooltip}}
</q-tooltip>
更新:当我向硬编码的 q-item 添加工具提示时,它可以工作。
https://codepen.io/morgenweck/pen/VwprbrY?editors=1010
但是如果我尝试添加到从代码构建的 q-item 中,它不会。有人可以指出我正确的方向吗?
这是来自代码的基本 Quasar codepen。
https://codepen.io/morgenweck/pen/VwpMNOO
谢谢
解决方案
Some text as content of Tooltip
您必须用插值替换静态文本{{ contact.tooltip }}
- 您将看到动态工具提示。
推荐阅读
- python - 执行 PCA 后如何绘制每个变量的主向量?
- python - 如何匹配输入数据和df中的数据,for循环减
- jenkins - 在 Jenkins 管道中不起作用凭证
- amp-html - 缺少 AMP HTML 标记
- ios - 我可以将私有变量传递给将通过 Storyboard 实例化的 UIViewController 吗?
- java - 写入带重音的缓冲 Writer UTF-8 字符出现乱码
- docker - `docker run -v`:将所有文件从容器复制到主机?
- python - 如何最大化关于某个 x 的函数?
- laravel - 在人际关系之间有更好更干净的方式吗?
- django - nginx 使用 Django Rest 框架为 POST 图像请求返回 500