support Theme.enhanceApp

pull/1/head
Evan You 5 years ago
parent 4414f8e7df
commit 2dd1a15d56

@ -84,6 +84,14 @@ export function createApp() {
} }
}) })
if (Theme.enhanceApp) {
Theme.enhanceApp({
app,
router,
siteData: useSiteData()
})
}
return { app, router } return { app, router }
} }

@ -1,9 +1,16 @@
import Layout from './Layout.vue' import Layout from './Layout.vue'
/** /**
* @typedef {{
* app: import('vue').App
* router: import('../app/router').Router
* siteData: import('vue').Ref<object>
* }} EnhanceAppContext
*
* @type {{ * @type {{
* Layout: import('vue').ComponentOptions * Layout: import('vue').ComponentOptions
* NotFound?: import('vue').ComponentOptions * NotFound?: import('vue').ComponentOptions
* enhanceApp?: (ctx: EnhanceAppContext) => void
* }} * }}
*/ */
const Theme = { const Theme = {

Loading…
Cancel
Save