From c8086d624c01bfbae3b9dfc324d33d6bfe46e041 Mon Sep 17 00:00:00 2001 From: xuqingkai Date: Sat, 23 Dec 2023 16:37:52 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E2=9C=A8=20=E6=96=B0=E5=A2=9E=20Form?= =?UTF-8?q?=20=E8=A1=A8=E5=8D=95=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/.vitepress/config.ts | 7 +- docs/component/calendar.md | 11 + docs/component/cell.md | 23 +- docs/component/col-picker.md | 11 + docs/component/datetime-picker.md | 11 + docs/component/form.md | 815 +++++++++++++++--- docs/component/input.md | 60 +- docs/component/picker.md | 11 + docs/component/select-picker.md | 11 + src/components/page-wraper/page-wraper.vue | 10 +- src/pages.json | 42 +- src/pages/cell/Index.vue | 4 +- src/pages/form/Index.vue | 424 ++++----- src/pages/form/demo1.vue | 95 ++ src/pages/form/demo2.vue | 69 ++ src/pages/form/demo3.vue | 426 +++++++++ src/pages/index/Index.vue | 6 +- src/pages/input/Index.vue | 23 +- src/pages/tabs/Index.vue | 16 + .../components/wd-calendar/index.scss | 30 +- .../components/wd-calendar/wd-calendar.vue | 51 +- .../wd-cell-group/wd-cell-group.vue | 9 - .../components/wd-cell/index.scss | 48 +- .../components/wd-cell/wd-cell.vue | 69 +- .../components/wd-col-picker/index.scss | 25 +- .../wd-col-picker/wd-col-picker.vue | 51 +- .../components/wd-datetime-picker/index.scss | 40 +- .../wd-datetime-picker/wd-datetime-picker.vue | 65 +- .../components/wd-form-item/index.scss | 18 + .../components/wd-form-item/wd-form-item.vue | 82 ++ .../components/wd-form/index.scss | 10 + .../components/wd-form/types.ts | 38 + .../components/wd-form/wd-form.vue | 174 ++++ .../components/wd-input-number/index.scss | 1 - .../components/wd-input/index.scss | 210 +---- .../components/wd-input/wd-input.vue | 153 ++-- .../components/wd-picker/index.scss | 40 +- .../components/wd-picker/wd-picker.vue | 52 +- .../components/wd-select-picker/index.scss | 25 +- .../wd-select-picker/wd-select-picker.vue | 56 +- src/uni_modules/wot-design-uni/global.d.ts | 4 +- 41 files changed, 2469 insertions(+), 857 deletions(-) create mode 100644 src/pages/form/demo1.vue create mode 100644 src/pages/form/demo2.vue create mode 100644 src/pages/form/demo3.vue create mode 100644 src/uni_modules/wot-design-uni/components/wd-form-item/index.scss create mode 100644 src/uni_modules/wot-design-uni/components/wd-form-item/wd-form-item.vue create mode 100644 src/uni_modules/wot-design-uni/components/wd-form/index.scss create mode 100644 src/uni_modules/wot-design-uni/components/wd-form/types.ts create mode 100644 src/uni_modules/wot-design-uni/components/wd-form/wd-form.vue diff --git a/docs/.vitepress/config.ts b/docs/.vitepress/config.ts index 57fc6df6..ceb67980 100644 --- a/docs/.vitepress/config.ts +++ b/docs/.vitepress/config.ts @@ -1,7 +1,7 @@ /* * @Author: weisheng * @Date: 2023-07-27 10:26:09 - * @LastEditTime: 2023-12-07 15:08:32 + * @LastEditTime: 2023-12-21 22:27:02 * @LastEditors: weisheng * @Description: * @FilePath: \wot-design-uni\docs\.vitepress\config.ts @@ -231,10 +231,13 @@ export default defineConfig({ text: "DatetimePickerView 时间选择器视图" }, { link: "/component/form", - text: "Form 表单组合" + text: "Form 表单" }, { link: "/component/input", text: "Input 输入框" + }, { + link: "/component/textarea", + text: "Textarea 文本域" }, { link: "/component/input-number", text: "InputNumber 计数器" diff --git a/docs/component/calendar.md b/docs/component/calendar.md index d1b15b49..22c6b1e1 100644 --- a/docs/component/calendar.md +++ b/docs/component/calendar.md @@ -397,6 +397,17 @@ function handleConfirm4({ value }) { | close-on-click-modal | 点击遮罩是否关闭 | boolean | - | true | - | | z-index | 弹窗层级 | number | - | 15 | - | | safe-area-inset-bottom | 弹出面板是否设置底部安全距离(iphone X 类型的机型) | boolean | - | true | - | +| prop | 表单域 `model` 字段名,在使用表单校验功能的情况下,该属性是必填的 | string | - | - | - | +| rules | 表单验证规则 | `FormItemRule []` | - | `[]` | - | + +### FormItemRule 数据结构 + +| 键名 | 说明 | 类型 | +| --- | --- | --- | +| required | 是否为必选字段 | `boolean` | +| message | 错误提示文案 | `string` | +| validator | 通过函数进行校验,可以返回一个 `Promise` 来进行异步校验 | `(value, rule) => boolean \| Promise` | +| pattern | 通过正则表达式进行校验,正则无法匹配表示校验不通过 | `RegExp` | ## Events diff --git a/docs/component/cell.md b/docs/component/cell.md index a44bbb01..ab1c2d51 100644 --- a/docs/component/cell.md +++ b/docs/component/cell.md @@ -35,10 +35,10 @@ ```scss .cell-icon { display: block; + box-sizing: border-box; width: 16px; height: 16px; - margin-top: 2px; - margin-right: 15px; + margin-right: 4px; background: url('https://img10.360buyimg.com/jmadvertisement/jfs/t1/71075/7/3762/1820/5d1f26d1E0d600b9e/a264c901943080ac.png') no-repeat; background-size: cover; } @@ -198,10 +198,11 @@ function handleSwitchChange({ value }) { ```scss .cell-icon { display: block; + box-sizing: border-box; + padding: 4px 0; width: 16px; - height: 16px; - margin-top: 2px; - margin-right: 15px; + height: 24px; + margin-right: 4px; background: url('https://img10.360buyimg.com/jmadvertisement/jfs/t1/71075/7/3762/1820/5d1f26d1E0d600b9e/a264c901943080ac.png') no-repeat; background-size: cover; } @@ -251,6 +252,18 @@ function handleSwitchChange({ value }) { | center | 是否垂直居中,默认顶部居中 | boolean | - | false | - | | required | 表单属性,必填 | boolean | - | false | - | | vertical | 表单属性,上下结构 | boolean | - | false | - | +| prop | 表单域 `model` 字段名,在使用表单校验功能的情况下,该属性是必填的 | string | - | - | - | +| rules | 表单验证规则 | `FormItemRule []` | - | `[]` | - | + +### FormItemRule 数据结构 + +| 键名 | 说明 | 类型 | +| --- | --- | --- | +| required | 是否为必选字段 | `boolean` | +| message | 错误提示文案 | `string` | +| validator | 通过函数进行校验,可以返回一个 `Promise` 来进行异步校验 | `(value, rule) => boolean \| Promise` | +| pattern | 通过正则表达式进行校验,正则无法匹配表示校验不通过 | `RegExp` | + ## Cell Events diff --git a/docs/component/col-picker.md b/docs/component/col-picker.md index 2441f62f..2b39ed2c 100644 --- a/docs/component/col-picker.md +++ b/docs/component/col-picker.md @@ -525,6 +525,17 @@ const columnChange = ({ selectedItem, resolve, finish }) => { | z-index | 弹窗层级 | number | - | 15 | - | | safe-area-inset-bottom | 弹出面板是否设置底部安全距离(iphone X 类型的机型) | boolean | - | true | - | | ellipsis | 是否超出隐藏 | boolean | - | false | - | +| prop | 表单域 `model` 字段名,在使用表单校验功能的情况下,该属性是必填的 | string | - | - | - | +| rules | 表单验证规则 | `FormItemRule []` | - | `[]` | - | + +### FormItemRule 数据结构 + +| 键名 | 说明 | 类型 | +| --- | --- | --- | +| required | 是否为必选字段 | `boolean` | +| message | 错误提示文案 | `string` | +| validator | 通过函数进行校验,可以返回一个 `Promise` 来进行异步校验 | `(value, rule) => boolean \| Promise` | +| pattern | 通过正则表达式进行校验,正则无法匹配表示校验不通过 | `RegExp` | ## 选项数据结构 diff --git a/docs/component/datetime-picker.md b/docs/component/datetime-picker.md index baef9bb0..6970e6bf 100644 --- a/docs/component/datetime-picker.md +++ b/docs/component/datetime-picker.md @@ -284,6 +284,17 @@ const displayFormatTabLabel = (items) => { | z-index | 弹窗层级 | number | - | 15 | - | | safe-area-inset-bottom | 弹出面板是否设置底部安全距离(iphone X 类型的机型) | boolean | - | true | - | | ellipsis | 是否超出隐藏 | boolean | - | false | - | +| prop | 表单域 `model` 字段名,在使用表单校验功能的情况下,该属性是必填的 | string | - | - | - | +| rules | 表单验证规则 | `FormItemRule []` | - | `[]` | - | + +### FormItemRule 数据结构 + +| 键名 | 说明 | 类型 | +| --- | --- | --- | +| required | 是否为必选字段 | `boolean` | +| message | 错误提示文案 | `string` | +| validator | 通过函数进行校验,可以返回一个 `Promise` 来进行异步校验 | `(value, rule) => boolean \| Promise` | +| pattern | 通过正则表达式进行校验,正则无法匹配表示校验不通过 | `RegExp` | ## Events diff --git a/docs/component/form.md b/docs/component/form.md index 4807b417..19674651 100644 --- a/docs/component/form.md +++ b/docs/component/form.md @@ -1,141 +1,727 @@ -# Form 表单组合 +# Form 表单 0.2.0 -本章节主要讲如何将多个 form 表单组件进行组合,形成一个完整的表单页面。 +用于数据录入、校验,支持输入框、单选框、复选框、文件上传等类型,常见的 form 表单为`单元格`形式的展示,即左侧为表单的标题描述,右侧为表单的输入。 -常见的 form 表单为`单元格`形式的展示,即左侧为表单的标题描述,右侧为表单的输入。 +其中,`Input 输入框`、`Textarea 输入框`、`Picker 选择器`、 `Calendar 日历选择器`、 `ColPicker 多列选择器`、`SelectPicker 单复选选择器`、`Cell 单元格` 和 `DatetimePicker 日期时间选择器`具有`单元格`的展示形式,同时也支持 `prop` 和 `rules` 属性,我们称之为`表单项组件`,而 `InputNumber 计数器` 、 `Switch 开关` 和 `Upload 上传` 等组件则需要使用 `Cell 单元格` 进行包裹使用。 -其中,`Input 输入框`、`Picker 选择器`、 `Calendar 日历选择器`, `ColPicker 多列选择器`、`SelectPicker 单复选选择器` 和 `DatetimePicker 日期时间选择器`具有`单元格`的展示形式,而 `InputNumber 计数器`和 `Switch 开关`需要使用 `Cell 单元格`进行包裹使用。 +结合 `wd-form` 组件,可以实现对以上组件的规则校验。 -所有的表单组件都支持 `name` 属性,可以结合小程序原生的 `form` 组件,监听 `submit` 事件,统一获取到所有表单组件的 `value`,也可以单独对每个表单组件监听 `change` 事件来获取单个表单组件的 `value`。 +> 对于表单组件,建议对 wd-cell-group 开启 border 属性,这样每条 cell 就会有边框线隔离开,这样表单的划分比较清晰。 -> 对于表单组件,建议对 wd-cell-group 开启 border 属性,这样每条cell就会有边框线隔离开,这样表单的划分比较清晰。 +## 基础用法 -下面是 Demo 示例: +在表单中,使用 `model` 指定表单数据对象,每个 `表单项组件` 代表一个表单项,使用 `prop` 指定表单项字段 ,使用 `rules` 属性定义校验规则。 -html 文件代码: +::: details 查看基础用法示例 +::: code-group -```html +```html [vue] + + + + + + + 提交 + + +``` + +```typescript [typescript] + +``` + +```css [css] +.footer { + padding: 12px; +} +``` + +::: + +## 校验规则 + +本章节演示四种自定义校验及提示规则:`正则校验`、`函数校验`、`函数返回错误提示`和`异步函数校验`。 + +::: details 查看校验规则示例 +::: code-group + +```html [vue] + + + + + + + + + 提交 + + +``` + +```typescript [typescript] + +``` + +```css [css] +.footer { + padding: 12px; +} +``` + +::: + +## 动态表单 + +表单项动态增减。 + +::: details 查看动态表单示例 +::: code-group + +```html [vue] + + + + + + + + 添加 + 删除 + 重置 + 提交 + + + + +``` + +```typescript [typescript] + +``` + +```css [css] +.footer { + text-align: left; + :deep(.wd-button) { + &:not(:last-child) { + margin-right: 12px; + } + } +} +``` + +::: + +## 指定字段校验 + +`validate` 方法可以传入一个 `prop` 参数,指定校验的字段,可以实现在表单组件的`blur`、`change`等事件触发时对该字段的校验。 + +::: details 查看指定字段校验示例 +::: code-group + +```html [vue] + + + + + + + + + 提交 + +``` + +```typescript [typescript] + +``` + +```css [css] +.footer { + padding: 12px; +} +``` + +::: + +## 复杂表单 + +结合`Input 输入框`、`Textarea 输入框`、`Picker 选择器`、 `Calendar 日历选择器`、 `ColPicker 多列选择器`、`SelectPicker 单复选选择器`、`Cell 单元格` 和 `DatetimePicker 日期时间选择器`实现一个复杂表单。 + +::: details 查看复杂表单示例 +::: code-group + +```html [vue] + -
+ - - + + - + + + - - - + + + + - - + + + + + + + + + - - - + 已阅读并同意 《借款额度合同及相关授权》 - + 提交 - +
+
``` -> 自定义按钮组件的 form-type 无法触发小程序官方form组件的submit事件,微信要求小程序基础库 2.10.3 才支持,京东小程序的则暂时不支持,因此需要用小程序自带的官方 button 组件,样式上可以引入 wot-design 中 button 的样式文件,使用 `wd-button` , `is-primary` , `is-suck` , `is-block`, `is-plain` , `is-disabled` 等类名进行组合使用来展示 wot-design 组件库的按钮样式。 - -index.js 文件代码: - -```typescript -import { useMessage } from '@/uni_modules/wot-design-uni/components/wd-message-box' +```typescript [typescript] + ``` -css 文件代码: - -```scss +```css [css] .inline-txt { display: inline-block; font-size: 14px; @@ -292,3 +834,34 @@ css 文件代码: font-size: 12px !important; } ``` + +::: + +## Attributes + +| 参数 | 说明 | 类型 | 可选值 | 默认值 | 最低版本 | +| ----- | ------------ | --------------------- | ------ | ------ | -------- | +| model | 表单数据对象 | `Record` | - | - | 0.2.0 | +| rules | 表单验证规则 | `FormRules` | - | - | 0.2.0 | + +### FormItemRule 数据结构 + +| 键名 | 说明 | 类型 | +| --------- | ------------------------------------------------------- | ------------------------------------- | +| required | 是否为必选字段 | `boolean` | +| message | 错误提示文案 | `string` | +| validator | 通过函数进行校验,可以返回一个 `Promise` 来进行异步校验 | `(value, rule) => boolean \| Promise` | +| pattern | 通过正则表达式进行校验,正则无法匹配表示校验不通过 | `RegExp` | + +## Events + +| 事件名称 | 说明 | 参数 | 最低版本 | +| -------- | ------------------------------------------------------------------------------ | --------------- | -------- | +| validate | 验证表单,支持传入一个 prop 来验证单个表单项,不传入 prop 时,会验证所有表单项 | `prop?: string` | 0.2.0 | +| reset | 重置校验结果 | - | 0.2.0 | + +## 外部样式类 + +| 类名 | 说明 | 最低版本 | +| ------------ | ---------- | -------- | +| custom-class | 根节点样式 | 0.2.0 | diff --git a/docs/component/input.md b/docs/component/input.md index 5a1d3957..8b6b9188 100644 --- a/docs/component/input.md +++ b/docs/component/input.md @@ -69,36 +69,6 @@ function handleChange(event) { ``` -## 文本域 - -设置 `type` 为 'textarea`。 - -:::warning -当 `wd-input` 的 `type` 为 'textarea' ,并嵌入 `wd-message-box`、`wd-popup`、`wd-action-sheet` 这类弹层组件时,textarea 的 placeholder 样式会失效,需要手动给 `wd-message-box`、`wd-popup`、`wd-action-sheet` 组件设置 `:lazy-render="false"` 属性,textarea 原生组件在这块实现有些问题,对于页面非立即渲染的 textarea 无法成功设置 placeholder 样式 -::: - -```html - -``` - -设置清空,字数限制。 - -```html - -``` -也可以设置`auto-height`使高度自增加。 - -```html - -``` - ## 设置label标题 设置 `label` 标题,可以和 `cell-group` 组合使用,形成 `cell` 展示类型。可以通过 `label-width` 设置标题宽度,默认为 '33%'。 @@ -143,7 +113,7 @@ function handleChange(event) { | 参数 | 说明 | 类型 | 可选值 | 默认值 | 最低版本 | |-----|------|-----|-------|-------|---------| -| type | 类型 | string | text / textarea / number / digit / idcard | text | - | +| type | 类型 | string | text / number / digit / idcard | text | - | | v-model | 绑定值 | string / number | - | - | - | | placeholder | 占位文本 | string | - | 请输入... | - | | clearable | 显示清空按钮 | boolean | - | false | - | @@ -157,17 +127,14 @@ function handleChange(event) { | confirm-type | 设置键盘右下角按钮的文字,仅在type='text'时生效 | string | done / go / next / search / send | done | - | | confirm-hold | 点击键盘右下角按钮时是否保持键盘不收起 | Boolean | - | false | - | | always-embed | 微信小程序原生属性,强制 input 处于同层状态,默认 focus 时 input 会切到非同层状态 (仅在 iOS 下生效) | Boolean | - | false | - | -| placeholderStyle | 原生属,指定 placeholder 的样式,目前仅支持color,font-size和font-weight | string | - | - | - | -| placeholderClass | textarea指定 placeholder 的样式类 | string | - | textarea-placeholder | - | +| placeholderStyle | 原生属性,指定 placeholder 的样式,目前仅支持color,font-size和font-weight | string | - | - | - | +| placeholderClass | 原生属性,指定 placeholder 的样式类 | string | - | - | - | | focus | 原生属性,获取焦点 | boolean | - | false | - | -| cursorSpacing | 原生属性,指定光标与键盘的距离。取textarea距离底部的距离和cursor-spacing指定的距离的最小值作为光标与键盘的距离 | number | - | 0 | - | -| fixed | textarea原生属性,如果 textarea 是在一个 position:fixed 的区域,需要显示指定属性 fixed 为 true | boolean | - | false | - | +| cursorSpacing | 原生属性,指定光标与键盘的距离。取 input 距离底部的距离和cursor-spacing指定的距离的最小值作为光标与键盘的距离 | number | - | 0 | - | | cursor | 原生属性,指定focus时的光标位置 | number | - | -1 | - | -| showConfirmBar | 原生属性,是否显示键盘上方带有”完成“按钮那一栏 | boolean | - | true | - | | selectionStart | 原生属性,光标起始位置,自动聚集时有效,需与selection-end搭配使用 | number | - | -1 | - | | selectionEnd | 原生属性,光标结束位置,自动聚集时有效,需与selection-start搭配使用 | number | - | -1 | - | | adjustPosition | 原生属性,键盘弹起时,是否自动上推页面 | boolean | - | true | - | -| autoHeight | textarea原生属性,textarea 行数自适应,从1行开始显示 | boolean | - | false | - | | label | 设置左侧标题 | string | - | - | - | | size | 设置输入框大小 | string | - | - | - | | error | 设置输入框错误状态,错误状态时为红色 | boolean | - | false | - | @@ -177,8 +144,20 @@ function handleChange(event) { | use-suffix-slot | 使用 后置图标 插槽 | boolean | - | false | - | | use-prefix-slot | 使用 前置图标 插槽 | boolean | - | false | - | | required | cell 类型下必填样式 | boolean | - | false | - | -| name | form 表单中的字段名 | string | - | - | - | | no-border | 非 cell 类型下是否隐藏下划线 | boolean | - | false | - | - | +| prop | 表单域 `model` 字段名,在使用表单校验功能的情况下,该属性是必填的 | string | - | - | - | +| rules | 表单验证规则 | `FormItemRule []` | - | `[]` | - | + + +### FormItemRule 数据结构 + +| 键名 | 说明 | 类型 | +| --- | --- | --- | +| required | 是否为必选字段 | `boolean` | +| message | 错误提示文案 | `string` | +| validator | 通过函数进行校验,可以返回一个 `Promise` 来进行异步校验 | `(value, rule) => boolean \| Promise` | +| pattern | 通过正则表达式进行校验,正则无法匹配表示校验不通过 | `RegExp` | + ## Events @@ -186,10 +165,9 @@ function handleChange(event) { |---------|-----|-----|---------| | input | 监听输入框input事件 | ` {value, cursor, keyCode}` | - | | focus | 监听输入框focus事件 | ` { value, height }`, height 为键盘高度 | - | -| blur | 监听输入框blur事件 | ` { value, cursor }`,仅在type="textarea"时存在cursor | - | +| blur | 监听输入框blur事件 | ` { value }` | - | | change | 监听输入框修改事件 | ` { value }` | - | | clear | 监听输入框清空按钮事件 | - | - | -| linechange | 监听输入框行数变化(仅限textarea) | ` { height: 0, heightRpx: 0, lineCount: 0 }` | - | | confirm | 点击完成时, 触发 confirm 事件 | ` { value }` | - | | keyboardheightchange | 键盘高度发生变化的时候触发此事件 | ` { height, duration }` | - | | clickprefixicon | 点击前置图标时触发 | - | - | @@ -211,7 +189,5 @@ function handleChange(event) { | 类名 | 说明 | 最低版本 | |-----|------|--------| | custom-class | 根节点样式 | - | -| custom-textarea-container-class | textarea 容器外部自定义样式 | - | -| custom-textarea-class | textarea 外部自定义样式 | - | | custom-input-class | input 外部自定义样式 | - | | custom-label-class | label 外部自定义样式 | - | \ No newline at end of file diff --git a/docs/component/picker.md b/docs/component/picker.md index 90db0602..994e099e 100644 --- a/docs/component/picker.md +++ b/docs/component/picker.md @@ -261,6 +261,17 @@ function handleConfirm({ value }) { | z-index | 弹窗层级 | number | - | 15 | - | | safe-area-inset-bottom | 弹出面板是否设置底部安全距离(iphone X 类型的机型) | boolean | - | true | - | | ellipsis | 是否超出隐藏 | boolean | - | false | - | +| prop | 表单域 `model` 字段名,在使用表单校验功能的情况下,该属性是必填的 | string | - | - | - | +| rules | 表单验证规则 | `FormItemRule []` | - | `[]` | - | + +### FormItemRule 数据结构 + +| 键名 | 说明 | 类型 | +| --- | --- | --- | +| required | 是否为必选字段 | `boolean` | +| message | 错误提示文案 | `string` | +| validator | 通过函数进行校验,可以返回一个 `Promise` 来进行异步校验 | `(value, rule) => boolean \| Promise` | +| pattern | 通过正则表达式进行校验,正则无法匹配表示校验不通过 | `RegExp` | ## Events diff --git a/docs/component/select-picker.md b/docs/component/select-picker.md index f0b379dd..7d0602f0 100644 --- a/docs/component/select-picker.md +++ b/docs/component/select-picker.md @@ -342,6 +342,17 @@ function handleConfirm({ value, selectedItems }) { | filter-placeholder | 搜索框占位符 | string | - | 搜索 | - | | ellipsis | 是否超出隐藏 | boolean | - | false | - | | scroll-into-view | 重新打开是否滚动到选中项 | boolean | - | true | 0.1.34 | +| prop | 表单域 `model` 字段名,在使用表单校验功能的情况下,该属性是必填的 | string | - | - | - | +| rules | 表单验证规则 | `FormItemRule []` | - | `[]` | - | + +### FormItemRule 数据结构 + +| 键名 | 说明 | 类型 | +| --- | --- | --- | +| required | 是否为必选字段 | `boolean` | +| message | 错误提示文案 | `string` | +| validator | 通过函数进行校验,可以返回一个 `Promise` 来进行异步校验 | `(value, rule) => boolean \| Promise` | +| pattern | 通过正则表达式进行校验,正则无法匹配表示校验不通过 | `RegExp` | ## 选项数据结构 diff --git a/src/components/page-wraper/page-wraper.vue b/src/components/page-wraper/page-wraper.vue index 2fcba85c..fb2f8965 100644 --- a/src/components/page-wraper/page-wraper.vue +++ b/src/components/page-wraper/page-wraper.vue @@ -1,14 +1,6 @@ -