From 79ab329d8764cd0fe36ce90677cebd170450c020 Mon Sep 17 00:00:00 2001 From: chiayin Date: Wed, 14 Jun 2023 12:30:16 +0800 Subject: [PATCH] Discover: sidebarFilter Sequence Sequence add actList sort and add TODO. Update v0.99.1 --- src/components/Discover/Filter/ActAndSeq.vue | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/components/Discover/Filter/ActAndSeq.vue b/src/components/Discover/Filter/ActAndSeq.vue index abed043..14599d8 100644 --- a/src/components/Discover/Filter/ActAndSeq.vue +++ b/src/components/Discover/Filter/ActAndSeq.vue @@ -78,6 +78,13 @@ export default { lastItemIndex: null, } }, + computed: { + data: function() { + // TODO Activity List 的 dblclick, drag & drop 要改假刪除 + // Activity List 要排序 + return this.data.sort((x, y) => y.occurrences - x.occurrences); + } + }, watch: { listSeq(newval){ this.listSequence = newval; @@ -129,8 +136,6 @@ export default { evt.oldIndex !== listIndex ? lastChild.style.display = '' : null; // reset: 拖曳最後一個元素時,倒數第二的元素的箭頭要隱藏 this.lastItemIndex = null; - // Activity List 要排序 - this.data.sort((x, y) => y.occurrences - x.occurrences); this.$emit('update:listSeq', this.listSequence); },