fix: merge bug

This commit is contained in:
hlwwlh 2020-07-13 04:05:09 +00:00
parent b9b2722592
commit 0cd2301fbd

View File

@ -2,8 +2,8 @@
<el-dialog <el-dialog
title="插入表格" title="插入表格"
class="insert__dialog" class="insert__dialog"
:visible="dialogFormVisible" :visible="value"
@close="$emit('close')" @close="$emit('input', false)"
border border
> >
<el-row class="tb-options" type="flex" align="middle" :gutter="10"> <el-row class="tb-options" type="flex" align="middle" :gutter="10">
@ -44,7 +44,7 @@
</table> </table>
<!-- --> <!-- -->
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button :type="btnType" plain @click="$emit('close')"> </el-button> <el-button :type="btnType" plain @click="$emit('input', false)"> </el-button>
<el-button :type="btnType" @click="insertTable" plain> </el-button> <el-button :type="btnType" @click="insertTable" plain> </el-button>
</div> </div>
</el-dialog> </el-dialog>
@ -58,7 +58,7 @@
} from "vuex"; } from "vuex";
export default { export default {
props: { props: {
dialogFormVisible: { value: {
type: Boolean, type: Boolean,
default: false default: false
} }
@ -94,7 +94,7 @@
currRow = []; currRow = [];
for (let j = 0; j < cols; ++j) { for (let j = 0; j < cols; ++j) {
const rowIdx = i > 1 ? i - 1 : i; const rowIdx = i > 1 ? i - 1 : i;
i === 1 ? i === 1 ?
currRow.push("---\t") : currRow.push("---\t") :
currRow.push(this.tableData[`k_${rowIdx}_${j}`] || ""); currRow.push(this.tableData[`k_${rowIdx}_${j}`] || "");
} }
@ -105,7 +105,7 @@
this.rowNum = 1; this.rowNum = 1;
this.colNum = 1; this.colNum = 1;
this.editor.replaceSelection(`\n${table}\n`, "end"); this.editor.replaceSelection(`\n${table}\n`, "end");
this.$emit("close"); this.$emit('input', false);
this.editorRefresh(); this.editorRefresh();
}, },
...mapMutations(["editorRefresh"]), ...mapMutations(["editorRefresh"]),