表单提交失败后一直处于 loading 状态

Saber 未结 2 988
idabaicai
idabaicai 剑童 2021-07-06 10:12
悬赏:10

一、该问题的重现步骤是什么?

1.  填写表单

2.  点击提交

3.  提交失败后一直处于 loading 状态

截图_20210706095537.png


二、你期待的结果是什么?实际看到的又是什么?

提交中表单处于 loading 状态,提交后处于正常状态。

三、你正在使用的是什么产品,什么版本?在什么操作系统上?

saber admin 2.8.1

四、相关代码

template:

<avue-form

        :option="option"

        @submit="rowSave"

 ></avue-form>


options

{

          height:'auto',

          calcHeight30,

          tipfalse,

          searchShowtrue,

          searchMenuSpan6,

          bordertrue,

          indextrue,

          viewBtntrue,

          selectiontrue,

          dialogClickModalfalse,

          submitText'立即发布',

          menuPosition'left',

          column: [

            {

              label"接收设备",

              type"select",

              prop"facilityInfoId",

              searchtrue,

              rowtrue,

              dicUrl"",

              props: {

                label"unitType",

                value"id"

              },

              slottrue

              rules: [{

                requiredtrue,

                message"请选择接收设备",

                trigger"blur"

              }]

            },

    ......

          ]

        },

methods:

rowSave(rowdoneloading) {

        add(row).then(() => {

          this.onLoad(this.page);

          this.$message({

            type"success",

            message"操作成功!"

          });

          done();

        }, error => {

          loading();

          window.console.log(error);

        });

      },



2条回答
  • 2021-07-07 00:27

    submit方法有一个done方法注入,调用后会取消loading状态

    1 讨论(0)
  • 2021-07-06 10:14

    后端返回的数据:

    截图_20210706101334.png

    0 讨论(0)
提交回复