fix: prettyPrint function move

This commit is contained in:
majianquan 2020-01-13 22:38:24 +08:00
parent 6bce5947f0
commit 1740ac1cc8
2 changed files with 4 additions and 7 deletions

View File

@ -84,7 +84,7 @@
<script src="libs/scripts/codemirror/format.js"></script>
<script src="libs/scripts/markdown.min.js"></script>
<!-- <script src="libs/scripts/prettify.min.js"></script> -->
<script src="libs/scripts/prettify.min.js"></script>
<!-- <script src="libs/scripts/index.js"></script> -->
<script src="libs/scripts/jquery.min.js"></script>
<script src="libs/scripts/closebrackets.js"></script>
@ -97,6 +97,9 @@
window.console
&& window.console.log
&& (console.log("Think big, train fast, learn deep. See https://github.com/yanglbme"))
setTimeout(() => {
document.body.addEventListener('load', prettyPrint())
}, 2000)
</script>
</body>

View File

@ -135,7 +135,6 @@ import {
} from './scripts/util'
import DEFAULT_CONTENT from './scripts/default-content'
import DEFAULT_CSS_CONTENT from './scripts/themes/default-theme-css'
// import { prettyPrint } from 'prettify'
require('codemirror/mode/javascript/javascript')
export default {
data () {
@ -485,11 +484,6 @@ export default {
type: 'success'
})
}
},
updated () {
this.$nextTick(() => {
// prettyPrint()
})
}
}
</script>