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