Skip to content

Commit 32c43a5

Browse files
authored
Merge pull request #428 from VividLemon/main
Various easy component errors fixes
2 parents 87aa9c1 + 6009f1d commit 32c43a5

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

src/components/BToast/BToast.vue

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ import {
1111
VNode,
1212
watch,
1313
} from 'vue'
14-
import {normalizeSlot} from '../../utils/normalize-slot'
15-
import {ColorVariant} from '../../types'
16-
import {toInteger} from '../../utils/number'
14+
import {normalizeSlot} from '@/utils/normalize-slot'
15+
import {ColorVariant} from '@/types'
16+
import {toInteger} from '@/utils/number'
1717
import BTransition from '../BTransition/BTransition.vue'
18-
import {requestAF} from '../../utils/dom'
18+
import {requestAF} from '@/utils/dom'
1919
import BButtonClose from '../BButton/BCloseButton.vue'
20-
import {isLink} from '../../utils/router'
20+
import {isLink} from '@/utils/router'
2121
import {BLINK_PROPS} from '../BLink/BLink.vue'
2222
import {BodyProp} from './plugin'
2323
@@ -59,11 +59,12 @@ export default defineComponent({
5959
show: localShow.value || isTransitioning.value,
6060
}))
6161
62-
let dismissTimer: number | undefined
62+
let dismissTimer: ReturnType<typeof setTimeout> | undefined
6363
let dismissStarted: number
6464
let resumeDismiss: number
6565
6666
const clearDismissTimer = () => {
67+
if (dismissTimer === undefined) return
6768
clearTimeout(dismissTimer)
6869
dismissTimer = undefined
6970
}

src/components/BToast/BToaster.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<div :class="[positionClass]" class="b-toaster position-fixed p-3" style="z-index: 11">
33
<b-toast
4-
v-for="toast in instance.toasts(position).value"
4+
v-for="toast in instance?.toasts(position).value"
55
:id="toast.options.id"
66
:key="toast.options.id"
77
v-model="toast.options.value"
@@ -23,7 +23,7 @@ import type {ToastInstance} from '@/components/BToast/plugin'
2323
2424
interface BToasterProps {
2525
position?: ContainerPosition
26-
instance: ToastInstance
26+
instance?: ToastInstance
2727
// appendToast?: boolean
2828
}
2929

src/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const routes = [
3232
name: 'About',
3333
props: {id: [Number, String]},
3434
render() {
35-
return h('h1', {}, `About page ${this.id}`)
35+
return h('h1', {}, `About page ${this.props.id}`)
3636
},
3737
},
3838
props: true,

0 commit comments

Comments
 (0)