Skip to content

FaCarNumber

Combines ElInput with a province, letter and digit keyboard. Supports standard and new-energy license plate validation and integrates with ElForm validation.

Car Number

View code
Vue
<template>
	<div class="demo-stack">
		<FaCarNumber v-model="carNumber" clearable style="max-width: 360px" />
		<FaCarNumber model-value="粤B12345" disabled style="max-width: 360px" />
		<span class="demo-value">当前车牌:{{ carNumber ?? "未选择" }}</span>
	</div>
</template>

<script setup lang="ts">
import { ref } from "vue";

const carNumber = ref<string | null>("粤B12345");
</script>

FaCarNumber Complete API

Combines ElInput with a license-plate keyboard. Only listed Input props are forwarded; ElInput slots/expose are not.

Props (33)

Fast and Element Plus 2.14.6 props are merged below. Fast changes appear first; native props that are not forwarded remain visible for compatibility review.

PropertySourceDescriptionTypeDefault
modelValueFast overridev-model value.StringFastEL""
formatterFast overrideDisplay-value formatter.FunctionFastEL
parserFast overrideParses displayed input before writing the model.FunctionFastEL
placeholderFast overridePlaceholder.StringFast请选择EL
readonlyFast overrideDisplay the input value as readonly.BooleanFastfalseELfalse
showWordLimitFast overridewhether show word count, only works when type is 'text' or 'textarea'BooleanFastfalseELtrue
idEL nativeNative ID of the root input.String
sizeEL nativeComponent size.String
disabledEL nativeDisable the component or current option.Booleanfalse
modelModifiersEL nativev-model modifiers, reference Vue modifiersObject{}
maxlengthEL nativesame as maxlength in native inputString / Number
minlengthEL nativesame as minlength in native inputString / Number
typeEL nativeNative input type.Stringtext
resizeEL nativecontrol the resizabilityString
autosizeEL nativewhether textarea has an adaptive height, only works when type is 'textarea'. Can accept an object, e.g. { minRows: 2, maxRows: 6 }Boolean / Objectfalse
autocompleteEL nativeNative input autocomplete attribute.Stringoff
formEL nativesame as form in native inputString
clearableEL nativeAllow clearing.Booleanfalse
clearIconEL nativeClear-button icon.String / Object / Function{"name":"CircleClose","__name":"circle-close"}
showPasswordEL nativewhether to show toggleable password inputBooleanfalse
wordLimitPositionEL nativeword count position, valid when show-word-limit is trueStringinside
suffixIconEL nativeSelector suffix icon.String / Object / Function
prefixIconEL nativeprefix icon componentString / Object / Function
containerRoleEL nativeARIA role for the input-group container.String
tabindexEL nativeNative input tabindex.String / Number0
validateEventEL nativeTrigger form validation on model changes.Booleantrue
inputStyleEL nativethe style of the input element or textarea elementObject / Array / String / Boolean{}
countGraphemesEL nativecustom function to count graphemes; when set, native maxlength/minlength constraints are bypassed. Component uses Intl.Segmenter (Chrome 87+, Firefox 125+, Safari 14.1+) for proper grapheme clustering; older browsers fall back to Array.from() for code-point iterationFunction
autofocusEL nativesame as autofocus in native inputBooleanfalse
rowsEL nativenumber of rows of textarea, only works when type is 'textarea'Number2
ariaLabelEL nativeAccessible component name.String
inputmodeEL nativesame as inputmode in native inputString
nameEL nativeIcon name, CSS class, or external SVG URL.String
Events(12)
NameSourceDescriptionParameters / type
update:modelValueEL nativeUpdates v-model.
changeEL nativeValue or selection changes.
blurEL native · not forwardedtriggers when Input blurs
focusEL native · not forwardedtriggers when Input focuses
inputEL native · not forwardedtriggers when the Input value change
clearEL native · not forwardedtriggers when the Input is cleared by clicking the clear button
keydownEL native · not forwardedtriggers when a key is pressed down
mouseleaveEL native · not forwardedtriggers when the mouse leaves the Input element
mouseenterEL native · not forwardedtriggers when the mouse enters the Input element
compositionstartEL native · not forwardedtriggers when the composition starts
compositionupdateEL native · not forwardedtriggers when the composition is updated
compositionendEL native · not forwardedtriggers when the composition ends
Slots(5)
NameSourceDescriptionParameters / type
prefixEL native · not forwardedcontent as Input prefix, only works when type is not 'textarea'
suffixEL native · not forwardedcontent as Input suffix, only works when type is not 'textarea'
prependEL native · not forwardedcontent to prepend before Input, only works when type is not 'textarea'
appendEL native · not forwardedcontent to append after Input, only works when type is not 'textarea'
password-iconEL native · not forwardedcontent as Input password icon, only works when show-password is true. The scope variable is { visible: boolean }
Expose(10)
NameSourceDescriptionParameters / type
inputEL native · not forwardedElInput internal input ref.
textareaEL native · not forwardedElInput internal textarea ref.
refEL native · not forwardedUnderlying Element Plus component ref.
textareaStyleEL native · not forwardedCalculated ElInput textarea styles.
autosizeEL native · not forwardedCurrent input autosize settings.
focusEL native · not forwardedFocuses the input/selector.
blurEL native · not forwardedBlurs the input/selector.
selectEL native · not forwardedSelects all ElInput text.
clearEL native · not forwardedClears the current selected value.
resizeTextareaEL native · not forwardedRecalculates textarea height.