{ "curated": true, "slug": "plateinput", "mode": "single", "examples": [ { "id": "plateinput-ex-1", "title": "基础用法", "titleSrc": "", "desc": "", "html": "
\n

PlateInput 车牌号输入

\n

省份简称 + 字母数字组合,自动大写,支持新能源车牌(7 位)。

\n
\n
基础用法
\n
\n
\n \n \n
\n
\n
\n
\n
", "preview": { "show": [ [ 0 ] ], "hide": [], "mode": "single" }, "previewSafe": true, "previewUnsafeReasons": [], "source": "curated", "code": { "html": "

PlateInput 车牌号输入

\n

省份简称 + 字母数字组合,自动大写,支持新能源车牌(7 位)。

\n
基础用法
\n
\n
\n \n \n
\n
\n
", "jsx": "import { useState } from 'react';\nimport { KolePlateInput } from 'kole-ui/react';\n\nconst PROVINCES = ['京', '沪', '粤', '津', '冀', '鲁', '苏'];\n\nexport default function Demo() {\n const [plate, setPlate] = useState('');\n\n return (\n \n );\n}", "vue3": "\n\n", "vue2": "\n\n", "tsx": "import { useState } from 'react';\nimport { KolePlateInput } from 'kole-ui/react';\n\nconst PROVINCES = ['京', '沪', '粤', '津', '冀', '鲁', '苏'];\n\nexport default function Demo(): JSX.Element {\n const [plate, setPlate] = useState('');\n\n return (\n \n );\n}", "vue3ts": "\n\n", "vue2ts": "\n\n" }, "notes": "依据 frameworks/PlateInput.html:19-21 的七个省份 option(京/沪/粤/津/冀/鲁/苏)与 :23 的 placeholder=\"A12345\"、maxlength=\"7\";provinces 默认值对齐 frameworks/PlateInput.jsx 的 provinces 参数,校验规则取自 :37-41 validate() 里的 5/6 位正则" } ] }