Vue Bootstrap – 如何在 v-b-tooltip 中使用双引号

huangapple go评论72阅读模式
英文:

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.

&lt;template&gt;
    &lt;label&gt;Encoding
        &lt;feather-icon
        icon=&quot;AlertCircleIcon&quot;
        class=&quot;mr-50 my-icon&quot;
        v-b-tooltip.hover.right=&quot;tooltipText&quot;/&gt;
    &lt;/label&gt;
&lt;/template&gt;

&lt;script&gt;
export default {
data(){
    return{
        tooltipText:&#39;The encoding used inside the feed. Leave &quot;Automatically&quot; if you are uncertain&#39;
    }
}
}
&lt;/script&gt;

答案2

得分: 0

尝试像这样 -

<feather-icon
  icon="AlertCircleIcon"
  class="mr-50 my-icon"
  v-b-tooltip.hover.html="tipMethod"
/>
methods: {
  tipMethod() {
    return '在反馈中使用的编码。如果不确定,请保留“自动”'
  }
}
英文:

Try like this-

&lt;feather-icon
  icon=&quot;AlertCircleIcon&quot;
  class=&quot;mr-50 my-icon&quot;
  v-b-tooltip.hover.html=&quot;tipMethod&quot;
/&gt;
methods: {
  tipMethod() {
    return &#39;The encoding used inside the feed. Leave &quot;Automatically&quot; if you are uncertain&#39;
  }
}

huangapple
  • 本文由 发表于 2023年3月3日 18:34:58
  • 转载请务必保留本文链接:https://go.coder-hub.com/75625963.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定