TMaskInput / 掩码输入框
MaskInput extends TInput with IMask.js formatting. Supports string patterns (e.g., 000-0000-0000) and object rules for numbers, dates, etc. / 掩码输入框在 TInput 基础上增加 IMask.js 格式化支持,支持字符串模式(如 000-0000-0000)和对象规则。
Props / 属性
| Prop | Type / 类型 | Default / 默认值 | Description / 说明 |
|---|---|---|---|
mask | string | object | — | Mask pattern (required) |
| (all TInput props) | — | — | Inherits all TInput props |
Basic Usage / 基础用法
vue
<script setup lang="ts">
import { TMaskInput } from '@gulcc/tabler-vue'
const phone = ref('')
</script>
<template>
<TMaskInput v-model="phone" mask="000-0000-0000" placeholder="Phone / 手机号" />
</template>