Skip to content

适用与Vue3.x版本的自定义移动端键盘输入,支持整数、浮点数、手机号、身份证号四种模式

Notifications You must be signed in to change notification settings

lzq920/mobile-keyboard-vue3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mobile-keyboard-vue3

适用于 Vue3.x 版本的自定义移动端键盘输入,支持输入整数、浮点数、手机号、身份证号四种模式

示例

<template>
  <p @click="show = !show">{{ inputValue }}</p>
  <keyboard v-model="inputValue" type="decimal" v-model:show="show"></keyboard>
</template>
<script setup>
import keyboard from './components/keyboard.vue'
import {ref} from "vue"

const inputValue = ref('123')
const show = ref(false)
</script>
<style>
html, body {
  margin: 0;
  padding: 0;
}
</style>

属性

Property Type Default Description
type String decimal 键盘类型:decimal 小数,integer 整数,phone 手机号,card 身份证
value/v-model String chinese 默认输入字符串

预览图

About

适用与Vue3.x版本的自定义移动端键盘输入,支持整数、浮点数、手机号、身份证号四种模式

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published