admin管理员组文章数量:1294475
Here's my code:
<v-checkbox
:label="I agree with the Privacy Policy"
v-model="agree2"
></v-checkbox>
and I want to have an action when I click Privacy Policy. I know I can put an url there, but I would rather show model with Vue. How can I do that?
Here's my code:
<v-checkbox
:label="I agree with the Privacy Policy"
v-model="agree2"
></v-checkbox>
and I want to have an action when I click Privacy Policy. I know I can put an url there, but I would rather show model with Vue. How can I do that?
Share asked Jan 30, 2019 at 14:39 Zbyszek KisłyZbyszek Kisły 2,2486 gold badges29 silver badges53 bronze badges 3-
A div that shows up via
v-if="agree2"
? Or a@change
event on the checkbox itself? – ceejayoz Commented Jan 30, 2019 at 14:41 - @ceejayoz no, the checkbox is for an user to accept privacy policy. I want to show up modal if he want's to read it. – Zbyszek Kisły Commented Jan 30, 2019 at 14:42
- vuejs/v2/examples/modal.html – ceejayoz Commented Jan 30, 2019 at 14:43
1 Answer
Reset to default 11Use the slot with name 'label' and put into whatever any you wont:
<v-checkbox ...>
<div slot='label'>I agree with the <myLinkComponent>...</...></div>
</v-checkbox>
You can see that from documentation: https://vuetifyjs./en/ponents/checkboxes/#label-slot
本文标签: javascriptlabel with url in VuejsStack Overflow
版权声明:本文标题:javascript - label with url in Vue.js - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741600635a2387680.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论