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
2023-02-22 10:57:44 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
23a5c20a9f2de76e5cb63f5b9920b95ac56db68e
23a5c20a
1 parent
97f11d60
URL中可能带扩展字段提交表单
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 @
23a5c20
<!--
* @Date: 2022-07-18 10:22:22
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2023-02-
16 10:18:37
* @LastEditTime: 2023-02-
22 10:56:40
* @FilePath: /data-table/src/views/index.vue
* @Description: 首页
-->
...
...
@@ -148,6 +148,10 @@ const postData = ref({});
// 编辑模式不能提交操作
const model = $route.query.model;
// 模仿金数据的扩展参数
const x_field_1 = $route.query.x_field_1 ? $route.query.x_field_1 : null;
// 周期ID标识
const x_cycle = $route.query.x_cycle ? $route.query.x_cycle : null;
// 格式化表单数据结构
const formatData = (data) => {
...
...
@@ -456,7 +460,9 @@ const preValidData = (values) => {
const onSubmit = async (values) => {
// 表单数据处理
postData.value = preValidData(values)
postData.value = preValidData(values);
// 合并扩展字段
postData.value = { ...postData.value, x_field_1, x_cycle };
// 检查非表单输入项
if (validOther().status) {
// 编辑模式不能提交数据
...
...
Please
register
or
login
to post a comment