feat: reset media form fields when modal is shown in MediaFormModal component
This commit is contained in:
@@ -12,7 +12,19 @@
|
|||||||
platform: '',
|
platform: '',
|
||||||
notes: ''
|
notes: ''
|
||||||
});
|
});
|
||||||
|
$effect(() => {
|
||||||
|
if (show) {
|
||||||
|
media = {
|
||||||
|
title: '',
|
||||||
|
type: '',
|
||||||
|
status: 'plan_to_watch',
|
||||||
|
date: '',
|
||||||
|
rating: 0,
|
||||||
|
platform: '',
|
||||||
|
notes: ''
|
||||||
|
};
|
||||||
|
}
|
||||||
|
});
|
||||||
const statusOptions = [
|
const statusOptions = [
|
||||||
{ value: 'plan_to_watch', label: '计划中' },
|
{ value: 'plan_to_watch', label: '计划中' },
|
||||||
{ value: 'in_progress', label: '进行中' },
|
{ value: 'in_progress', label: '进行中' },
|
||||||
|
|||||||
Reference in New Issue
Block a user