diff --git a/src/components/Sticky.vue b/src/components/Sticky.vue index 36622f34..ea5e0ca1 100644 --- a/src/components/Sticky.vue +++ b/src/components/Sticky.vue @@ -96,14 +96,14 @@ export default defineComponent({ this.height = this.$el.getBoundingClientRect().height this.updateScroll() document.addEventListener('scroll', this.handleScroll) - document.addEventListener('resize', this.handleResize) + window.addEventListener('resize', this.handleResize) }, activated() { this.updateScroll() }, unmounted() { document.removeEventListener('scroll', this.handleScroll) - document.removeEventListener('resize', this.handleResize) + window.removeEventListener('resize', this.handleResize) }, methods: { sticky(top: number, position: any) { diff --git a/src/pages/post/[slug].vue b/src/pages/post/[slug].vue index f6d474cd..e3a993eb 100644 --- a/src/pages/post/[slug].vue +++ b/src/pages/post/[slug].vue @@ -241,15 +241,11 @@ export default defineComponent({ }) if (appStore.hexoConfig.writing.highlight.enable) { // eslint-disable-next-line no-console - console.error( - '[Aurora Config Error]: Please turn off [Hightlightjs] and enable [Prismjs] instead. ' - ) + console.warn('[Aurora Config Error]: Please turn off [Hightlightjs].') } - if (appStore.hexoConfig.writing.prismjs.preprocess) { + if (appStore.hexoConfig.writing.prismjs.enable) { // eslint-disable-next-line no-console - console.error( - "[Aurora Config Error]: Please set Hexo config's prismjs' [preprocess] property to false! " - ) + console.warn('[Aurora Config Error]: Please turn off [prismjs]. ') } await nextTick() initializeLightBox()