v2版本的首页界面开发
This commit is contained in:
@@ -56,6 +56,11 @@ import '../../features/remote_control/data/datasources/remote_http_datasource.da
|
|||||||
import '../../features/remote_control/data/datasources/remote_tcp_datasource.dart';
|
import '../../features/remote_control/data/datasources/remote_tcp_datasource.dart';
|
||||||
import '../../features/remote_control/domain/usecase/remote_control_usecase.dart';
|
import '../../features/remote_control/domain/usecase/remote_control_usecase.dart';
|
||||||
import '../../features/remote_control/presentation/bloc/remote_control_cubit.dart';
|
import '../../features/remote_control/presentation/bloc/remote_control_cubit.dart';
|
||||||
|
import '../../features/v2/home/data/datasources/home_remote_datasource.dart';
|
||||||
|
import '../../features/v2/home/data/repositories/home_repository_impl.dart';
|
||||||
|
import '../../features/v2/home/domain/repositories/home_repository.dart';
|
||||||
|
import '../../features/v2/home/domain/usecases/get_home_data_usecase.dart';
|
||||||
|
import '../../features/v2/home/presentation/bloc/home_v2_bloc.dart';
|
||||||
import '../app/app_user_cubit.dart';
|
import '../app/app_user_cubit.dart';
|
||||||
import '../localization/locale_cubit.dart';
|
import '../localization/locale_cubit.dart';
|
||||||
import '../../features/home/presentation/bloc/permission_request_bloc.dart';
|
import '../../features/home/presentation/bloc/permission_request_bloc.dart';
|
||||||
@@ -183,6 +188,12 @@ Future<void> init() async {
|
|||||||
|
|
||||||
sl.registerLazySingleton<RequestControlPermissionUseCase>(() => RequestControlPermissionUseCase(sl()));
|
sl.registerLazySingleton<RequestControlPermissionUseCase>(() => RequestControlPermissionUseCase(sl()));
|
||||||
|
|
||||||
|
/// Home V2
|
||||||
|
sl.registerLazySingleton<HomeRemoteDataSource>(() => HomeRemoteDataSourceImpl());
|
||||||
|
sl.registerLazySingleton<HomeRepository>(() => HomeRepositoryImpl(sl()));
|
||||||
|
sl.registerLazySingleton<GetHomeDataUseCase>(() => GetHomeDataUseCase(sl()));
|
||||||
|
sl.registerFactory<HomeV2Bloc>(() => HomeV2Bloc(sl()));
|
||||||
|
|
||||||
|
|
||||||
/// 5. 状态管理 (Cubit/Bloc)
|
/// 5. 状态管理 (Cubit/Bloc)
|
||||||
sl.registerLazySingleton(() => AppUserCubit()); // AuthCubit 依赖它,必须先注册
|
sl.registerLazySingleton(() => AppUserCubit()); // AuthCubit 依赖它,必须先注册
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ import 'package:maibu_satabot_v2/features/auth/presentation/pages/login_page.dar
|
|||||||
import 'package:maibu_satabot_v2/features/auth/presentation/routes/auth_routes.dart';
|
import 'package:maibu_satabot_v2/features/auth/presentation/routes/auth_routes.dart';
|
||||||
import 'package:maibu_satabot_v2/features/devices/domain/entities/device_entity.dart';
|
import 'package:maibu_satabot_v2/features/devices/domain/entities/device_entity.dart';
|
||||||
import 'package:maibu_satabot_v2/features/home/presentation/routes/home_routes.dart';
|
import 'package:maibu_satabot_v2/features/home/presentation/routes/home_routes.dart';
|
||||||
|
import 'package:maibu_satabot_v2/features/main_container/presentation/pages/tab_settings_page.dart';
|
||||||
import 'package:maibu_satabot_v2/features/my/presentation/routes/my_routes.dart';
|
import 'package:maibu_satabot_v2/features/my/presentation/routes/my_routes.dart';
|
||||||
import 'package:maibu_satabot_v2/features/my/presentation/routes/settings_routes.dart';
|
|
||||||
import 'package:maibu_satabot_v2/features/waring_center/presentation/routes/warning_center_routes.dart';
|
import 'package:maibu_satabot_v2/features/waring_center/presentation/routes/warning_center_routes.dart';
|
||||||
|
|
||||||
import '../../features/auth/presentation/bloc/auth_cubit.dart';
|
import '../../features/auth/presentation/bloc/auth_cubit.dart';
|
||||||
@@ -48,13 +48,18 @@ GoRouter createRouter(AuthCubit authCubit) {
|
|||||||
GoRoute(
|
GoRoute(
|
||||||
path: RoutePaths.home,
|
path: RoutePaths.home,
|
||||||
builder: (context, state) => const MainWrapper(),
|
builder: (context, state) => const MainWrapper(),
|
||||||
|
routes: [
|
||||||
|
GoRoute(
|
||||||
|
path: 'settings',
|
||||||
|
builder: (context, state) => const TabSettingsPage(),
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
|
|
||||||
...AuthRoutes.routes,
|
...AuthRoutes.routes,
|
||||||
...HomeRoutes.routes,
|
...HomeRoutes.routes,
|
||||||
...AiRoutes.routes,
|
...AiRoutes.routes,
|
||||||
...MyRoutes.routes,
|
...MyRoutes.routes,
|
||||||
...SettingsRoutes.routes,
|
|
||||||
...WarningCenterRoutes.routes,
|
...WarningCenterRoutes.routes,
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
// lib/features/devices/domain/entities/running_status_entity.dart
|
// lib/features/devices/domain/entities/running_status_entity.dart
|
||||||
|
|
||||||
import 'package:equatable/equatable.dart';
|
import 'package:equatable/equatable.dart';
|
||||||
|
import 'package:get_it/get_it.dart';
|
||||||
|
|
||||||
|
import '../../../../core/logging/i_logger_service.dart';
|
||||||
|
|
||||||
class RunningStatusEntity extends Equatable {
|
class RunningStatusEntity extends Equatable {
|
||||||
// === 基础电气信息 (字段 0-6) ===
|
// === 基础电气信息 (字段 0-6) ===
|
||||||
@@ -68,6 +71,31 @@ class RunningStatusEntity extends Equatable {
|
|||||||
|
|
||||||
/// 从字段数组创建实体 (核心解析方法)
|
/// 从字段数组创建实体 (核心解析方法)
|
||||||
factory RunningStatusEntity.fromFields(List<String> fields) {
|
factory RunningStatusEntity.fromFields(List<String> fields) {
|
||||||
|
final logger = GetIt.I<ILoggerService>();
|
||||||
|
logger.logWithLevel(
|
||||||
|
'字段总数: ${fields.length}',
|
||||||
|
level: 'DEBUG',
|
||||||
|
shouldLog: true,
|
||||||
|
);
|
||||||
|
|
||||||
|
if (fields.length > 14) {
|
||||||
|
logger.logWithLevel(
|
||||||
|
'qual原始值(fields[14]): "${fields[14]}"',
|
||||||
|
level: 'DEBUG',
|
||||||
|
shouldLog: true,
|
||||||
|
);
|
||||||
|
logger.logWithLevel(
|
||||||
|
'satelliteCnt(fields[13]): "${fields[13]}"',
|
||||||
|
level: 'DEBUG',
|
||||||
|
shouldLog: true,
|
||||||
|
);
|
||||||
|
logger.logWithLevel(
|
||||||
|
'headingStatus(fields[15]): "${fields[15]}"',
|
||||||
|
level: 'DEBUG',
|
||||||
|
shouldLog: true,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
// 确保至少有 24 个字段,不足的用默认值填充
|
// 确保至少有 24 个字段,不足的用默认值填充
|
||||||
while (fields.length < 24) {
|
while (fields.length < 24) {
|
||||||
fields.add('');
|
fields.add('');
|
||||||
|
|||||||
@@ -78,13 +78,21 @@ class TabConfig extends Equatable {
|
|||||||
static TabConfig defaultConfig() {
|
static TabConfig defaultConfig() {
|
||||||
return const TabConfig(
|
return const TabConfig(
|
||||||
items: [
|
items: [
|
||||||
|
TabConfigItem(
|
||||||
|
id: 'home_v2',
|
||||||
|
name: '首页V2',
|
||||||
|
nameEn: 'Home V2',
|
||||||
|
icon: 'home_rounded',
|
||||||
|
isEnabled: false,
|
||||||
|
order: 1,
|
||||||
|
),
|
||||||
TabConfigItem(
|
TabConfigItem(
|
||||||
id: 'home',
|
id: 'home',
|
||||||
name: '状态',
|
name: '状态',
|
||||||
nameEn: 'Status',
|
nameEn: 'Status',
|
||||||
icon: 'grid_view_rounded',
|
icon: 'grid_view_rounded',
|
||||||
isEnabled: true,
|
isEnabled: true,
|
||||||
order: 1,
|
order: 2,
|
||||||
),
|
),
|
||||||
TabConfigItem(
|
TabConfigItem(
|
||||||
id: 'ai',
|
id: 'ai',
|
||||||
@@ -92,15 +100,15 @@ class TabConfig extends Equatable {
|
|||||||
nameEn: 'AI',
|
nameEn: 'AI',
|
||||||
icon: 'auto_awesome_rounded',
|
icon: 'auto_awesome_rounded',
|
||||||
isEnabled: true,
|
isEnabled: true,
|
||||||
order: 2,
|
order: 3,
|
||||||
),
|
),
|
||||||
TabConfigItem(
|
TabConfigItem(
|
||||||
id: 'warning',
|
id: 'warning',
|
||||||
name: '告警中心',
|
name: '告警',
|
||||||
nameEn: 'Alerts',
|
nameEn: 'Alerts',
|
||||||
icon: 'warning_amber_rounded',
|
icon: 'warning_amber_rounded',
|
||||||
isEnabled: true,
|
isEnabled: true,
|
||||||
order: 3,
|
order: 4,
|
||||||
),
|
),
|
||||||
TabConfigItem(
|
TabConfigItem(
|
||||||
id: 'my',
|
id: 'my',
|
||||||
@@ -108,7 +116,7 @@ class TabConfig extends Equatable {
|
|||||||
nameEn: 'Profile',
|
nameEn: 'Profile',
|
||||||
icon: 'person_rounded',
|
icon: 'person_rounded',
|
||||||
isEnabled: true,
|
isEnabled: true,
|
||||||
order: 4,
|
order: 5,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -78,6 +78,12 @@ class TabConfigCubit extends Cubit<TabConfigState> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void resetToDefault() {
|
||||||
|
final defaultConfig = TabConfig.defaultConfig();
|
||||||
|
_saveConfig(defaultConfig);
|
||||||
|
emit(TabConfigLoaded(defaultConfig));
|
||||||
|
}
|
||||||
|
|
||||||
TabConfig? getConfig() {
|
TabConfig? getConfig() {
|
||||||
if (state is TabConfigLoaded) {
|
if (state is TabConfigLoaded) {
|
||||||
return (state as TabConfigLoaded).config;
|
return (state as TabConfigLoaded).config;
|
||||||
|
|||||||
@@ -1,13 +1,14 @@
|
|||||||
import 'dart:ui';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
import 'package:google_nav_bar/google_nav_bar.dart';
|
|
||||||
import 'package:maibu_satabot_v2/features/main_container/presentation/cubit/tab_config_cubit.dart';
|
import 'package:maibu_satabot_v2/features/main_container/presentation/cubit/tab_config_cubit.dart';
|
||||||
import 'package:maibu_satabot_v2/features/main_container/domain/tab_config.dart';
|
import 'package:maibu_satabot_v2/features/main_container/domain/tab_config.dart';
|
||||||
import 'package:maibu_satabot_v2/features/home/presentation/pages/home_page.dart';
|
import 'package:maibu_satabot_v2/features/home/presentation/pages/home_page.dart';
|
||||||
|
import 'package:maibu_satabot_v2/features/v2/home/presentation/pages/home_v2_page.dart';
|
||||||
|
import 'package:maibu_satabot_v2/features/v2/home/presentation/bloc/home_v2_bloc.dart';
|
||||||
import 'package:maibu_satabot_v2/features/ai/presentation/pages/ai_page.dart';
|
import 'package:maibu_satabot_v2/features/ai/presentation/pages/ai_page.dart';
|
||||||
import 'package:maibu_satabot_v2/features/waring_center/presentation/pages/warning_center_page.dart';
|
import 'package:maibu_satabot_v2/features/waring_center/presentation/pages/warning_center_page.dart';
|
||||||
import 'package:maibu_satabot_v2/features/my/presentation/pages/my_page.dart';
|
import 'package:maibu_satabot_v2/features/my/presentation/pages/my_page.dart';
|
||||||
|
import 'package:maibu_satabot_v2/core/di/injection.dart';
|
||||||
|
|
||||||
class MainWrapper extends StatefulWidget {
|
class MainWrapper extends StatefulWidget {
|
||||||
const MainWrapper({super.key});
|
const MainWrapper({super.key});
|
||||||
@@ -28,6 +29,8 @@ class _MainWrapperState extends State<MainWrapper> {
|
|||||||
|
|
||||||
IconData _getIconData(String iconName) {
|
IconData _getIconData(String iconName) {
|
||||||
switch (iconName) {
|
switch (iconName) {
|
||||||
|
case 'home_rounded':
|
||||||
|
return Icons.home_rounded;
|
||||||
case 'grid_view_rounded':
|
case 'grid_view_rounded':
|
||||||
return Icons.grid_view_rounded;
|
return Icons.grid_view_rounded;
|
||||||
case 'auto_awesome_rounded':
|
case 'auto_awesome_rounded':
|
||||||
@@ -43,6 +46,11 @@ class _MainWrapperState extends State<MainWrapper> {
|
|||||||
|
|
||||||
Widget _buildCurrentPage(TabConfigItem tab) {
|
Widget _buildCurrentPage(TabConfigItem tab) {
|
||||||
switch (tab.id) {
|
switch (tab.id) {
|
||||||
|
case 'home_v2':
|
||||||
|
return BlocProvider(
|
||||||
|
create: (context) => sl<HomeV2Bloc>(),
|
||||||
|
child: const HomeV2Page(),
|
||||||
|
);
|
||||||
case 'home':
|
case 'home':
|
||||||
return const HomePage();
|
return const HomePage();
|
||||||
case 'ai':
|
case 'ai':
|
||||||
@@ -92,67 +100,57 @@ class _MainWrapperState extends State<MainWrapper> {
|
|||||||
children: enabledItems.map((tab) => _buildCurrentPage(tab)).toList(),
|
children: enabledItems.map((tab) => _buildCurrentPage(tab)).toList(),
|
||||||
),
|
),
|
||||||
bottomNavigationBar: Container(
|
bottomNavigationBar: Container(
|
||||||
margin: const EdgeInsets.fromLTRB(20, 0, 20, 10),
|
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.circular(32),
|
color: Colors.white,
|
||||||
boxShadow: [
|
boxShadow: [
|
||||||
BoxShadow(
|
BoxShadow(
|
||||||
color: Colors.black.withOpacity(0.12),
|
color: Colors.black.withOpacity(0.08),
|
||||||
blurRadius: 30,
|
blurRadius: 10,
|
||||||
offset: const Offset(0, 10),
|
offset: const Offset(0, -2),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
child: ClipRRect(
|
child: SafeArea(
|
||||||
borderRadius: BorderRadius.circular(32),
|
top: false,
|
||||||
child: BackdropFilter(
|
child: Row(
|
||||||
filter: ImageFilter.blur(sigmaX: 16, sigmaY: 16),
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||||
child: Container(
|
children: enabledItems.asMap().entries.map((entry) {
|
||||||
decoration: BoxDecoration(
|
final index = entry.key;
|
||||||
color: Colors.white.withOpacity(0.4),
|
final item = entry.value;
|
||||||
borderRadius: BorderRadius.circular(32),
|
final isSelected = _currentIndex == index;
|
||||||
border: Border.all(
|
|
||||||
color: Colors.black.withOpacity(0.08),
|
return Expanded(
|
||||||
width: 0.5,
|
child: InkWell(
|
||||||
),
|
onTap: () {
|
||||||
),
|
setState(() {
|
||||||
child: SafeArea(
|
_currentIndex = index;
|
||||||
top: false,
|
});
|
||||||
child: Padding(
|
_pageController.jumpToPage(index);
|
||||||
padding: const EdgeInsets.symmetric(
|
},
|
||||||
horizontal: 10,
|
child: Column(
|
||||||
vertical: 8,
|
mainAxisSize: MainAxisSize.min,
|
||||||
),
|
children: [
|
||||||
child: GNav(
|
const SizedBox(height: 8),
|
||||||
rippleColor: Colors.transparent,
|
Icon(
|
||||||
hoverColor: Colors.transparent,
|
_getIconData(item.icon),
|
||||||
gap: 10,
|
size: 24,
|
||||||
activeColor: Colors.white,
|
color: isSelected ? Colors.blue : Colors.grey,
|
||||||
tabBackgroundColor: Colors.black,
|
),
|
||||||
color: Colors.black87,
|
const SizedBox(height: 4),
|
||||||
iconSize: 24,
|
Text(
|
||||||
padding: const EdgeInsets.symmetric(
|
item.name,
|
||||||
horizontal: 18,
|
style: TextStyle(
|
||||||
vertical: 10,
|
fontSize: 11,
|
||||||
),
|
color: isSelected ? Colors.blue : Colors.grey,
|
||||||
duration: const Duration(milliseconds: 300),
|
fontWeight: isSelected ? FontWeight.w600 : FontWeight.normal,
|
||||||
selectedIndex: _currentIndex,
|
),
|
||||||
onTabChange: (index) {
|
),
|
||||||
setState(() {
|
const SizedBox(height: 8),
|
||||||
_currentIndex = index;
|
],
|
||||||
});
|
|
||||||
_pageController.jumpToPage(index);
|
|
||||||
},
|
|
||||||
tabs: enabledItems.map((item) {
|
|
||||||
return GButton(
|
|
||||||
icon: _getIconData(item.icon),
|
|
||||||
text: item.name,
|
|
||||||
);
|
|
||||||
}).toList(),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
);
|
||||||
),
|
}).toList(),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import 'package:maibu_satabot_v2/features/home/presentation/pages/home_page.dart
|
|||||||
import 'package:maibu_satabot_v2/features/my/presentation/pages/my_page.dart';
|
import 'package:maibu_satabot_v2/features/my/presentation/pages/my_page.dart';
|
||||||
import 'package:maibu_satabot_v2/features/main_container/presentation/bloc/tab_config_cubit.dart';
|
import 'package:maibu_satabot_v2/features/main_container/presentation/bloc/tab_config_cubit.dart';
|
||||||
import 'package:maibu_satabot_v2/features/main_container/presentation/widgets/custom_bottom_nav_bar.dart';
|
import 'package:maibu_satabot_v2/features/main_container/presentation/widgets/custom_bottom_nav_bar.dart';
|
||||||
|
import 'package:maibu_satabot_v2/features/v2/home/presentation/pages/home_v2_page.dart';
|
||||||
|
|
||||||
import '../../../waring_center/presentation/pages/warning_center_page.dart';
|
import '../../../waring_center/presentation/pages/warning_center_page.dart';
|
||||||
|
|
||||||
@@ -53,6 +54,8 @@ class _CustomMainContainerState extends State<CustomMainContainer> with Automati
|
|||||||
List<Widget> _buildPages(List<dynamic> enabledTabs) {
|
List<Widget> _buildPages(List<dynamic> enabledTabs) {
|
||||||
return enabledTabs.map((tab) {
|
return enabledTabs.map((tab) {
|
||||||
switch (tab.id) {
|
switch (tab.id) {
|
||||||
|
case 'home_v2':
|
||||||
|
return const HomeV2Page();
|
||||||
case 'home':
|
case 'home':
|
||||||
return const HomePage();
|
return const HomePage();
|
||||||
case 'ai':
|
case 'ai':
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
import 'package:maibu_satabot_v2/features/main_container/presentation/bloc/tab_config_cubit.dart';
|
import 'package:maibu_satabot_v2/features/main_container/presentation/cubit/tab_config_cubit.dart';
|
||||||
import 'package:cc_ui_kit/cc_ui_kit.dart';
|
import 'package:cc_ui_kit/cc_ui_kit.dart';
|
||||||
|
|
||||||
class TabSettingsPage extends StatelessWidget {
|
class TabSettingsPage extends StatelessWidget {
|
||||||
@@ -17,6 +17,10 @@ class TabSettingsPage extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
body: BlocBuilder<TabConfigCubit, TabConfigState>(
|
body: BlocBuilder<TabConfigCubit, TabConfigState>(
|
||||||
builder: (context, state) {
|
builder: (context, state) {
|
||||||
|
if (state is! TabConfigLoaded) {
|
||||||
|
return const Center(child: CircularProgressIndicator());
|
||||||
|
}
|
||||||
|
|
||||||
final tabs = state.config.items;
|
final tabs = state.config.items;
|
||||||
|
|
||||||
return ListView.builder(
|
return ListView.builder(
|
||||||
@@ -60,6 +64,8 @@ class TabSettingsPage extends StatelessWidget {
|
|||||||
|
|
||||||
IconData _getIconData(String iconName) {
|
IconData _getIconData(String iconName) {
|
||||||
switch (iconName) {
|
switch (iconName) {
|
||||||
|
case 'home_rounded':
|
||||||
|
return Icons.home_rounded;
|
||||||
case 'grid_view_rounded':
|
case 'grid_view_rounded':
|
||||||
return Icons.grid_view_rounded;
|
return Icons.grid_view_rounded;
|
||||||
case 'auto_awesome_rounded':
|
case 'auto_awesome_rounded':
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ class MyPage extends StatelessWidget {
|
|||||||
title: Text(AppLocalizations.of(context).translate('my.settings'), style: const TextStyle(color: Colors.black)),
|
title: Text(AppLocalizations.of(context).translate('my.settings'), style: const TextStyle(color: Colors.black)),
|
||||||
trailing: const Icon(Icons.arrow_forward, color: Colors.black),
|
trailing: const Icon(Icons.arrow_forward, color: Colors.black),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
context.push(RoutePaths.settings);
|
context.push('/home/settings');
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
|
||||||
|
|||||||
@@ -381,15 +381,15 @@ class TopStatusBar extends StatelessWidget {
|
|||||||
child: CCExpandSlider(
|
child: CCExpandSlider(
|
||||||
label: " ",
|
label: " ",
|
||||||
// 3. 图标适配旋转后的方向(仍用上下箭头,旋转后变为左右)因为外边旋转了 90度 参数传递也要转换
|
// 3. 图标适配旋转后的方向(仍用上下箭头,旋转后变为左右)因为外边旋转了 90度 参数传递也要转换
|
||||||
svgStart: "assets/svgs/remote_flame_minus.svg", // 旋转后→左箭头
|
svgStart: "assets/svgs/remote_flame_plus.svg", // 旋转后→左箭头assets/svgs/remote_flame_minus.svg
|
||||||
svgCenter: "assets/svgs/remote_flame.svg",
|
svgCenter: "assets/svgs/remote_flame.svg",
|
||||||
svgEnd: "assets/svgs/remote_flame_plus.svg", // 旋转后→右箭头
|
svgEnd: "assets/svgs/remote_flame_minus.svg", // 旋转后→右箭头assets/svgs/remote_flame_plus.svg
|
||||||
// 4. 放大图标尺寸,解决拥挤
|
// 4. 放大图标尺寸,解决拥挤
|
||||||
iconSize: iconSize,
|
iconSize: iconSize,
|
||||||
// 保留原有业务逻辑
|
// 保留原有业务逻辑
|
||||||
onStart: () => _handleSliderAction(label, "start", context),
|
onStart: () =>_handleSliderAction(label, "end", context),//_handleSliderAction(label, "start", context)
|
||||||
onCenter: () => _handleSliderAction(label, "center", context),
|
onCenter: () => _handleSliderAction(label, "center", context),
|
||||||
onEnd: () => _handleSliderAction(label, "end", context),
|
onEnd: () => _handleSliderAction(label, "start", context),//_handleSliderAction(label, "end", context)
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user