mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-09-05 07:28:37 +08:00
feat: 修改任务执行成功提示信息,增加延迟刷新
This commit is contained in:
@@ -114,9 +114,12 @@ async function handlePause(item: Workflow) {
|
|||||||
async function handleRun(item: Workflow) {
|
async function handleRun(item: Workflow) {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
try {
|
try {
|
||||||
|
setTimeout(() => {
|
||||||
|
emit('refresh')
|
||||||
|
}, 500)
|
||||||
const result: { [key: string]: string } = await api.post(`workflow/${item.id}/run`)
|
const result: { [key: string]: string } = await api.post(`workflow/${item.id}/run`)
|
||||||
if (result.success) {
|
if (result.success) {
|
||||||
$toast.success('任务执行成功!')
|
$toast.success('任务执行完成!')
|
||||||
emit('refresh')
|
emit('refresh')
|
||||||
} else {
|
} else {
|
||||||
$toast.error(`任务执行失败:${result.message}`)
|
$toast.error(`任务执行失败:${result.message}`)
|
||||||
|
|||||||
Reference in New Issue
Block a user