style: 移除 store 中无用的 Promise 声明以及优化代码格式 增强部分健壮性

This commit is contained in:
FairyEver
2020-04-22 11:03:48 +08:00
parent d249c86406
commit 98eaba77df
18 changed files with 382 additions and 531 deletions

View File

@@ -12,7 +12,7 @@ import marked from 'marked'
import highlight from 'highlight.js'
import bandupan from './plugin/baidupan'
import 'github-markdown-css'
import { ComponentsMarkdownBase } from '@api/components.markdown'
import { componentsMarkdownBase } from '@api/components.markdown'
export default {
name: 'd2-markdown',
props: {
@@ -64,7 +64,7 @@ export default {
},
// 从 url 加载原始数据
async getReadme (url) {
const data = await ComponentsMarkdownBase(url)
const data = await componentsMarkdownBase(url)
return this.marked(data)
},
marked (data) {