Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
data-table
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
hookehuyr
2022-12-22 11:27:34 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
e430a0c448cdaebce2af231eb1b7f6056d1692bc
e430a0c4
1 parent
7b24d665
fix
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
src/components/PhoneField/index.vue
src/components/PhoneField/index.vue
View file @
e430a0c
<!--
* @Date: 2022-09-02 10:46:03
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2022-12-22 11:
14:12
* @LastEditTime: 2022-12-22 11:
27:11
* @FilePath: /data-table/src/components/PhoneField/index.vue
* @Description: 手机输入框
-->
...
...
@@ -67,7 +67,7 @@ const is_sms = ref(false);
const validator = (val) => {
if (props.item.component_props.required && !val) {
return false;
} else if (!/1\d{10}/.test(val)) {
} else if (
val &&
!/1\d{10}/.test(val)) {
return false;
} else {
return true;
...
...
@@ -77,7 +77,7 @@ const validator = (val) => {
const validatorMessage = (val, rule) => {
if (props.item.component_props.required && !val) {
return "手机号码不能为空";
} else if (!/1\d{10}/.test(val)) {
} else if (
val &&
!/1\d{10}/.test(val)) {
return "请输入正确手机号码";
}
};
...
...
Please
register
or
login
to post a comment