编辑界面优化

This commit is contained in:
DelLevin-Home
2026-05-22 12:15:43 +08:00
parent 8f51a06c56
commit 6b5488aff8
13 changed files with 1446 additions and 1538 deletions

View File

@@ -446,10 +446,11 @@ class _MovieFormPageState extends State<MovieFormPage> {
height: 90,
child: _buildInfoCard(
label: '别名',
value: _alternateTitles.isEmpty
? ''
value: _alternateTitles.isEmpty
? ''
: '${_alternateTitles.length}个:${_alternateTitles.join('')}',
icon: Icons.alternate_email_outlined,
scrollHorizontal: true,
onTap: () => _showMultiValueDialog(
title: '添加别名',
initialValues: _alternateTitles,
@@ -594,9 +595,10 @@ class _MovieFormPageState extends State<MovieFormPage> {
IconData? icon,
double? height,
bool scrollable = false,
bool scrollHorizontal = false,
}) {
final hasValue = value.isNotEmpty;
// 构建值显示部分
Widget buildContent() {
if (scrollable && height != null) {
@@ -614,6 +616,20 @@ class _MovieFormPageState extends State<MovieFormPage> {
),
),
);
} else if (scrollHorizontal) {
// 水平可滚动模式(别名等长文本使用)
return SingleChildScrollView(
scrollDirection: Axis.horizontal,
physics: const BouncingScrollPhysics(),
child: Text(
hasValue ? value : '点击填写',
style: TextStyle(
fontSize: 15,
color: hasValue ? const Color(0xFF1A1A1A) : const Color(0xFFCCCCCC),
fontWeight: hasValue ? FontWeight.w500 : FontWeight.normal,
),
),
);
} else {
// 普通模式:只显示一行
return Text(