英文:
Vue Bootstrap - How to use double quotes in v-b-tooltip
问题
在这个工具提示文本中,我想在单词“Automatically”周围添加双引号。如果我使用双引号,它不会呈现。你能告诉我如何使用双引号吗?
英文:
I am using this vue bootstrap tooltip. https://bootstrap-vue.org/docs/directives/tooltip
Now, I have this tooltip:
<label>Encoding
<feather-icon
icon="AlertCircleIcon"
class="mr-50 my-icon"
v-b-tooltip.hover.right="'The encoding used inside the feed. Leave Automatically if you are uncertain'"
/>
</label>
On this toolitp text, I want to add double quotes around this word Automatically
If I use double quotes Its not render. Can you tell me how can I use double quootes?
答案1
得分: 1
<template>
<label>编码
<feather-icon
icon="AlertCircleIcon"
class="mr-50 my-icon"
v-b-tooltip.hover.right="tooltipText"/>
</label>
</template>
<script>
export default {
data(){
return{
tooltipText:'在提要中使用的编码。如果不确定,请保留“自动”'
}
}
}
</script>
英文:
You can try assigning the sentence that needs double quotes in a variable and assign that to v-b-tooltip.
<template>
<label>Encoding
<feather-icon
icon="AlertCircleIcon"
class="mr-50 my-icon"
v-b-tooltip.hover.right="tooltipText"/>
</label>
</template>
<script>
export default {
data(){
return{
tooltipText:'The encoding used inside the feed. Leave "Automatically" if you are uncertain'
}
}
}
</script>
答案2
得分: 0
尝试像这样 -
<feather-icon
icon="AlertCircleIcon"
class="mr-50 my-icon"
v-b-tooltip.hover.html="tipMethod"
/>
methods: {
tipMethod() {
return '在反馈中使用的编码。如果不确定,请保留“自动”'
}
}
英文:
Try like this-
<feather-icon
icon="AlertCircleIcon"
class="mr-50 my-icon"
v-b-tooltip.hover.html="tipMethod"
/>
methods: {
tipMethod() {
return 'The encoding used inside the feed. Leave "Automatically" if you are uncertain'
}
}
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论