vue 轻量级日历_具有vue的轻量级输入掩蔽库

vue 轻量级日历

Vue输入外观 (Vue Input Facade)

A lightweight and dependency free input masking library created specific for Vue.

专为Vue创建的轻量级且无依赖的输入屏蔽库。

正在安装 (Installing)

npm i vue-input-facade
yarn add vue-input-facade

输入 (Importing)

全球范围 (Globally)

Installs the component, directive and filter for your entire application.

为整个应用程序安装组件,指令和过滤器。

import InputFacade from 'vue-input-facade'
Vue.use(InputFacade)

在本地 (Locally)

Install per component as needed

根据需要安装每个组件

import { InputFacade, facade, filter } from 'vue-input-facade'

export default {
  components: { InputFacade },
  directives: { facade },
  filters: { facade: filter },
  // ... rest of component config
}

默认掩码令牌 (Default Mask Tokens)

  • S = alpha characters

    S =字母字符

  • # = numerical characters

    # =数字字符

  • X = alpha numerical characters

    X =字母数字字符

  • A = alpha characters, transformed to uppercase

    A =字母字符,转换为大写

  • a = alpha characters, transformed to lowercase

    a =字母字符,转换为小写

  • \ = escape any of the above characters

    \ =转义以上任何字符

See the token source file for definition signature

请参阅令牌源文件以获取定义签名

用法 (Usage)

作为组件 (As Component)

<label>Phone Number</label>
<input-facade mask="(###) ###-####" name="phoneNumber" type="tel" />

作为指令 (As Directive)

<label>Date</label>
<input type="text" v-facade="'##/##/##'" />

翻译自: https://vuejsexamples.com/a-lightweight-input-masking-library-with-vue/

vue 轻量级日历

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值