Skip to content

Commit

Permalink
refactor: prevents the button from being located when the task leads …
Browse files Browse the repository at this point in the history
…to the monitor
  • Loading branch information
cn-xufei committed Jan 10, 2024
1 parent 3ac03d9 commit bfe2437
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions apps/dfs/src/mixins/tour.js
Original file line number Diff line number Diff line change
Expand Up @@ -598,13 +598,15 @@ export default {
if (!this.$store.state.replicationConnectionDialog) {
this.$nextTick(() => {
// 判断任务的监控按钮是否渲染
if (this.replicationTour.activeIndex === 3 && !document.getElementById(taskMonitorId)) {
let index = this.replicationTour.activeIndex
if (this.replicationTour.behavior === 'add-task') index = 3
if (index === 3 && !document.querySelector(taskMonitorId)) {
// 如果没有渲染,监听任务列表的加载时间
const unwatch = this.$watch('$store.state.taskLoadedTime', () => {
this.$nextTick(() => {
if (document.getElementById(taskMonitorId)) {
if (document.querySelector(taskMonitorId)) {
unwatch()
this.replicationDriverObj.drive(this.replicationTour.activeIndex || 0)
this.replicationDriverObj.drive(index)
}
})
})
Expand Down

0 comments on commit bfe2437

Please sign in to comment.