1.0.2 • Published 2 years ago

vue2-drag-verify v1.0.2

Weekly downloads
-
License
-
Repository
-
Last release
2 years ago

vue2-drag-verify

This is a vue component, which is sliding to unlock for login or sign up. demo

Installation

npm install vue2-drag-verify --save
# or
yarn add vue2-drag-verify

Usage

<vue2-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"></vue2-drag-verify>
import Vue from 'vue'
import Vue2DragVerify from 'vue2-drag-verify'

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

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

Event

success-callback

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