gpt4 book ai didi

javascript - 在 Vue.js 中用 url 标记

转载 作者:行者123 更新时间:2023-11-30 14:11:06 28 4
gpt4 key购买 nike

这是我的代码:

<v-checkbox
:label="I agree with the Privacy Policy"
v-model="agree2"
></v-checkbox>

我想在单击“隐私政策”时执行操作。我知道我可以在那里放一个 url,但我宁愿用 Vue 展示模型。我该怎么做?

最佳答案

使用名称为“label”的插槽并放入任何你不想放入的东西:

<v-checkbox ...>
<div slot='label'>I agree with the <myLinkComponent>...</...></div>
</v-checkbox>

您可以从文档中看到:https://vuetifyjs.com/en/components/checkboxes/#label-slot

关于javascript - 在 Vue.js 中用 url 标记,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54443081/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com