fix: lint

This commit is contained in:
xingyu4j
2025-11-17 12:15:14 +08:00
parent 655ce2c2e8
commit bed52983a0
135 changed files with 203 additions and 215 deletions

View File

@@ -55,16 +55,12 @@ function handleClick(event: MouseEvent) {
return;
}
const param: JsonViewerValue = {
path: '',
value: '',
depth: 0,
el: event.target,
path: pathNode.getAttribute('path') || '',
depth: Number(pathNode.getAttribute('depth')) || 0,
value: event.target.textContent || undefined,
};
param.path = pathNode.getAttribute('path') || '';
param.depth = Number(pathNode.getAttribute('depth')) || 0;
param.value = event.target.textContent || undefined;
param.value = JSON.parse(param.value);
emit('valueClick', param);
}

View File

@@ -618,13 +618,11 @@ const stickStyles = computed(() => (stick: string) => {
const stickStyle = {
width: `${stickSize.value / parentScaleX.value}px`,
height: `${stickSize.value / parentScaleY.value}px`,
[styleMapping.y[stick[0] as 'b' | 'm' | 't'] as 'height' | 'width']:
`${stickSize.value / parentScaleX.value / -2}px`,
[styleMapping.x[stick[1] as 'l' | 'm' | 'r'] as 'height' | 'width']:
`${stickSize.value / parentScaleX.value / -2}px`,
};
stickStyle[
styleMapping.y[stick[0] as 'b' | 'm' | 't'] as 'height' | 'width'
] = `${stickSize.value / parentScaleX.value / -2}px`;
stickStyle[
styleMapping.x[stick[1] as 'l' | 'm' | 'r'] as 'height' | 'width'
] = `${stickSize.value / parentScaleX.value / -2}px`;
return stickStyle;
});

View File

@@ -92,7 +92,7 @@ const rightSlots = computed(() => {
list.push({ index: Number(name[2]), name: key });
}
});
return list.sort((a, b) => a.index - b.index);
return list.toSorted((a, b) => a.index - b.index);
});
const leftSlots = computed(() => {
@@ -111,7 +111,7 @@ const leftSlots = computed(() => {
list.push({ index: Number(name[2]), name: key });
}
});
return list.sort((a, b) => a.index - b.index);
return list.toSorted((a, b) => a.index - b.index);
});
function clearPreferencesAndLogout() {

View File

@@ -66,7 +66,7 @@ function toggleTheme(event: MouseEvent) {
];
const animate = document.documentElement.animate(
{
clipPath: isDark.value ? [...clipPath].reverse() : clipPath,
clipPath: isDark.value ? [...clipPath].toReversed() : clipPath,
},
{
duration: 450,