|
@@ -6,7 +6,7 @@
|
|
|
<template>
|
|
<template>
|
|
|
<div class="editor-container" @keydown="handleKeydown" @keyup="handleKeyup">
|
|
<div class="editor-container" @keydown="handleKeydown" @keyup="handleKeyup">
|
|
|
<Editor :onTextChangeRef="lastChange" :onSelectionChangeRef="range" :onGetHTML="getHTML" :onGetText="getText"/>
|
|
<Editor :onTextChangeRef="lastChange" :onSelectionChangeRef="range" :onGetHTML="getHTML" :onGetText="getText"/>
|
|
|
- <el-button @click="download">导出</el-button>
|
|
|
|
|
|
|
+ <!--<el-button @click="download">导出</el-button>-->
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -40,6 +40,11 @@
|
|
|
changeRecordList.push(value)
|
|
changeRecordList.push(value)
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
|
|
+ emitter.on('click-stage', () => {
|
|
|
|
|
+ download()
|
|
|
|
|
+ changeRecordList.length = 0
|
|
|
|
|
+ })
|
|
|
|
|
+
|
|
|
const handleKeydown = (event: KeyboardEvent) => {
|
|
const handleKeydown = (event: KeyboardEvent) => {
|
|
|
// 增加对Shift组合键的识别
|
|
// 增加对Shift组合键的识别
|
|
|
// 在handleKeyup中增加对组合键的识别
|
|
// 在handleKeyup中增加对组合键的识别
|
|
@@ -236,7 +241,10 @@
|
|
|
|
|
|
|
|
onUnmounted(() => {
|
|
onUnmounted(() => {
|
|
|
emitter.off("change-record")
|
|
emitter.off("change-record")
|
|
|
- download()
|
|
|
|
|
|
|
+ emitter.off("click-stage")
|
|
|
|
|
+ if(changeRecordList.length > 0){
|
|
|
|
|
+ download()
|
|
|
|
|
+ }
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
</script>
|
|
</script>
|