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

@@ -5,7 +5,7 @@
| 参数名 | 介绍 | 必选 | 值类型 | 可选值 | 默认值 | | 参数名 | 介绍 | 必选 | 值类型 | 可选值 | 默认值 |
| --- | --- | --- | --- | --- | --- | | --- | --- | --- | --- | --- | --- |
| url | markdown文件地址 | 非 | String | | 无 | | url | markdown文件地址 | 非 | String | | 无 |
| md | markdown内容 | 非 | String | | 无 | | source | markdown内容 | 非 | String | | 无 |
| highlight | 代码高亮 | 非 | Boolean | | false | | highlight | 代码高亮 | 非 | Boolean | | false |
| baidupan | 百度网盘分享链接显示优化 | 非 | Boolean | | true | | baidupan | 百度网盘分享链接显示优化 | 非 | Boolean | | true |
@@ -26,7 +26,7 @@ const md = `# Header
text` text`
<d2-markdown :md="md"/> <d2-markdown :source="md"/>
``` ```
## 百度网盘分享链接优化 ## 百度网盘分享链接优化

View File

@@ -10,11 +10,12 @@
* [ 修改 ] 路由注册回归最简单的写法 * [ 修改 ] 路由注册回归最简单的写法
* [ 修复 ] 首次加载 loading 样式类名和程序内类名冲突,新的加载类名使用 `d2-app-loading` 前缀 * [ 修复 ] 首次加载 loading 样式类名和程序内类名冲突,新的加载类名使用 `d2-app-loading` 前缀
* [ 修改 ] 所有类似 `dd-` 的样式前缀(包括自动注册图标的id前缀)统一改为 `d2-` * [ 修改 ] 所有类似 `dd-` 的样式前缀(包括自动注册图标的id前缀)统一改为 `d2-`
* [ 修复 ] 修复 `highlight` 组件和 `markdown` 组件的样式冲突 * [ 修复 ] 修复 `d2-highlight` 组件和 `d2-markdown` 组件的样式冲突
* [ 修改 ] 内置组件名称统一改为 `d2-` 前缀,统一使用横线连接 (kebab-case) 风格 * [ 修改 ] 内置组件名称统一改为 `d2-` 前缀,统一使用横线连接 (kebab-case) 风格
* [ 修改 ] 顶栏 logo 阴影删除 * [ 修改 ] 顶栏 logo 阴影删除
* [ 新增 ] 主题系统 * [ 新增 ] 主题系统
* [ 新增 ] 三个主题,分别为 `d2admin 经典``简约线条``流星` * [ 新增 ] 三个主题,分别为 `d2admin 经典``简约线条``流星`
* [ 修改 ] `d2-markdown` 组件 `md` 参数改名为 `source`
## v1.0.0 ## v1.0.0

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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