mirror of
https://github.com/doocs/md.git
synced 2024-11-28 13:36:32 +08:00
feature: fix
This commit is contained in:
parent
4c9a595cac
commit
caa826d729
@ -155,7 +155,7 @@ section {
|
||||
margin: 10px 8px;
|
||||
color: #333;
|
||||
position: relative;
|
||||
background-color: rgba(0, 0, 0, 0.03);
|
||||
background-color: rgb(238,238,238);
|
||||
border: 1px solid #f0f0f0;
|
||||
border-radius: 2px;
|
||||
display: flex;
|
||||
|
@ -194,9 +194,9 @@ export default {
|
||||
type: 'success'
|
||||
})
|
||||
clipboardDiv.innerHTML = this.output; // 恢复现场
|
||||
this.$emit('refresh')
|
||||
this.$emit('refresh');
|
||||
this.$emit('endCopy');
|
||||
}, 1000);
|
||||
}, 350);
|
||||
},
|
||||
// 自定义CSS样式
|
||||
async customStyle () {
|
||||
|
@ -9,8 +9,8 @@
|
||||
@showBox="showBox = !showBox"
|
||||
@showAboutDialog="aboutDialogVisible = true"
|
||||
@showDialogForm="dialogFormVisible = true"
|
||||
@startCopy="startCopy"
|
||||
@endCopy="isCoping = false, backLightColor = false"
|
||||
@startCopy="isCoping = true, backLight = true"
|
||||
@endCopy="endCopy"
|
||||
/>
|
||||
</el-header>
|
||||
<el-main class="main-body">
|
||||
@ -19,8 +19,8 @@
|
||||
<textarea id="editor" type="textarea" placeholder="Your markdown text here." v-model="source">
|
||||
</textarea>
|
||||
</el-col>
|
||||
<el-col :span="12" class="preview-wrapper" id="preview" :class="{'preview-wrapper_night': nightMode && backLightColor}">
|
||||
<section id="output-wrapper" :class="{'output_night': nightMode && !isCoping}">
|
||||
<el-col :span="12" class="preview-wrapper" id="preview" :class="{'preview-wrapper_night': nightMode && isCoping}">
|
||||
<section id="output-wrapper" :class="{'output_night': nightMode && !backLight}">
|
||||
<div class="preview">
|
||||
<section id="output" v-html="output">
|
||||
</section>
|
||||
@ -83,8 +83,8 @@ export default {
|
||||
showBox: false,
|
||||
aboutDialogVisible: false,
|
||||
dialogFormVisible: false,
|
||||
backLightColor: false,
|
||||
isCoping: false,
|
||||
backLight: false,
|
||||
timeout: null,
|
||||
changeTimer: null,
|
||||
source: ''
|
||||
@ -240,11 +240,11 @@ export default {
|
||||
this.editorRefresh();
|
||||
setTimeout(()=> PR.prettyPrint(), 0);
|
||||
},
|
||||
startCopy() {
|
||||
this.isCoping = true;
|
||||
setTimeout(() => {
|
||||
this.backLightColor = true;
|
||||
}, 500);
|
||||
endCopy() {
|
||||
this.backLight = false;
|
||||
setTimeout(()=> {
|
||||
this.isCoping = false;
|
||||
}, 800);
|
||||
},
|
||||
...mapMutations(['initEditorState', 'initEditorEntity', 'setWxRendererOptions',
|
||||
'editorRefresh', 'initCssEditorEntity'])
|
||||
@ -272,8 +272,9 @@ export default {
|
||||
.container {
|
||||
transition: all .3s;
|
||||
}
|
||||
.preview-wrapper {
|
||||
transition: all .3s;
|
||||
.preview {
|
||||
transition: background 0s;
|
||||
transition-delay: .2s;
|
||||
}
|
||||
.preview-wrapper_night {
|
||||
overflow-y: inherit;
|
||||
|
Loading…
Reference in New Issue
Block a user