带按钮的图片横幅广告

Vue Cookie接受下降 (vue-cookie-accept-decline)

Show a banner with text, a decline button, and an accept button on your page. Remembers selection using cookies. Emits an event with current selection on creation. Good for GDPR requirements.

在页面上显示带有文字,拒绝按钮和接受按钮的横幅。 记得使用cookie进行选择。 使用创建时的当前选择来发出事件。 符合GDPR要求。

View demo 查看演示 Download Source 下载源

安装 (Install)

# npm
npm i vue-cookie-accept-decline#yarn
yarn add vue-cookie-accept-decline

Or you can include it through the browser at the bottom of your page:

或者,您可以通过页面底部的浏览器将其包括在内:

<script src="https://unpkg.com/vue-cookie-accept-decline"></script>

<script src="https://unpkg.com/vue-cookie-accept-decline"></script>

关于 (About)

We needed a component to show a privacy banners on pages - came across the awesome vue-cookie-law by apertureless and it was almost what was needed, except we needed to track the option of an opt-out/decline which seemed a bit out of scope for that project - so vue-cookie-accept-decline is the result.

我们需要一个组件来在页面上显示隐私横幅-无Kong洞地遇到了令人敬畏的Vue-Cookie法律 ,这几乎是必需的,除了我们需要跟踪选择退出/拒绝的选项似乎有点该项目的范围-因此vue-cookie-accept-decline是结果。

The big difference here is that vue-cookie-accept-decline allows the user to decline the text on the banner - this is important because you may want to not uses cookies in your app if they have declined the oppurtunity to be tracked.

这里最大的区别是, vue-cookie-accept-decline允许用户拒绝横幅上的文字-因为你可能想使用你的应用程序的cookie,如果他们拒绝被跟踪的奥珀蒂尼蒂这是很重要的。

When the decline or accept buttons are clicked, they will emit the events clickedAccept and clickedDeclined respectively. Also, on creation, the component will emit a status event with a value of the current setting, null for nothing set, accept for an accepted banner, and decline for a declined banner. You can listen to this event on the component and do something like disable cookies if you see they have declined the banner.

单击拒绝或接受按钮时,它们将分别发出事件clickedAcceptclickedDeclined 。 同样,在创建时,组件将发出一个status事件,其值为当前设置,为null表示未设置任何内容, accept表示接受的横幅, decline表示拒绝的横幅。 您可以在组件上侦听此事件,并执行诸如禁用cookie的操作(如果看到它们拒绝显示横幅)。

使用范例 (Usage Example)

import VueCookieAcceptDecline from 'vue-cookie-accept-decline'
Vue.component('vue-cookie-accept-decline', VueCookieAcceptDecline)
<vue-cookie-accept-decline:debug="false":position="'bottom'":transitionName="'slideFromBottom'"@status="cookieStatus"@clickedAccept="cookieClickedAccept"@clickedDecline="cookieClickedDecline"><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>
</vue-cookie-accept-decline>

道具 (Props)

prop type default possible values description
debug boolean false true, false If true, the cookie is never saved, only the events will be emitted.
position string bottom bottom, top Position of the banner
transitionName string slideFromBottom slideFromBottom, slideFromTop, fade Banner animation type
Struts 类型 默认 可能的值 描述
调试 布尔值 真假 如果为true,则永远不会保存cookie,只会发出事件。
位置 底部 底部,顶部 横幅的位置
transitionName slideFromBottom slideFromBottom,slideFromTop,淡入淡出 横幅动画类型

大事记 (Events)

event value description
status 'accept', 'decline', null Event will be emitted when component is created.
clickedAccept none Event will be emitted when accept is clicked on the banner.
clickedDecline none Event will be emitted when declined is clicked on the banner.
事件 描述
状态 '接受','拒绝',null 创建组件时将发出事件。
clickedAccept 没有 单击横幅上的接受,将发出事件。
clickedDecline 没有 单击横幅上的拒绝按钮时,将发出事件。

信息槽 (Message Slot)

There is a slot for your own custom message, this is good for providing your own link of whatever type you want. If you don't use the slot, the default message will be: We use cookies to ensure you get the best experience on our website..

有一个用于您自己的自定义message的插槽,该插槽可用于提供您想要的任何类型的自己的链接。 如果您不使用该插槽,则默认message为: We use cookies to ensure you get the best experience on our website.

SASS结构 (SASS Structure)

.cookie {&--bottom {}&--top {}&__content {}&__buttons {&__button {&--accept {}&--decline {}}}
}

发展历程 (Development)

# install dependencies
npm install# serve with hot reload
npm run watch# build demo page
npm run build:example# build
npm run build# publish to npm
npm version patch
npm publish

翻译自: https://vuejsexamples.com/show-a-banner-with-text-remembers-selection-using-cookies/

带按钮的图片横幅广告

带按钮的图片横幅广告_显示带有文字的横幅记住使用cookie的选择相关推荐

  1. 带按钮的图片横幅广告

    . . . . <HTML> <HEAD> <META http-equiv="Content-Type" content="text/ht ...

  2. html背景图总是在字的下面,怎么我在excel表格里插入背景图片后图片不是显示在文字下面而跑到文字右边的...

    怎么我在excel表格里插入背景图片后图片不是显示在文字下面而跑到文字右边的以下文字资料是由(历史新知网www.lishixinzhi.com)小编为大家搜集整理后发布的内容,让我们赶快一起来看一下吧 ...

  3. js实现点击按钮切换图片功能_☆*往事随風*☆的博客

    文章目录 前言 一.DOM是什么? 二.对象的HTML DOM 树 三.图片切换练习 1.要求 2.实现思路 3.示例代码 1.html示例代码如下: 2.css示例代码如下: 2.js示例代码如下: ...

  4. 计算机显示桌面的按钮,显示桌面按钮不见了怎么办_显示桌面按钮不见了

    我们习惯于直接单击任务栏中快速启动栏中的"显示桌面"按钮来一键最小化所有窗口,尤其是打开了很多窗口时一一最小化所有打开的窗口更显得烦锁.但是,这个"显示桌面"按 ...

  5. php带参 输出图片,如何自动显示图片在拍摄时的一些参数(转)

    exif_thumbnail -- 取得嵌入在 TIFF 或 JPEG 图像中的缩略图 array exif_read_data ( string filename [, string section ...

  6. android 按钮添加图片并靠左显示

    效果图: 布局文件: <Buttonandroid:id="@+id/photoGraphBtn"android:layout_width="match_paren ...

  7. php怎么写显示商品图片,php – Woocommerce显示带有产品图片的产品

    我设法为我的问题找到了一个可行的解决方案.只是不可能通过单独的循环列出产品而不会造成混乱的分页.因此,合乎逻辑的步骤是使用循环并基本上根据图像是否存在来对产品进行排序.这会产生新问题,因为Wordpr ...

  8. 定制ListView的界面(使用自定义的列表项布局,一边显示水果图片,一边显示水果文字)以及ListView的点击事件

    只能显示一段文本的ListView实在是太过单调,我们现在就来对ListView的界面进行定制,让它可以显示更加丰富的内容. 首先,我们需要准备好一组水果图片,分别对应上面提供的每一种水果,待会我们要 ...

  9. STM32F103xx TFT液晶显示ASCII字符串、中文、图片并且显示带有镜像和旋转功能

    STM32F103xx TFT液晶显示ASCII字符串.中文.图片带有镜像和旋转功能 编译器平台及例程说明 编译器说明 例程说明 参考例程 一.镜像显示说明 二.旋转显示说明 三.数据结构和宏定义 四 ...

最新文章

  1. Windows下 maven3.0.4的安装步骤+maven配置本地仓库(转载)
  2. 新手第四课-PaddlePaddle快速入门
  3. 02.centos6.4找不到ifcfg-eth0(静态ip配置)
  4. SD 模块的几个增强
  5. 【java--反射】注解(反射解析注解+注解应用)
  6. Django从理论到实战(part35)--QuerySetAPI
  7. python做大数据的框架_Python+大数据计算平台,PyODPS架构手把手教你搭建
  8. java gui 监听组合键,Java之GUI按钮监听事件ActionListener
  9. Clojure 学习入门(4)- 字符串
  10. [hdu1532]最大流
  11. python学习之-- redis模块基本介绍
  12. Hashtable 数据遍历的几种方式
  13. T420i 简单拆机 (只拆两个螺丝清灰)
  14. riscv-gnu-toolchain下载安装
  15. 气势如虹!西安交大成立26个研究院、1个联合设计学院,全面进驻创新港!
  16. Android ndk开发入门集锦一
  17. zend studio 12.5 安装aptana
  18. 三星公佈Bixby2.0升級後比蘋果更酷
  19. VS2013使用教程总结(3)---修改VA的注释
  20. 微信公众号监听手机返回键事件jssdk—wx.closeWindow

热门文章

  1. git详细介绍,以及常用的操作,命令
  2. 当今旗舰电视最新画质技术,马上就被联发科搬到手机上了
  3. 从任何字符串中提取IP
  4. 021模糊工具,锐化工具与涂抹工具
  5. Python飞行追踪模拟
  6. A - 不定方程求解
  7. Lr 12 ACR 15:蒙版
  8. 网络编程——The C10K Problem(C10K = connection 10 kilo 问题)。k 表示 kilo,即 1000
  9. c#实现深拷贝的几种方法
  10. Windows Driver Development Debug Assist Windows驱动开发助手