Discover: sidebarFilter Sequence Sequence fix dblclick no need to hide arrow. Update v0.99.1

This commit is contained in:
chiayin
2023-06-14 12:56:09 +08:00
parent 79ab329d87
commit 07b35fcce0

View File

@@ -74,15 +74,16 @@ export default {
data() { data() {
return { return {
listSequence: this.listSeq, listSequence: this.listSeq,
data: this.filterTaskData, filteredData: this.filterTaskData,
lastItemIndex: null, lastItemIndex: null,
isDragging: false,
} }
}, },
computed: { computed: {
data: function() { data: function() {
// TODO Activity List 的 dblclick, drag & drop 要改假刪除 // TODO Activity List 的 dblclick, drag & drop 要改假刪除
// Activity List 要排序 // Activity List 要排序
return this.data.sort((x, y) => y.occurrences - x.occurrences); return this.filteredData.sort((x, y) => y.occurrences - x.occurrences);
} }
}, },
watch: { watch: {
@@ -116,6 +117,7 @@ export default {
* Element dragging started * Element dragging started
*/ */
onStart(evt) { onStart(evt) {
this.isDragging = true;
// 隱藏拖曳元素原位置 // 隱藏拖曳元素原位置
const originalElement = evt.item; const originalElement = evt.item;
originalElement.style.display = 'none'; originalElement.style.display = 'none';
@@ -127,6 +129,7 @@ export default {
* Element dragging ended * Element dragging ended
*/ */
onEnd(evt) { onEnd(evt) {
this.isDragging = false;
// 顯示拖曳元素 // 顯示拖曳元素
const originalElement = evt.item; const originalElement = evt.item;
originalElement.style.display = ''; originalElement.style.display = '';
@@ -144,8 +147,9 @@ export default {
*/ */
onChoose(evt) { onChoose(evt) {
// 拖曳時要隱藏箭頭 // 拖曳時要隱藏箭頭
// isDragging: 只有拖曳才要隱藏dblclick 不用
const lastChild = evt.item.lastChild; const lastChild = evt.item.lastChild;
lastChild.style.display = 'none'; if (this.isDragging) lastChild.style.display = 'none';
} }
} }
} }