网页特效栏目收集了最全最新的前端网页插件,包括最流行的jQuery,Bootstrap,Js,Css,Vue等主流特效插件。
vue-cookie-accept-decline是一款标准的Vue Cookie通知显示文本组件,有通过cookie来进行记录接受和拒绝选择是否显示文本。可用于页面弹窗提示,记住后不再提示。
<!-- css import for when you want to import the component css into your css file/files -->
@import '/path/to/node_modules/vue-cookie-accept-decline.css';
<!-- css import for when you're importing the css directly in your js -->
import 'vue-cookie-accept-decline/dist/vue-cookie-accept-decline.css'
import VueCookieAcceptDecline from 'vue-cookie-accept-decline'
Vue.component('vue-cookie-accept-decline', VueCookieAcceptDecline)
<vue-cookie-accept-decline
:ref="'myPanel1'"
:elementId="'myPanel1'"
:debug="false"
:position="'bottom-left'"
:type="'floating'"
:disableDecline="false"
:transitionName="'slideFromBottom'"
:showPostponeButton="false"
@status="cookieStatus"
@clicked-accept="cookieClickedAccept"
@clicked-decline="cookieClickedDecline">
<!-- Optional -->
<div slot="postponeContent">
×
</div>
<!-- Optional -->
<div slot="message">
We use cookies to ensure you get the best experience on our website. <a href="https://cookiesandyou.com/" target="_blank">Learn More...</a>
</div>
<!-- Optional -->
<div slot="declineContent">
OPT OUT
</div>
<!-- Optional -->
<div slot="acceptContent">
GOT IT!
</div>
</vue-cookie-accept-decline>
转载请注明来源:Vue确认和取消提示框(vue-cookie-accept-decline)
本文永久链接地址:https://www.moyouyouw.cn/code/1306.html
郑重声明:本站所有主题/文章除标明原创外,均来自网络转载,版权归原作者所有,如果有侵犯到您的权益,请联系本站删除,谢谢!我们不承担任何技术及版权问题,且不对任何资源负法律责任。
已有 位小伙伴发表了看法
欢迎 你 发表评论