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
2024-07-27 10:54:00 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
ba742353a14d33c3efaff840bd0f52be9fd2901b
ba742353
1 parent
7f7eeda4
🐞 fix: 隐藏字段的值需要被置空,避免提交报错
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
src/views/index.vue
src/views/index.vue
View file @
ba74235
<!--
* @Date: 2022-07-18 10:22:22
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-07-27 10:
26:54
* @LastEditTime: 2024-07-27 10:
53:28
* @FilePath: /data-table/src/views/index.vue
* @Description: 首页
-->
...
...
@@ -1049,7 +1049,13 @@ const onSubmit = async (values) => {
postData.value = preValidData(values);
// 合并扩展字段
postData.value = { ...postData.value, x_field_1, x_cycle };
// TODO: formData.value disabled=true 数据处理?表单页面上不显示?不一定需要处理
// formData.value disabled=true 数据处理, 表单页面上不显示
formData.value?.forEach(item => {
if (item.component_props.disabled) {
// 隐藏字段的值需要被置空
postData.value[item.key] = '';
}
});
// 检查非表单输入项
if (validOther().status) {
// 编辑模式不能提交数据
...
...
Please
register
or
login
to post a comment