mirror of
https://github.com/fofolee/uTools-Manuals.git
synced 2025-06-29 21:12:42 +08:00
修复内置手册无法使用自定义样式的bug
This commit is contained in:
parent
887ede4673
commit
a554570b5a
@ -159,7 +159,7 @@ utools.onPluginEnter( async ({ code, type, payload }) => {
|
|||||||
switch (allFts[code].type) {
|
switch (allFts[code].type) {
|
||||||
case "default":
|
case "default":
|
||||||
baseDir = dirname;
|
baseDir = dirname;
|
||||||
assetDir = `${baseDir}/assets/${code}/`
|
assetDir = `${baseDir}/assets/${code}`
|
||||||
window.dirs = {
|
window.dirs = {
|
||||||
idxFile: `${baseDir}/index/${code}.json`,
|
idxFile: `${baseDir}/index/${code}.json`,
|
||||||
docPath: `${baseDir}/docs`,
|
docPath: `${baseDir}/docs`,
|
||||||
@ -167,7 +167,7 @@ utools.onPluginEnter( async ({ code, type, payload }) => {
|
|||||||
break;
|
break;
|
||||||
case "custom":
|
case "custom":
|
||||||
baseDir = allFts[code].path;
|
baseDir = allFts[code].path;
|
||||||
assetDir = `${baseDir}/assets/`
|
assetDir = `${baseDir}/assets`
|
||||||
window.dirs = {
|
window.dirs = {
|
||||||
idxFile: `${baseDir}/${code}.json`,
|
idxFile: `${baseDir}/${code}.json`,
|
||||||
docPath: `${baseDir}`,
|
docPath: `${baseDir}`,
|
||||||
@ -183,7 +183,7 @@ utools.onPluginEnter( async ({ code, type, payload }) => {
|
|||||||
if (!err) {
|
if (!err) {
|
||||||
$('[href="assets/manual.css"]').remove();
|
$('[href="assets/manual.css"]').remove();
|
||||||
files.forEach(file => {
|
files.forEach(file => {
|
||||||
$('head').append(`<link rel="stylesheet" href="${assetDir}${file}">`)
|
$('head').append(`<link rel="stylesheet" href="${assetDir}/${file}">`)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user