Discover: sidebarFilter Sequence Sequence add actList sort and add TODO. Update v0.99.1

This commit is contained in:
chiayin
2023-06-14 12:30:16 +08:00
parent 6083bb7988
commit 79ab329d87

View File

@@ -78,6 +78,13 @@ export default {
lastItemIndex: null, lastItemIndex: null,
} }
}, },
computed: {
data: function() {
// TODO Activity List 的 dblclick, drag & drop 要改假刪除
// Activity List 要排序
return this.data.sort((x, y) => y.occurrences - x.occurrences);
}
},
watch: { watch: {
listSeq(newval){ listSeq(newval){
this.listSequence = newval; this.listSequence = newval;
@@ -129,8 +136,6 @@ export default {
evt.oldIndex !== listIndex ? lastChild.style.display = '' : null; evt.oldIndex !== listIndex ? lastChild.style.display = '' : null;
// reset: 拖曳最後一個元素時,倒數第二的元素的箭頭要隱藏 // reset: 拖曳最後一個元素時,倒數第二的元素的箭頭要隱藏
this.lastItemIndex = null; this.lastItemIndex = null;
// Activity List 要排序
this.data.sort((x, y) => y.occurrences - x.occurrences);
this.$emit('update:listSeq', this.listSequence); this.$emit('update:listSeq', this.listSequence);
}, },