Skip to content

Commit

Permalink
fix: v-clicks counter, close #104
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed May 14, 2021
1 parent 5a7e73e commit 122f96b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/slidev/node/plugins/loaders.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { isString, notNullish, objectMap, range, slash } from '@antfu/utils'
import type { Connect } from 'vite'
import fg from 'fast-glob'
import Markdown from 'markdown-it'
import { RouteMeta } from 'vue-router'
// @ts-expect-error
import mila from 'markdown-it-link-attributes'
import { SlideInfo, SlideInfoExtended, SlidevMarkdown } from '@slidev/types'
Expand Down Expand Up @@ -352,7 +353,7 @@ export function createSlidesLoader(
if (i.frontmatter?.disabled)
return undefined
imports.push(`import n${no} from '${slidePrefix}${idx + 1}.md'`)
const additions = {
const additions: RouteMeta = {
slide: {
start: i.start,
end: i.end,
Expand All @@ -361,8 +362,8 @@ export function createSlidesLoader(
id: idx,
no,
},
clicksElements: [],
loaded: false,
__clicksElements: [],
__preloaded: false,
}
const meta = Object.assign({}, i.frontmatter, additions)
const route = `{ path: '${no}', name: 'page-${no}', component: n${no}, meta: ${JSON.stringify(meta)} }`
Expand Down

0 comments on commit 122f96b

Please sign in to comment.