refactor(core): add render
This commit is contained in:
parent
aad62b65f5
commit
8bee8f0213
20 changed files with 232 additions and 102 deletions
|
|
@ -9,7 +9,7 @@ import { isFn } from '../util/core'
|
|||
export function initMixin (Docsify) {
|
||||
Docsify.prototype._init = function () {
|
||||
const vm = this
|
||||
vm._config = config || {}
|
||||
vm.config = config || {}
|
||||
|
||||
initLifecycle(vm) // Init hooks
|
||||
initPlugin(vm) // Install plugins
|
||||
|
|
@ -23,5 +23,5 @@ export function initMixin (Docsify) {
|
|||
}
|
||||
|
||||
function initPlugin (vm) {
|
||||
[].concat(vm.config.plugins).forEach(fn => isFn(fn) && fn(vm.bindHook))
|
||||
[].concat(vm.config.plugins).forEach(fn => isFn(fn) && fn(vm._lifecycle, vm))
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue