lcw
This commit is contained in:
@ -7,7 +7,8 @@
|
||||
<Editor :style="`height: ${props.heightNumber}px; overflow-y: hidden`" v-model="textContent" :defaultConfig="editorConfig" :mode="mode" @onCreated="handleCreated" @onChange="handChange" />
|
||||
</div>
|
||||
<template #footer>
|
||||
<!-- <el-button type="primary">暂存</el-button> -->
|
||||
<el-button type="primary" @click="SaveReport">保存</el-button>
|
||||
<!-- <el-button type="primary" @click="downloadWithStyles">历史报告</el-button> -->
|
||||
<el-button type="primary" @click="downloadWithStyles">下载</el-button>
|
||||
<el-button type="primary" @click="close">取消</el-button>
|
||||
</template>
|
||||
@ -47,7 +48,7 @@ const mode = "default";
|
||||
const toolbarConfig = {
|
||||
excludeKeys: ["blockquote", "codeBlock"] //清除不必要的工具,引用和代码块
|
||||
};
|
||||
const emits = defineEmits(["update:textContent", "changeFn","update:modelValue"]);
|
||||
const emits = defineEmits(["update:textContent", "changeFn","update:modelValue","SaveReport"]);
|
||||
//编辑器配置
|
||||
const editorConfig = {
|
||||
withCredentials: true, //允许跨域
|
||||
@ -122,6 +123,9 @@ const downloadWithStyles = () => {
|
||||
|
||||
saveAs(blob, 'styled-document.doc');
|
||||
};
|
||||
const SaveReport = () => {
|
||||
emits("SaveReport",props.textContent)
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
Reference in New Issue
Block a user