Merge branch 'main' into fix

This commit is contained in:
xingyu
2026-01-19 10:54:43 +08:00
committed by GitHub
22 changed files with 1587 additions and 119 deletions

View File

@@ -29,10 +29,8 @@ describe('useSortable', () => {
await initializeSortable();
// Import sortablejs to access the mocked create function
const Sortable = await import(
// @ts-expect-error - no types
'sortablejs/modular/sortable.complete.esm.js'
);
const Sortable =
await import('sortablejs/modular/sortable.complete.esm.js');
// Verify that Sortable.create was called with the correct parameters
expect(Sortable.default.create).toHaveBeenCalledTimes(1);

View File

@@ -63,8 +63,9 @@ class PreferenceManager {
/**
* 初始化偏好设置
* @param namespace - 命名空间,用于隔离不同应用的配置
* @param overrides - 要覆盖的偏好设
* @param options - 初始化配置
* @param options.namespace - 命名空间,用于隔离不同应用的配
* @param options.overrides - 要覆盖的偏好设置
*/
initPreferences = async ({ namespace, overrides }: InitialOptions) => {
// 防止重复初始化

View File

@@ -136,7 +136,7 @@ function usePreferences() {
});
/**
* @zh_CN 登录注册页面布局是否为
* @zh_CN 登录注册页面布局是否为
*/
const authPanelRight = computed(() => {
return appPreferences.value.authPageLayout === 'panel-right';

View File

@@ -403,13 +403,10 @@ watch(
);
{
const mouseMove = () => {
mouseY.value > headerWrapperHeight.value
? (headerIsHidden.value = true)
: (headerIsHidden.value = false);
};
const HEADER_TRIGGER_DISTANCE = 12;
watch(
[() => props.headerMode, () => mouseY.value],
[() => props.headerMode, () => mouseY.value, () => headerIsHidden.value],
() => {
if (!isHeaderAutoMode.value || isMixedNav.value || isFullContent.value) {
if (props.headerMode !== 'auto-scroll') {
@@ -417,8 +414,12 @@ watch(
}
return;
}
headerIsHidden.value = true;
mouseMove();
const isInTriggerZone = mouseY.value <= HEADER_TRIGGER_DISTANCE;
const isInHeaderZone =
!headerIsHidden.value && mouseY.value <= headerWrapperHeight.value;
headerIsHidden.value = !(isInTriggerZone || isInHeaderZone);
},
{
immediate: true,