mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-09-06 16:16:42 +08:00
fix 站点更新后刷新站点列表
This commit is contained in:
@@ -15,7 +15,7 @@ const cardProps = defineProps({
|
|||||||
})
|
})
|
||||||
|
|
||||||
// 定义触发的自定义事件
|
// 定义触发的自定义事件
|
||||||
const emit = defineEmits(['remove'])
|
const emit = defineEmits(['remove', 'update'])
|
||||||
|
|
||||||
// 密码输入
|
// 密码输入
|
||||||
const isPasswordVisible = ref(false)
|
const isPasswordVisible = ref(false)
|
||||||
@@ -204,10 +204,11 @@ async function updateSiteInfo() {
|
|||||||
siteInfoDialog.value = false
|
siteInfoDialog.value = false
|
||||||
|
|
||||||
const result: { [key: string]: any } = await api.put('site', siteForm)
|
const result: { [key: string]: any } = await api.put('site', siteForm)
|
||||||
if (result.success)
|
if (result.success) {
|
||||||
$toast.success(`${cardProps.site?.name} 更新成功!`)
|
$toast.success(`${cardProps.site?.name} 更新成功!`)
|
||||||
else
|
emit('update')
|
||||||
$toast.error(`${cardProps.site?.name} 更新失败:${result.message}`)
|
}
|
||||||
|
else { $toast.error(`${cardProps.site?.name} 更新失败:${result.message}`) }
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
$toast.error(`${cardProps.site?.name} 更新失败!`)
|
$toast.error(`${cardProps.site?.name} 更新失败!`)
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ onBeforeMount(fetchData)
|
|||||||
:key="data.id"
|
:key="data.id"
|
||||||
:site="data"
|
:site="data"
|
||||||
@remove="fetchData"
|
@remove="fetchData"
|
||||||
|
@update="fetchData"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<NoDataFound
|
<NoDataFound
|
||||||
|
|||||||
Reference in New Issue
Block a user