|
@@ -8,10 +8,10 @@
|
|
|
<template slot-scope="scope">
|
|
|
<div>
|
|
|
<div v-if="scope.row.edit">
|
|
|
- <el-input type="textarea" autosize v-model="scope.row.content" placeholder="请输入"></el-input>
|
|
|
+ <my-RichText v-model="scope.row.content" placeholder="请输入"></my-RichText>
|
|
|
</div>
|
|
|
<div v-else>
|
|
|
- {{ scope.row.content }}
|
|
|
+ <span v-html="scope.row.content"></span>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -20,10 +20,10 @@
|
|
|
<template slot-scope="scope">
|
|
|
<div>
|
|
|
<div v-if="scope.row.edit">
|
|
|
- <el-input type="textarea" autosize v-model="scope.row.description" placeholder="请输入"></el-input>
|
|
|
+ <my-RichText v-model="scope.row.description" placeholder="请输入"></my-RichText>
|
|
|
</div>
|
|
|
<div v-else>
|
|
|
- {{ scope.row.description }}
|
|
|
+ <span v-html="scope.row.description"></span>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -257,6 +257,10 @@ export default {
|
|
|
this.$set(row,'edit',true)
|
|
|
},
|
|
|
cancel(row){
|
|
|
+ if(row.isAdd){
|
|
|
+ this.tableData.splice(row.index,1)
|
|
|
+ return
|
|
|
+ }
|
|
|
row = row.editContent
|
|
|
this.$set(row,'edit',false)
|
|
|
},
|
|
@@ -271,9 +275,11 @@ export default {
|
|
|
typeContent:`第${index}次修改后${this.type==1?'权要':'特征'}`,
|
|
|
content:'',
|
|
|
description:'',
|
|
|
- edit:true
|
|
|
+ edit:true,
|
|
|
+ isAdd:true,
|
|
|
+ index:scope.$index+1
|
|
|
}
|
|
|
- this.tableData.splice(index+1,0,obj)
|
|
|
+ this.tableData.splice(scope.$index+1,0,obj)
|
|
|
},
|
|
|
del(row){
|
|
|
this.$confirm('确认删除本条数据吗?', '提示', {
|