老师好,书签列表组件发现bug
来源:6-7 书签功能实现
慕设计2052786
2019-01-25
问题描述:添加或删除书签后,点击目录面板,书签数量及书签列表无法立即更新,需再次点击书签tab后才会更新数据。
写回答
2回答
-
慕设计2052786
提问者
2019-01-28
每次点击书签tab后才更新数据
00 -
慕设计2052786
提问者
2019-01-25
<template> <div class="ebook-slide-bookmark"> <div class="slide-bookmark-title"> {{$t('book.bookmark')}} · {{bookmark ? bookmark.length : 0}} </div> <scroll class="slide-bookmark-list" :top="48" :bottom="48"> <div class="slide-bookmark-item" v-for="(item, index) in bookmark" :key="index" @click="displayBookmark(item.cfi)"> <div class="slide-bookmark-item-icon"> <div class="icon-bookmark"></div> </div> <div class="slide-bookmark-item-text">{{item.text}}</div> </div> </scroll> </div> </template> <script type="text/ecmascript-6"> import Scroll from '../common/Scroll' import { getBookmark } from '../../utils/localStorage' import { ebookMixin } from '../../utils/mixin' export default { mixins: [ebookMixin], components: { Scroll }, data() { return { bookmark: null } }, methods: { displayBookmark(target) { this.display(target, () => { this.hideTitleAndMenu() }) } }, mounted() { this.bookmark = getBookmark(this.fileName) } } </script>
EbookSlideBookmark.vue html及js部分的代码
062020-04-11
相似问题