Skip to content

Commit

Permalink
fix: unable to load nodes in spider detail page
Browse files Browse the repository at this point in the history
  • Loading branch information
tikazyq committed Jul 2, 2023
1 parent f29f9b0 commit 9d426f8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/utils/task.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const getModeOptions = (): SelectOption[] => {
{value: TASK_MODE_RANDOM, label: t('components.task.mode.label.randomNode')},
{value: TASK_MODE_ALL_NODES, label: t('components.task.mode.label.allNodes')},
{value: TASK_MODE_SELECTED_NODES, label: t('components.task.mode.label.selectedNodes')},
{value: TASK_MODE_SELECTED_NODE_TAGS, label: t('components.task.mode.label.selectedTags')},
// {value: TASK_MODE_SELECTED_NODE_TAGS, label: t('components.task.mode.label.selectedTags')},
];
};

Expand Down
4 changes: 3 additions & 1 deletion src/views/spider/detail/useSpiderDetail.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {watch, computed, ref} from 'vue';
import {watch, computed, ref, onBeforeMount, onMounted} from 'vue';
import {useStore} from 'vuex';
import useSpiderService from '@/services/spider/spiderService';
import {useRoute, useRouter} from 'vue-router';
Expand Down Expand Up @@ -155,6 +155,8 @@ const useSpiderDetail = () => {
}
});

onBeforeMount(() => store.dispatch(`node/getAllList`));

return {
...useDetail('spider'),
saveFile,
Expand Down

0 comments on commit 9d426f8

Please sign in to comment.