no message

Former-commit-id: 1c069d76278e418a4025d9507b64394b78d6c1dc
Former-commit-id: 196c50502c7c5dd567997000db8007406f2c7866
Former-commit-id: ce840c9b082c237c18e93ca38dc704000e355341
Former-commit-id: 81026579f627bbcbafce3aebbe444b9678cc4530
This commit is contained in:
liyang
2018-06-12 11:26:12 +08:00
parent 7c5c4a43cc
commit b32b84cdb1
9 changed files with 13 additions and 12 deletions

View File

@@ -19,7 +19,7 @@ export default {
required: false,
default: ''
},
md: {
source: {
type: String,
required: false,
default: ''
@@ -45,7 +45,7 @@ export default {
mounted () {
if (this.url) {
this.initWithUrl()
} else if (this.md) {
} else if (this.source) {
this.initWithMd()
} else {
console.log('not mounted init')
@@ -54,7 +54,7 @@ export default {
methods: {
// 使用 md 初始化
initWithMd () {
this.markedHTML = this.marked(this.md)
this.markedHTML = this.marked(this.source)
},
// 使用 url 初始化
async initWithUrl () {

View File

@@ -1,7 +1,7 @@
<template>
<d2-container>
<template slot="header">我是插入到 header 中的内容</template>
<d2-markdown :md="doc"/>
<d2-markdown :source="doc"/>
</d2-container>
</template>

View File

@@ -3,7 +3,7 @@
<template slot="header">
我是插入到 header 中的内容
</template>
<d2-markdown :md="doc"/>
<d2-markdown :source="doc"/>
<template slot="footer">
我是插入到 footer 中的内容
</template>

View File

@@ -1,7 +1,7 @@
<template>
<d2-container type="ghost">
<el-card shadow="never" style="width: 50%;">
<d2-markdown :md="doc"/>
<d2-markdown :source="doc"/>
</el-card>
</d2-container>
</template>

View File

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

View File

@@ -2,7 +2,7 @@
<d2-container type="ghost">
<el-card shadow="never" class="d2-mb">
<d2-demo-page-header slot="header" title="数据占位符"/>
<d2-markdown :md="doc"/>
<d2-markdown :source="doc"/>
</el-card>
<d2-demo-mock-card
v-for="(item, index) in settingDPD"

View File

@@ -2,7 +2,7 @@
<d2-container type="ghost">
<el-card shadow="never" class="d2-mb">
<d2-demo-page-header slot="header" title="数据模板"/>
<d2-markdown :md="doc"/>
<d2-markdown :source="doc"/>
</el-card>
<d2-demo-mock-card
v-for="(item, index) in settingDTD"