markdown 组件和代码高亮组件优化

Former-commit-id: d3f6a2c1709b0ef2b46ab629db382b4687074692 [formerly d3f6a2c1709b0ef2b46ab629db382b4687074692 [formerly d3f6a2c1709b0ef2b46ab629db382b4687074692 [formerly d3f6a2c1709b0ef2b46ab629db382b4687074692 [formerly 2cb8a3245f269e8fc8b8e84e75582dbe2111ef6e [formerly 2fcb318c9d67fd23d117fc43c58ce3bd0fe3276e]]]]]
Former-commit-id: 986b67d62d3c86fc484836203f8b5e1f4891eb6c
Former-commit-id: cf0546bc2376ab54f182e127f67c3a40393ff34b
Former-commit-id: 6963b119eb71b3d607c92c9cad99d050356c1d88 [formerly 19610c6adf62f7ebb440d7373832a1c5d60f4fb5]
Former-commit-id: 48f31983021b0ff99750c6dabc63b412ef34c83e
Former-commit-id: 98eaf63e71f322930ace1f3574bc7fc6e0c55525
Former-commit-id: a716504e5874c330944390c491ac790c991a598f
Former-commit-id: 3cb6935ae5fadeb239da1dfa19d1189f6f240e87
Former-commit-id: a457670c4f607c074274362653e516482c532363
This commit is contained in:
liyang
2019-03-20 10:11:47 +08:00
parent c62248fdaf
commit 617127f8bc
84 changed files with 21 additions and 4 deletions

View File

@@ -3,11 +3,12 @@
</template>
<script>
// 相关文档
// https://highlightjs.org/usage/
// http://highlightjs.readthedocs.io/en/latest/api.html#configure-options
import './styles/github-gist.css'
import htmlFormat from './libs/htmlFormat'
import highlight from 'highlight.js'
import '../highlight-styles/github-gist.css'
import htmlFormat from './libs/htmlFormat'
export default {
name: 'd2-highlight',
props: {

View File

@@ -10,6 +10,7 @@
<script>
import marked from 'marked'
import highlight from 'highlight.js'
import '../highlight-styles/github-gist.css'
import bandupan from './plugin/baidupan'
import 'github-markdown-css'
import { ComponentsMarkdownBase } from '@api/components.markdown'

View File

@@ -5,7 +5,22 @@
| 0001 | FairyEver | 1711467488@qq.com |
```
alert('Hello World')
// 注释
[].forEach.call($$("*"), a => {
a.style.outline="1px solid #"+(~~(Math.random()*(1<<24))).toString(16)
})
```
```
<div>
<p>Hello World</p>
</div>
```
```
body {
background-color: #333;
}
```
一般引用

View File

@@ -1,7 +1,7 @@
<template>
<d2-container :filename="filename">
<template slot="header">指定资源</template>
<d2-markdown :source="doc"/>
<d2-markdown :source="doc" highlight/>
</d2-container>
</template>