Skip to content

Commit

Permalink
chore(example): update prismjs highlight init
Browse files Browse the repository at this point in the history
  • Loading branch information
wenqing committed Oct 17, 2023
1 parent b90dae1 commit 034994b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions lib/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ interface TrickleIncrementalCurveRecord {

type TrickleIncrementalCurveFunc = (
currentStatus: number
) => TrickleIncrementalCurveRecord[]
) => TrickleIncrementalCurveRecord[] | number

interface TricklingOptions {
speed?: number
Expand Down Expand Up @@ -40,7 +40,6 @@ interface TricklingOptions {
trickleIncrementalCurve?:
| TrickleIncrementalCurveFunc
| TrickleIncrementalCurveRecord[]
| number
}

interface TricklingInstance {
Expand Down
4 changes: 2 additions & 2 deletions src/views/HomeView/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,7 @@
</template>

<script lang="ts" setup>
import 'prismjs'
import prismjs from 'prismjs'
import { onMounted, ref } from 'vue'
import type { TricklingOptions } from '@/lib/interfaces/core'
import { createTrickling } from '@/lib/main'
Expand Down Expand Up @@ -192,6 +191,7 @@ const handleDone = () => {
}
onMounted(() => {
prismjs.highlightAll()
handleOptionsChange()
})
</script>
Expand Down

0 comments on commit 034994b

Please sign in to comment.