feat: reset media form fields when modal is shown in MediaFormModal component

This commit is contained in:
ethan.chen
2025-05-26 18:32:42 +08:00
parent 30908806e4
commit 1cd891833c

View File

@@ -12,7 +12,19 @@
platform: '',
notes: ''
});
$effect(() => {
if (show) {
media = {
title: '',
type: '',
status: 'plan_to_watch',
date: '',
rating: 0,
platform: '',
notes: ''
};
}
});
const statusOptions = [
{ value: 'plan_to_watch', label: '计划中' },
{ value: 'in_progress', label: '进行中' },