优化目录结构
Former-commit-id: db1e1be0b4aad32212d97e5143fa9879cedf4632 [formerly a66101b80d77d10c27f32bdd2122319aebfa4c45] [formerly db1e1be0b4aad32212d97e5143fa9879cedf4632 [formerly a66101b80d77d10c27f32bdd2122319aebfa4c45] [formerly db1e1be0b4aad32212d97e5143fa9879cedf4632 [formerly a66101b80d77d10c27f32bdd2122319aebfa4c45] [formerly a66101b80d77d10c27f32bdd2122319aebfa4c45 [formerly 5782e3eafefbc1fe3100cdc53e57d96fd4694d71 [formerly 1c71d57cae5f0cf28ddd4068fecf2b04a5f5f916]]]]] Former-commit-id: 5af82926fdcab09d38be4be15592ddf3c1458ecf Former-commit-id: 8d29f5394facf69538ad738e8c8bb0a2189ae3e1 Former-commit-id: 97534e51f651110986cfdd29a5a459c2f5ea5901 [formerly decab1d0c9a721015ecdfc220652c75947d8c8d1] Former-commit-id: 5bafd335b5d04ff4945a02377f9f1c1782968724 Former-commit-id: 97acb02928ef441830547c100b69d968fd664c09 Former-commit-id: 18fadf284749682851f064b3317bf2c727c2e30a Former-commit-id: 7ea8dd882a8956cbe091378dca68415d218c3659 Former-commit-id: 13d9ef1a64463790951744ac66f033bc52247142
|
Before Width: | Height: | Size: 999 B After Width: | Height: | Size: 999 B |
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 708 B After Width: | Height: | Size: 708 B |
|
Before Width: | Height: | Size: 872 B After Width: | Height: | Size: 872 B |
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 702 B After Width: | Height: | Size: 702 B |
|
Before Width: | Height: | Size: 998 B After Width: | Height: | Size: 998 B |
|
Before Width: | Height: | Size: 784 B After Width: | Height: | Size: 784 B |
|
Before Width: | Height: | Size: 985 B After Width: | Height: | Size: 985 B |
|
Before Width: | Height: | Size: 1013 B After Width: | Height: | Size: 1013 B |
|
Before Width: | Height: | Size: 967 B After Width: | Height: | Size: 967 B |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
|
|
@ -1,7 +1,7 @@
|
|||
import Vue from 'vue'
|
||||
|
||||
const requireAll = requireContext => requireContext.keys().map(requireContext)
|
||||
const req = require.context('./svg', false, /\.svg$/)
|
||||
const req = require.context('./icons', false, /\.svg$/)
|
||||
const iconMap = requireAll(req)
|
||||
|
||||
Vue.prototype.$IconSvg = iconMap.map(e => e.default.id.slice(3))
|
||||
|
|
@ -9,6 +9,7 @@
|
|||
|
||||
<script>
|
||||
import marked from 'marked'
|
||||
import axios from 'axios'
|
||||
import highlight from 'highlight.js'
|
||||
import bandupan from './plugin/baidupan'
|
||||
export default {
|
||||
|
|
@ -61,8 +62,8 @@ export default {
|
|||
this.markedHTML = await this.getReadme(this.url)
|
||||
},
|
||||
// 从 url 加载原始数据
|
||||
async getReadme (name) {
|
||||
const data = await this.$axios.get(name)
|
||||
async getReadme (url) {
|
||||
const { data } = await axios.get(url)
|
||||
return this.marked(data)
|
||||
},
|
||||
marked (data) {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<d2-container>
|
||||
<template slot="header">异步加载文件</template>
|
||||
<d2-markdown :url="`${$baseUrl}static/md/demo.md`"/>
|
||||
<d2-markdown :url="`${$baseUrl}markdown/demo.md`"/>
|
||||
</d2-container>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ module.exports = {
|
|||
svgRule.uses.clear()
|
||||
svgRule
|
||||
.include
|
||||
.add(resolve('src/assets/icons/svg'))
|
||||
.add(resolve('src/assets/svg-icons/icons'))
|
||||
.end()
|
||||
.use('svg-sprite-loader')
|
||||
.loader('svg-sprite-loader')
|
||||
|
|
@ -45,7 +45,7 @@ module.exports = {
|
|||
imagesRule
|
||||
.test(/\.(png|jpe?g|gif|webp|svg)(\?.*)?$/)
|
||||
.exclude
|
||||
.add(resolve('src/assets/icons/svg'))
|
||||
.add(resolve('src/assets/svg-icons/icons'))
|
||||
.end()
|
||||
}
|
||||
}
|
||||
|
|
|
|||