Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

custom input component for mobile web page based on vue

NotificationsYou must be signed in to change notification settings

Youjingyu/vue-custom-input

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NPM

Vue custom input is a vue component for custom split input box, mobile web input box, simulating native app input box and etc. It's designed to input password and verification code. But you can also use it in other situation as you wish.

Demo

https://youjingyu.github.io/vue-custom-input/dist/example/

Installation

npm i vue-custom-inputs -S

Usage

use in vue single file components

<template><custom-inputinput-height="50px":input-number="4"input-type="number"input-style-type="oneBorder"@custom-input-change="change"@custom-input-complete="complete"></custom-input></template><script>importcustomInputfrom'vue-custom-input';exportdefault{components:{'custom-input':customInput},methods:{change(val){},complete(val){}}}</script>

use in browser globals

<divid="app"><custom-input></custom-input></div><scriptsrc="vue.js"></script><scriptsrc="vue-custom.js"></script><script>newVue({el:'#app',components:{'custom-input':window.customInput}});</script>

API

Vue custom input component attributes:

Attr. NameDescriptionRequiredTypeDefault Value
custom-input-changecalled when input value is changedNFunction-
custom-input-completecalled when all input boxes are filledNFunction-
input-numberinput box numberNNumber4
input-style-typetwo preset styles. You can also design your style by the following attributesN'allBorder', 'oneBorder''allBorder'
input-typejust like html5 input type attribute, can be tel, number, text and etc.NString'text'
password-charthe character showed in input box when the input-type is passwordNString'*'
input-widthinput box widthNString-
input-heightinput box heightNString'50px'
input-border-widthinput box border widthNString'1px'
input-border-colorinput box border colorNString'#20A0FF'
input-active-outline-colorinput box outline color when focus on itNString'#58B7FF'
input-stylecustomize input box style as you want. All styles will be injected into box's style attributeNObject{}
input-active-styleinput box style when focus on it. All styles will be injected into box's style attributeNObject{}

About

custom input component for mobile web page based on vue

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp