fix execute script
This commit is contained in:
parent
bb13ddd5df
commit
98ec020c7a
2 changed files with 6 additions and 2 deletions
|
|
@ -1,3 +1,7 @@
|
|||
## 1.10.4
|
||||
### Bug fixes
|
||||
- fix execute script
|
||||
|
||||
## 1.10.3
|
||||
### Bug fixes
|
||||
- compatible vuep QingWei-Li/vuep/issues/2
|
||||
|
|
|
|||
|
|
@ -113,11 +113,11 @@ export function renderArticle (content) {
|
|||
.filter(script => !/template/.test(script.type)
|
||||
)[0]
|
||||
|
||||
CACHE.vm = script && script.remove()
|
||||
CACHE.vm = script
|
||||
? new Function(`return ${script.innerText.trim()}`)()
|
||||
: new Vue({ el: 'main' }) // eslint-disable-line
|
||||
|
||||
CACHE.vm && CACHE.vm.$nextTick(_ => event.scrollActiveSidebar())
|
||||
script && script.remove()
|
||||
}
|
||||
if (OPTIONS.auto2top) setTimeout(() => event.scroll2Top(OPTIONS.auto2top), 0)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue