refactor(utils.ts): add parameter arg0 to addWatcher callback for improved readability

This commit is contained in:
Sped0n
2023-11-02 12:27:58 +08:00
parent 8b48cceb8f
commit dd01dd8bec
5 changed files with 14 additions and 14 deletions

View File

@@ -93,8 +93,8 @@ export function initGallery(ijs: ImageJSON[]): void {
lastIndex = s.index
})
// mounted watcher
mounted.addWatcher(() => {
if (!mounted.get()) return
mounted.addWatcher((o) => {
if (!o) return
scrollable.set(true)
swiper = new Swiper(swiperNode, { spaceBetween: 20 })
swiper.on('slideChange', ({ realIndex }) => {