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-08 14:58:01 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
49882323b140f1a58236fe11e23c5071a19481c3
49882323
1 parent
256619b1
过滤掉标识为ignore的字段
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
6 deletions
src/components/AreaPickerField/index.vue
src/components/DesField/index.vue
src/views/index.vue
src/components/AreaPickerField/index.vue
View file @
4988232
<!--
* @Date: 2022-08-30 14:32:11
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2022-12-08 14:
39:54
* @LastEditTime: 2022-12-08 14:
57:16
* @FilePath: /data-table/src/components/AreaPickerField/index.vue
* @Description: 省市区选择控件
-->
...
...
@@ -9,6 +9,7 @@
<div class="area-picker-field">
<div class="label">{{ item.component_props.label }}<span v-if="item.component_props.required"> *</span></div>
<van-field
name="ignore"
v-model="fieldValue"
is-link
readonly
...
...
@@ -19,6 +20,7 @@
:border="true"
/>
<van-field
name="ignore"
v-model="address"
:placeholder="item.component_props.placeholder"
@blur="onBlur"
...
...
@@ -98,7 +100,6 @@ const validAreaPicker = () => {
} else {
show_empty.value = false;
}
console.warn(show_empty.value);
return !show_empty.value;
};
...
...
src/components/DesField/index.vue
View file @
4988232
<!--
* @Date: 2022-08-29 14:31:20
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2022-12-08 14:
37:2
8
* @LastEditTime: 2022-12-08 14:
52:4
8
* @FilePath: /data-table/src/components/DesField/index.vue
* @Description: 描述文本控件
-->
...
...
@@ -10,7 +10,7 @@
<div class="label">{{ item.component_props.label }}</div>
<van-field
v-model="item.component_props.desc"
:name="item.nam
e"
name="ignor
e"
:readonly="true"
:border="false"
/>
...
...
src/views/index.vue
View file @
4988232
<!--
* @Date: 2022-07-18 10:22:22
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2022-12-08 14:
21:21
* @LastEditTime: 2022-12-08 14:
57:55
* @FilePath: /data-table/src/views/index.vue
* @Description: 首页
-->
...
...
@@ -401,8 +401,10 @@ const validOther = () => {
};
const onSubmit = async (values) => {
// 过滤掉标识为ignore的字段数据
let { ignore, ...rest_data } = values;
// 合并自定义字段到提交表单字段
postData.value = _.assign(postData.value,
values
);
postData.value = _.assign(postData.value,
rest_data
);
// 检查非表单输入项
if (validOther().status) {
// 通过验证
...
...
Please
register
or
login
to post a comment