no message
Former-commit-id: 1c069d76278e418a4025d9507b64394b78d6c1dc Former-commit-id: 196c50502c7c5dd567997000db8007406f2c7866 Former-commit-id: ce840c9b082c237c18e93ca38dc704000e355341 Former-commit-id: 81026579f627bbcbafce3aebbe444b9678cc4530
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
| 参数名 | 介绍 | 必选 | 值类型 | 可选值 | 默认值 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| url | markdown文件地址 | 非 | String | | 无 |
|
||||
| md | markdown内容 | 非 | String | | 无 |
|
||||
| source | markdown内容 | 非 | String | | 无 |
|
||||
| highlight | 代码高亮 | 非 | Boolean | | false |
|
||||
| baidupan | 百度网盘分享链接显示优化 | 非 | Boolean | | true |
|
||||
|
||||
@@ -26,7 +26,7 @@ const md = `# Header
|
||||
|
||||
text`
|
||||
|
||||
<d2-markdown :md="md"/>
|
||||
<d2-markdown :source="md"/>
|
||||
```
|
||||
|
||||
## 百度网盘分享链接优化
|
||||
|
||||
@@ -10,11 +10,12 @@
|
||||
* [ 修改 ] 路由注册回归最简单的写法
|
||||
* [ 修复 ] 首次加载 loading 样式类名和程序内类名冲突,新的加载类名使用 `d2-app-loading` 前缀
|
||||
* [ 修改 ] 所有类似 `dd-` 的样式前缀(包括自动注册图标的id前缀)统一改为 `d2-`
|
||||
* [ 修复 ] 修复 `highlight` 组件和 `markdown` 组件的样式冲突
|
||||
* [ 修复 ] 修复 `d2-highlight` 组件和 `d2-markdown` 组件的样式冲突
|
||||
* [ 修改 ] 内置组件名称统一改为 `d2-` 前缀,统一使用横线连接 (kebab-case) 风格
|
||||
* [ 修改 ] 顶栏 logo 阴影删除
|
||||
* [ 新增 ] 主题系统
|
||||
* [ 新增 ] 三个主题,分别为 `d2admin 经典`,`简约线条`,`流星`
|
||||
* [ 修改 ] `d2-markdown` 组件 `md` 参数改名为 `source`
|
||||
|
||||
## v1.0.0
|
||||
|
||||
|
||||
@@ -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 () {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<d2-container>
|
||||
<template slot="header">我是插入到 header 中的内容</template>
|
||||
<d2-markdown :md="doc"/>
|
||||
<d2-markdown :source="doc"/>
|
||||
</d2-container>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<template slot="header">
|
||||
我是插入到 header 中的内容
|
||||
</template>
|
||||
<d2-markdown :md="doc"/>
|
||||
<d2-markdown :source="doc"/>
|
||||
<template slot="footer">
|
||||
我是插入到 footer 中的内容
|
||||
</template>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<d2-container>
|
||||
<template slot="header">指定资源</template>
|
||||
<d2-markdown :md="doc"/>
|
||||
<d2-markdown :source="doc"/>
|
||||
</d2-container>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user