Explorar el Código

高亮模板的删除问题

zhuliu hace 1 año
padre
commit
8f036771ff
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      src/views/project/components/PatentKeywordsHighlight.vue

+ 2 - 2
src/views/project/components/PatentKeywordsHighlight.vue

@@ -122,7 +122,7 @@ export default {
     },
     onChange2(input) {
       if (!this.form.ifEnable && input) {
-        this.form.ifEnable = true
+        this.$set(this.form,'ifEnable',true)
       }
       this.$store.commit('SET_PATENT_HIGHLIGHT', this.form)
     },
@@ -183,7 +183,7 @@ export default {
         this.$message.success('操作成功')
         this.btnLoading2 = false
         this.dataList.splice(this.selected, 1)
-        this.selected = this.selected - 1
+        this.selected = (this.selected - 1)>=0?(this.selected - 1):0
         this.onChange()
       }).catch(error => {
         this.btnLoading2 = false