Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
custom_form
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
2023-04-04 15:55:14 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
d1e172161e875b25b0b578ae114046eaaaf18de9
d1e17216
1 parent
40d55746
✨ feat: 完善错误滚动功能
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
9 deletions
src/components/CheckboxField/index.vue
src/components/RadioField/index.vue
src/pages/table/index.vue
src/components/CheckboxField/index.vue
View file @
d1e1721
<!--
* @Date: 2022-08-30 11:34:19
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2023-04-04 15:
11:55
* @LastEditTime: 2023-04-04 15:
50:47
* @FilePath: /custom_form/src/components/CheckboxField/index.vue
* @Description: 多项选择控件
-->
...
...
@@ -120,7 +120,7 @@ const validCheckbox = () => {
// 必填项
props.item.component_props.options.some(item => {
// 必选项勾选校验
if (
!checkbox_value.value.length && item.input_required
) {
if (
props.item.component_props.required && !checkbox_value.value.length
) {
show_error.value = true;
error_msg.value = '必填项不能为空';
return true;
...
...
src/components/RadioField/index.vue
View file @
d1e1721
...
...
@@ -136,8 +136,8 @@ const showUrl = (rule) => { // 跳转设置链接
// 小程序需要配置制定域名内网页,功能无法实现。
}
const rule_content = ref("");
const show_error = ref(false);
// 校验模块
const validRadio = () => {
// 必填项
...
...
src/pages/table/index.vue
View file @
d1e1721
<!--
* @Date: 2023-03-24 09:19:27
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2023-04-04 15:
38:07
* @LastEditTime: 2023-04-04 15:
54:24
* @FilePath: /custom_form/src/pages/table/index.vue
* @Description: 文件描述
-->
...
...
@@ -437,7 +437,7 @@ const validOther = () => {
valid = {
status: input.value[index].validInput(),
key: "input",
id:
multi_rule.value[index]
.id
id:
input.value[index]?
.id
};
return false;
}
...
...
@@ -450,7 +450,7 @@ const validOther = () => {
valid = {
status: textarea.value[index].validTextarea(),
key: "textarea",
id:
multi_rule.value[index]
.id
id:
textarea.value[index]?
.id
};
return false;
}
...
...
@@ -463,7 +463,7 @@ const validOther = () => {
valid = {
status: radio.value[index].validRadio(),
key: "radio",
id:
multi_rule.value[index]
.id
id:
radio.value[index]?
.id
};
return false;
}
...
...
@@ -476,7 +476,7 @@ const validOther = () => {
valid = {
status: checkbox.value[index].validCheckbox(),
key: "checkbox",
id:
multi_rule.value[index]
.id
id:
checkbox.value[index]?
.id
};
return false;
}
...
...
@@ -489,7 +489,7 @@ const validOther = () => {
valid = {
status: multi_rule.value[index].validMultiRule(),
key: "multi_rule",
id: multi_rule.value[index].id
id: multi_rule.value[index]
?
.id
};
return false;
}
...
...
Please
register
or
login
to post a comment