Skip to content

Commit

Permalink
add examples/show.gif
Browse files Browse the repository at this point in the history
  • Loading branch information
hqweay committed Jun 7, 2019
1 parent 80b5a59 commit bd87189
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 7 deletions.
Binary file added examples/show.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions src/renderer/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ export default {
},
created: function() {},
methods: {
flush() {
this.$router.go(0);
}
// flush() {
// this.$router.go(0);
// }
}
};
</script>
Expand Down
6 changes: 6 additions & 0 deletions src/renderer/views/item/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,12 @@ export default {
this.items = getItems();
}
},
watch: {
// 重新点击 条目 后,显示所有条目
$route(to, from) {
this.items = getItems();
}
},
methods: {
notify(message) {
const h = this.$createElement;
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/views/template/index.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div class="template">
<ul class="item-list">
<li class="item" @click="addTemplate()">
<li v-if="!addItem" class="item" @click="addTemplate()">
<div class="container">
<div class="card">
<ul class="item-attr">
Expand Down
6 changes: 3 additions & 3 deletions src/shared/db/mapper/itemMapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ export function getItemsByTemplateName(temName) {
export function getItemsByTagName(tagName) {
// 我可太他妈聪明了
return db.read().get('item').filter(function (o) {
console.log(tagName);
// console.log(tagName);
if (o.tag_name.indexOf(tagName) !== -1) {
console.log("true");
// console.log("true");
return true;
} else {
console.log("false");
// console.log("false");
return false;
}
}).value();
Expand Down

0 comments on commit bd87189

Please sign in to comment.