fix: 修复image/main options
This commit is contained in:
parent
2fe7c4d11c
commit
1a84cafe53
|
@ -39,10 +39,11 @@ for (const flie of flies) {
|
||||||
for (const item of routes) {
|
for (const item of routes) {
|
||||||
const url = `/${flie.name}${item.url}`
|
const url = `/${flie.name}${item.url}`
|
||||||
console.log(`http://127.0.0.1:${Port}${url}`)
|
console.log(`http://127.0.0.1:${Port}${url}`)
|
||||||
|
const options = item?.options ?? {}
|
||||||
router.get(url, ctx => {
|
router.get(url, ctx => {
|
||||||
ctx.body = Com.create(item.element, {
|
ctx.body = Com.create(item.element, {
|
||||||
...item.options,
|
...options,
|
||||||
html_head: `${item?.options?.html_head ?? ''}<link rel="stylesheet" href="/output.css">`,
|
html_head: `${options?.html_head ?? ''}<link rel="stylesheet" href="/output.css">`,
|
||||||
file_create: false
|
file_create: false
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue