注册全局组件 vue.js_vue.js验证组件,用于登录或注册

注册全局组件 vue.js

Vue拖动验证 (vue-drag-verify)

This is a vue component, which is sliding to unlock some functionalities, such as login or sign up. This is used to protect your web app from attack.

这是一个Vue组件,可以滑动以解锁某些功能,例如登录或注册。 这用于保护您的Web应用程序免受攻击。

安装 (Installation)

npm install vue-drag-verify --save

用法 (Usage)

<drag-verify :width="width" 
			 :height="height" 
			 :text="text" 
			 :success-text="successText" 
			 :background="background" 
			 :progress-bar-bg="progressBarBg" 
			 :completed-bg="completedBg" 
			 :handler-bg="handlerBg" 
			 :handler-icon="handlerIcon" 
			 :text-size="textSize" 
			 :success-icon="successIcon" 
			 :circle="getShape"></drag-verify>
import Vue from 'vue'
import dragVerify from 'vue-drag-verify'

export default {
  name: 'app',
  components:{
    dragVerify
  }
}

道具 (Props)

PropertyTypeDefaultDescription
widthNumber200The width of the component
heightNumber60The height of the component
textStringswiping to the right sideThe text shows on the component
successTextStringsuccessThe text shows when it’s successful
backgroundString#cccThe background color of the component
colorString#ffffffThe color of the text
progressBarBgString#FFFF99The backgound color of the progress bar
completedBgString#66cc66The backgound color of the component when the button dragged to the right side
circleBooleantrueIf true, the shape of component is round
handlerIconString-The icon of handler
successIconString-The icon of handler when the button dragged to the right side
handlerBgString#fffThe background color of the handler
textSizeString20pxFont size of prompt message
属性 类型 默认 描述
宽度 200 组件的宽度
高度 60 组件的高度
文本 向右滑动 文本显示在组件上
successText 成功 文字显示成功的时间
背景 #ccc 组件的背景色
颜色 #ffffff 文字颜色
progressBarBg #FFFF99 进度条的背景色
已完成 #66cc66 当按钮拖动到右侧时组件的背景色
布尔型 真正 如果为true,则组件的形状为圆形
handlerIcon -- 处理程序的图标
successIcon -- 按钮拖动到右侧时的处理程序图标
handlerBg #fff 处理程序的背景色
字体大小 20像素 提示消息的字体大小

事件 (Event)

回叫 (passcallback)

Emitted when pass verify, the handler dragged to the right side.

通过验证时发出,处理程序拖到右侧。

翻译自: https://vuejsexamples.com/a-vue-js-verification-component-for-login-or-sign-up/

注册全局组件 vue.js

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值