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 17:55:19 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
00c461877e70b0ffa18d7ca487773685019bb0e0
00c46187
1 parent
48695014
编辑模式不能提交数据
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
src/views/index.vue
src/views/index.vue
View file @
00c4618
<!--
* @Date: 2022-07-18 10:22:22
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2022-12-08 1
4:57:55
* @LastEditTime: 2022-12-08 1
7:54:44
* @FilePath: /data-table/src/views/index.vue
* @Description: 首页
-->
...
...
@@ -44,10 +44,7 @@
/>
</van-cell-group>
<div v-if="formData.length" style="margin: 16px">
<van-button v-if="model === 'edit'" round block type="primary">
{{ PCommit.text ? PCommit.text : '提交' }}
</van-button>
<van-button v-else round block type="primary" native-type="submit">
<van-button round block type="primary" native-type="submit">
{{ PCommit.text ? PCommit.text : '提交' }}
</van-button>
</div>
...
...
@@ -407,6 +404,8 @@ const onSubmit = async (values) => {
postData.value = _.assign(postData.value, rest_data);
// 检查非表单输入项
if (validOther().status) {
// 编辑模式不能提交数据
if (model === 'edit') return false;
// 通过验证
const result = await addFormDataAPI({
form_code: $route.query.code,
...
...
Please
register
or
login
to post a comment