fix: wheel event passive

This commit is contained in:
jialin
2025-12-29 15:28:40 +08:00
parent bd2e4bb633
commit 632685672c
5 changed files with 9 additions and 10 deletions
+5 -2
View File
@@ -168,14 +168,17 @@ export default function useOverlayScroller(data?: {
// add wheel event // add wheel event
const handleWheelEvent = () => { const handleWheelEvent = () => {
scrollElementRef.current?.addEventListener?.('wheel', handleWheelCallback); scrollElementRef.current?.addEventListener?.('wheel', handleWheelCallback, {
passive: true
});
}; };
// remove wheel event // remove wheel event
const removeWheelEvent = () => { const removeWheelEvent = () => {
scrollElementRef.current?.removeEventListener?.( scrollElementRef.current?.removeEventListener?.(
'wheel', 'wheel',
handleWheelCallback handleWheelCallback,
{ passive: true }
); );
}; };
+1 -2
View File
@@ -19,8 +19,7 @@ export default {
'backend.mode.yaml': 'YAML Mode', 'backend.mode.yaml': 'YAML Mode',
'backend.form.healthCheckPath': 'Health Check Path', 'backend.form.healthCheckPath': 'Health Check Path',
'backend.form.defaultExecuteCommand': 'Default Execution Command', 'backend.form.defaultExecuteCommand': 'Default Execution Command',
'backend.form.defaultExecuteCommand.tips': 'backend.form.defaultExecuteCommand.tips': `'{{'model_path'}}', '{{'port'}}', '{{'worker_ip'}}' and '{{'model_name'}}' are placeholders that will be substituted with the actual values during deployment.`,
'{{model_path}}, {{port}}, {{worker_ip}} and {{model_name}} are placeholders that will be substituted with the actual values during deployment.',
'backend.form.defaultBackendParameters': 'Default Backend Parameters', 'backend.form.defaultBackendParameters': 'Default Backend Parameters',
'backend.form.versionConfig': 'Versions Config', 'backend.form.versionConfig': 'Versions Config',
'backend.form.addParameter': 'Add Parameter', 'backend.form.addParameter': 'Add Parameter',
+1 -2
View File
@@ -19,8 +19,7 @@ export default {
'backend.mode.yaml': 'YAML Mode', 'backend.mode.yaml': 'YAML Mode',
'backend.form.healthCheckPath': 'Health Check Path', 'backend.form.healthCheckPath': 'Health Check Path',
'backend.form.defaultExecuteCommand': 'Default Execution Command', 'backend.form.defaultExecuteCommand': 'Default Execution Command',
'backend.form.defaultExecuteCommand.tips': 'backend.form.defaultExecuteCommand.tips': `'{{'model_path'}}', '{{'port'}}', '{{'worker_ip'}}' and '{{'model_name'}}' are placeholders that will be substituted with the actual values during deployment.`,
'{{model_path}}, {{port}}, {{worker_ip}} and {{model_name}} are placeholders that will be substituted with the actual values during deployment.',
'backend.form.defaultBackendParameters': 'Default Backend Parameters', 'backend.form.defaultBackendParameters': 'Default Backend Parameters',
'backend.form.versionConfig': 'Versions Config', 'backend.form.versionConfig': 'Versions Config',
'backend.form.addParameter': 'Add Parameter', 'backend.form.addParameter': 'Add Parameter',
+1 -2
View File
@@ -19,8 +19,7 @@ export default {
'backend.mode.yaml': 'Режим YAML', 'backend.mode.yaml': 'Режим YAML',
'backend.form.healthCheckPath': 'Путь проверки здоровья', 'backend.form.healthCheckPath': 'Путь проверки здоровья',
'backend.form.defaultExecuteCommand': 'Команда выполнения по умолчанию', 'backend.form.defaultExecuteCommand': 'Команда выполнения по умолчанию',
'backend.form.defaultExecuteCommand.tips': 'backend.form.defaultExecuteCommand.tips': `'{{'model_path'}}', '{{'port'}}', '{{'worker_ip'}}' и '{{'model_name'}}' заполняются реальными значениями во время запуска`,
'{{model_path}}, {{port}}, {{worker_ip}} и {{model_name}} заполняются реальными значениями во время запуска',
'backend.form.defaultBackendParameters': 'Параметры бэкенда по умолчанию', 'backend.form.defaultBackendParameters': 'Параметры бэкенда по умолчанию',
'backend.form.versionConfig': 'Конфигурация версий', 'backend.form.versionConfig': 'Конфигурация версий',
'backend.form.addParameter': 'Добавить параметр', 'backend.form.addParameter': 'Добавить параметр',
+1 -2
View File
@@ -19,8 +19,7 @@ export default {
'backend.mode.yaml': 'YAML 模式', 'backend.mode.yaml': 'YAML 模式',
'backend.form.healthCheckPath': '健康检查路径', 'backend.form.healthCheckPath': '健康检查路径',
'backend.form.defaultExecuteCommand': '默认执行命令', 'backend.form.defaultExecuteCommand': '默认执行命令',
'backend.form.defaultExecuteCommand.tips': 'backend.form.defaultExecuteCommand.tips': `'{{'model_path'}}'、'{{'port'}}'、'{{'worker_ip'}}' 和 '{{'model_name'}}' 都是占位符,在部署过程中会被替换为实际的值。`,
'{{model_path}}、{{port}}、{{worker_ip}} 和 {{model_name}} 都是占位符,在部署过程中会被替换为实际的值。',
'backend.form.defaultBackendParameters': '默认后端参数', 'backend.form.defaultBackendParameters': '默认后端参数',
'backend.form.versionConfig': '版本配置', 'backend.form.versionConfig': '版本配置',
'backend.form.addParameter': '添加参数', 'backend.form.addParameter': '添加参数',