build image and file path compatibility repair
Former-commit-id: 69e5e4092b151379d27aa2eccde1255672277fb8 [formerly 69e5e4092b151379d27aa2eccde1255672277fb8 [formerly 69e5e4092b151379d27aa2eccde1255672277fb8 [formerly 69e5e4092b151379d27aa2eccde1255672277fb8 [formerly b70254441d8a42159229d3a1ffb6337a4904ce87 [formerly 218fe905d457ba3c6d7f48ceda77fbd38a6341ce]]]]] Former-commit-id: 185cbeff13a282fadbf959c1227927501f39a728 Former-commit-id: 5740a528b4627568a348f2d3b59528a16c7a6f34 Former-commit-id: 771cc66a523221c6ee2b0279a0819caab64b2f53 [formerly c7def5344c50d8edf8a3b41a2dbc1305445282f2] Former-commit-id: 3a9c6a8dd6b4399b04be05749d21692bff9ddc33 Former-commit-id: 6a4677e1001a6ec39cd7e5e051eaee1b1bf85ae1 Former-commit-id: 553208b3aaf49b39a63f495eec7097f9efcb2bd5 Former-commit-id: 1887cc7586fb947dd9f8815e61e6abd349bbdb4b Former-commit-id: 0ba5ab3302ce4540b3706a32178e515ba9053536
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
<template>
|
||||
<div class="layout-main-group">
|
||||
<div class="layout-main-group" :style="styleLayoutMainGroup">
|
||||
<div class="layout-main-mask"></div>
|
||||
<el-container class="layout-main">
|
||||
<!-- 顶栏 -->
|
||||
<el-header>
|
||||
<div class="logo-group" :style="{width: collapse ? asideWidthCollapse : asideWidth}">
|
||||
<img v-if="collapse" :src="`/static/image/theme/${themeName}/logo/icon-only.png`">
|
||||
<img v-else :src="`/static/image/theme/${themeName}/logo/all.png`">
|
||||
<img v-if="collapse" :src="`${$assetsPublicPath}static/image/theme/${themeName}/logo/icon-only.png`">
|
||||
<img v-else :src="`${$assetsPublicPath}static/image/theme/${themeName}/logo/all.png`">
|
||||
</div>
|
||||
<div class="toggle-aside-btn" @click="collapse = !collapse">
|
||||
<d2-icon name="bars"/>
|
||||
@@ -60,8 +60,14 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
...mapState({
|
||||
themeName: state => state.theme.name
|
||||
})
|
||||
themeName: state => state.theme.name,
|
||||
themeBackGroundImage: state => state.theme.backGroundImage
|
||||
}),
|
||||
styleLayoutMainGroup () {
|
||||
return {
|
||||
...this.themeBackGroundImage ? {backgroundImage: `url('${this.$assetsPublicPath}${this.themeBackGroundImage}')`} : {}
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
// 加载主题
|
||||
|
||||
@@ -69,7 +69,7 @@ export default {
|
||||
const renderer = new marked.Renderer()
|
||||
renderer.blockquote = (quote) => {
|
||||
// 百度网盘
|
||||
return (this.baidupan && bandupan(quote)) || `<blockquote>${quote}</blockquote>`
|
||||
return (this.baidupan && bandupan(quote, this.$assetsPublicPath)) || `<blockquote>${quote}</blockquote>`
|
||||
}
|
||||
return marked(data, {
|
||||
...this.highlight ? {highlight: (code) => highlight.highlightAuto(code).value} : {},
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
export default (quote) => {
|
||||
export default (quote, assetsPublicPath) => {
|
||||
const _quote = quote.replace(/<[^<>]+>/g, '').trim()
|
||||
const bdPanUrl = /^https:\/\/pan\.baidu\.com\/s\/[a-z0-9]+$/i
|
||||
const bdPanUrlPwd = /^链接: https:\/\/pan\.baidu\.com\/s\/[a-z0-9]+ 密码: [a-z0-9]{4}$/i
|
||||
@@ -6,7 +6,7 @@ export default (quote) => {
|
||||
return `<div class="baidupan">
|
||||
<a href="${_quote}" class="container">
|
||||
<div class="icon">
|
||||
<img src="/static/image/baidu-pan-logo.png">
|
||||
<img src="${assetsPublicPath}static/image/baidu-pan-logo.png" style="background-color: transparent;">
|
||||
</div>
|
||||
<div class="url">${_quote}</div>
|
||||
</a>
|
||||
@@ -18,7 +18,7 @@ export default (quote) => {
|
||||
<div class="container">
|
||||
<a href="${url[0]}">
|
||||
<div class="icon">
|
||||
<img src="/static/image/baidu-pan-logo.png">
|
||||
<img src="${assetsPublicPath}static/image/baidu-pan-logo.png" style="background-color: transparent;">
|
||||
</div>
|
||||
<div class="url">${url[0]}</div>
|
||||
</a>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<el-table :data="themeList" v-bind="table">
|
||||
<el-table-column prop="name" align="center" width="160"/>
|
||||
<el-table-column label="预览" width="220">
|
||||
<div slot-scope="scope" class="theme-preview" :style="{'backgroundImage': `url(${ scope.row.preview })`}"></div>
|
||||
<div slot-scope="scope" class="theme-preview" :style="{'backgroundImage': `url(${$assetsPublicPath}${scope.row.preview})`}"></div>
|
||||
</el-table-column>
|
||||
<el-table-column prop="address" align="center">
|
||||
<template slot-scope="scope">
|
||||
|
||||
Reference in New Issue
Block a user