Skip to content

输入框

基于 naive-ui 的input二次封装。

INFO

无需引入,可直接使用

Usage

vue
<template>
  <w-input v-model:value="inputValue" />
</template>

Props

名称类型默认值说明
blackListstring[][]黑名单,即不可输入的字符名单
suffixstring''prop 形式的 suffix(naive 默认提供的是 slot)
prefixstring''prop 形式的 prefix
suffixIconstring''suffix 图标
prefixIconstring''prefix 图标
helpMessagestring''帮助信息
valueModifierstrim, capitalize, uppercasefalse, false, falsevue3 的修饰符,默认内置了去空格,首字母大写和全大写的修饰符

Type

ts
import type { InputProps } from 'naive-ui'

import { props } from './props'

type ExtendProps = Partial<ExtractPropTypes<typeof props>>

export interface WInputProps extends InputProps, ExtendProps {}

基于 MIT 许可发布