| | |
| | | }) |
| | | }, |
| | | clickDelSetTask(item) { |
| | | showModal("确认删除任务设置", "警告",true,"确定","取消").then((res) => { |
| | | showModal({ |
| | | title: this.translate('ask_confirm_delete'), |
| | | content: `${this.translate('history_task_will_be_retained')}`, |
| | | confirmText: this.translate('delete'), |
| | | cancelText: this.translate('cancel'), |
| | | }).then((res) => { |
| | | if (res) { |
| | | const list = this.setList |
| | | const index = list.findIndex((a) => { |
| | |
| | | [] |
| | | ] |
| | | this.deleteX[root][index] = old; // 重置偏移量 |
| | | } else |
| | | { |
| | | } else { |
| | | this.deleteX = [ |
| | | [], |
| | | [] |
| | | ] |
| | | this.deleteX[root][index] = 0; // 重置偏移量 |
| | | } |
| | | |
| | | |
| | | }, |
| | | touchMove(event, root, index) { |
| | | const moveX = event.touches[0].pageX - this.startX; |
| | | if (moveX < 0) { |
| | | this.deleteX[root][index] = moveX; // 左滑时更新偏移量 |
| | | } |
| | | else if (moveX > 0) { |
| | | this.deleteX[root][index] =0 |
| | | } else if (moveX > 0) { |
| | | this.deleteX[root][index] = 0 |
| | | } |
| | | }, |
| | | touchEnd(event, root, index) { |
| | |
| | | this.deleteX[root][index] = 0; // 否则恢复原位 |
| | | } |
| | | }, |
| | | |
| | | translate(t) { |
| | | if (typeof this.$t == "function") return this.$t(`page.${t}`) |
| | | else return t; |
| | | }, |
| | | |
| | | } |
| | | } |