Ver código fonte

优化创建缺陷添加节流

qinzhipeng_v@didiglobal.com 4 anos atrás
pai
commit
a65709b38f

+ 6 - 1
src/views/projectManage/bugList/file/createdBug.vue

@@ -165,7 +165,7 @@
       <el-button id="pasteUpload" type="primary" style="display: none" @click.stop="pasteUpload">upload</el-button>
       <div slot="footer">
         <el-button @click="modalShow = false">取 消</el-button>
-        <el-button :disabled="dis" type="primary" @click="bug_created(formInline)">创 建</el-button>
+        <el-button :disabled="dis" type="primary" @click="bug_createds(formInline)">创 建</el-button>
       </div>
     </modal>
     <normal-dialog :show-dialog="showCopyFile" :title="'上传截图'" :width="'40%'" :submit-button="'上传'" :top="'5vh'" @confirm="confirmUpload()" @cancel="showCopyFile=false">
@@ -314,6 +314,7 @@ export default {
           { required: true, message: '修复人不能为空', trigger: 'blur' }
         ]
       },
+      stopClickLogin: false,
       bugEnumList: [], // bug状态
       appClient: [], // 客户端
       Editionlist: [], // 版本
@@ -499,6 +500,10 @@ export default {
       this.dis = true
     },
 
+    bug_createds: _.throttle(function() {
+      this.bug_created(this.formInline)
+    }, 2000),
+
     bug_created(e) {
       // 创建(提交)
       this.$refs['formInline'].validate(valid => {