Kaynağa Gözat

1007 列表自定义按钮打开对话框后无法取消

cyy 2 yıl önce
ebeveyn
işleme
cb659255a7

+ 5 - 1
src/business/platform/data/templaterender/preview/index.vue

@@ -165,7 +165,11 @@ export default {
         this.selectedValue = this.multiple ? [] : {}
         this.setSelectRow()
       }
-      this.$emit('action-event', key, JSON.parse(JSON.stringify(this.selectedValue)))
+      this.$emit('close', false)
+      if(typeof this.selectedValue != 'undefined'){
+        this.$emit('action-event', key, JSON.parse(JSON.stringify(this.selectedValue)))
+      }
+      
     },
     setSelectRow() {
       if (this.$refs['dataTemplate'] && this.$refs['dataTemplate'].setSelectRow) {