Skip to content

Commit

Permalink
Merge branch 'master' of github.com:zhuowenli/githuber
Browse files Browse the repository at this point in the history
  • Loading branch information
zhuowenli committed Apr 22, 2018
2 parents 7aee4c1 + 7de7363 commit 89d63cd
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/views/components/bookmark.sass
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
cursor: pointer
border-bottom: 1px solid #f2f2f2
transition: all .3s ease
user-select: none
&:last-child
border-bottom: 0
.logo
Expand Down
11 changes: 8 additions & 3 deletions src/views/components/bookmark.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
:options="dragOptions"
)
.bookmark__item(
@contextmenu="toggleEditAction"
v-for="(item, inx) in bookmarks"
:key="inx"
@click="onLinkTapAction(item)"
@dblclick="onEditAction(item)"
@contextmenu="onContextMenuAction($event, item)"
:class="{edit: edit}"
)
.el-icon-close(@click.stop="onRemoveAction(item)")
Expand All @@ -22,7 +22,7 @@
.text.shake-constant(v-else) {{item.name[0]}}
.name
span {{item.name}}
.bookmark__item(@click="edit = false" v-if="edit")
.bookmark__item(@click="toggleEditAction" v-if="edit")
.el-icon-check
.bookmark__item(@click="onAddAction" v-else)
.el-icon-plus
Expand All @@ -46,6 +46,11 @@ export default {
async mounted() {
this.init();
},
watch: {
bookmarks() {
this.$refs.scrollView.refresh();
}
},
computed: {
...mapGetters('bookmark', ['bookmarks']),
bookmarkLists: {
Expand All @@ -68,7 +73,7 @@ export default {
this.$emit('tap', item.url);
}
},
onContextMenuAction(e) {
toggleEditAction(e) {
e.preventDefault();
this.edit = !this.edit;
if (this.edit) {
Expand Down
2 changes: 1 addition & 1 deletion src/views/components/setting.vue
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export default {
});
}
};
reader.readAsBinaryString(file);
reader.readAsText(file);
}
},
watch: {
Expand Down

0 comments on commit 89d63cd

Please sign in to comment.