Skip to content

Commit 26411e9

Browse files
committed
chore: rename 'AsyncMarkdownContentLoaded' to 'AsyncMarkdownContentMounted'
1 parent 216d04a commit 26411e9

File tree

4 files changed

+8
-3
lines changed

4 files changed

+8
-3
lines changed

packages/@vuepress/core/lib/prepare/Page.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ module.exports = class Page {
6868
async process ({
6969
computed,
7070
markdown,
71-
enhancers = []
71+
enhancers = [],
72+
preRender = {}
7273
}) {
7374
if (this._filePath) {
7475
this._content = await fs.readFile(this._filePath, 'utf-8')

packages/@vuepress/markdown-loader/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ module.exports = function (src) {
107107
props: ['slot-key'],
108108
mounted() {
109109
this.$nextTick(function () {
110-
this.$vuepress.$emit('AsyncMarkdownContentLoaded', this.slotKey)
110+
this.$vuepress.$emit('AsyncMarkdownContentMounted', this.slotKey)
111111
})
112112
}
113113
}

packages/@vuepress/plugin-active-header-links/mixin.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ function getAnchors () {
4343

4444
export default {
4545
mounted () {
46-
this.$vuepress.$on('AsyncMarkdownContentLoaded', (slotKey) => {
46+
this.$vuepress.$on('AsyncMarkdownContentMounted', (slotKey) => {
47+
console.warn('AsyncMarkdownContentMounted')
4748
if (slotKey === 'default') {
4849
window.addEventListener('scroll', this.onScroll)
4950
}

packages/@vuepress/theme-default/components/Page.vue

+3
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ import { resolvePage, normalize, outboundRE, endingSlashRE } from '../util'
6767
export default {
6868
props: ['sidebarItems'],
6969
70+
data () {
71+
},
72+
7073
computed: {
7174
lastUpdated () {
7275
if (this.$page.lastUpdated) {

0 commit comments

Comments
 (0)