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-19 17:50:35 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
a7ca796089b3088c65478ca10ba893c5a64f78c2
a7ca7960
1 parent
e4bc61bd
提交表单逻辑调整,单选按钮组件结构调整
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
18 deletions
src/components/RadioField/index.vue
src/views/index.vue
src/components/RadioField/index.vue
View file @
a7ca796
<!--
* @Date: 2022-08-30 11:34:19
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2022-12-
09 15:54:52
* @LastEditTime: 2022-12-
19 10:47:56
* @FilePath: /data-table/src/components/RadioField/index.vue
* @Description: 单项选择控件
-->
...
...
@@ -26,12 +26,12 @@
>
<van-radio
v-for="x in item.component_props.options"
:key="
index
"
:name="x"
:key="
x.value
"
:name="x
.value
"
icon-size="1rem"
:checked-color="themeVars.radioColor"
style="margin-bottom: 0.25rem"
>{{ x }}</van-radio
>{{ x
.title
}}</van-radio
>
</van-radio-group>
</template>
...
...
src/views/index.vue
View file @
a7ca796
<!--
* @Date: 2022-07-18 10:22:22
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2022-12-1
6 16:38:31
* @LastEditTime: 2022-12-1
9 15:27:22
* @FilePath: /data-table/src/views/index.vue
* @Description: 首页
-->
...
...
@@ -369,19 +369,19 @@ const onSubmit = async (values) => {
// 检查非表单输入项
if (validOther().status) {
console.warn(postData.value);
//
//
编辑模式不能提交数据
//
if (model === 'edit') return false;
//
//
通过验证
//
const result = await addFormDataAPI({
//
form_code: $route.query.code,
//
data: postData.value,
//
});
//
if (result.code) {
//
showSuccessToast("提交成功");
//
$router.push({
//
path: "/success",
//
});
//
}
// 编辑模式不能提交数据
if (model === 'edit') return false;
// 通过验证
const result = await addFormDataAPI({
form_code: $route.query.code,
data: postData.value,
});
if (result.code) {
showSuccessToast("提交成功");
$router.push({
path: "/success",
});
}
} else {
console.warn(validOther().key + "不通过验证");
// // 图片上传控件报错提示
...
...
Please
register
or
login
to post a comment