fix: lint

This commit is contained in:
xingyu4j
2025-11-24 15:34:25 +08:00
parent c3a702efbf
commit f22b390380
42 changed files with 178 additions and 170 deletions

View File

@@ -126,7 +126,8 @@ function validateSku() {
/**
* 选择时触发
*
* @param records 传递过来的选中的 sku 是一个数组
* @param {object} param0 参数对象
* @param {MallSpuApi.Sku[]} param0.records 传递过来的选中的 sku 是一个数组
*/
function handleSelectionChange({ records }: { records: MallSpuApi.Sku[] }) {
emit('selectionChange', records);

View File

@@ -99,8 +99,8 @@ function handleAppLinkSelected(appLink: AppLink) {
/**
* 处理右侧链接列表滚动
*
* @param {object} param0 滚动事件参数
* @param {number} param0.scrollTop 滚动条的位置
* @param {Event} event 滚动事件
* @param {number} event.target.scrollTop 滚动条的位置
*/
function handleScroll(event: Event) {
const scrollTop = (event.target as HTMLDivElement).scrollTop;

View File

@@ -57,10 +57,10 @@ export function isContains(hotArea: Rect, point: Point): boolean {
*/
export function createRect(a: Point, b: Point): Rect {
// 计算矩形的范围
let [left, left2] = [a.x, b.x].sort();
let [left, left2] = [a.x, b.x].toSorted();
left = left ?? 0;
left2 = left2 ?? 0;
let [top, top2] = [a.y, b.y].sort();
let [top, top2] = [a.y, b.y].toSorted();
top = top ?? 0;
top2 = top2 ?? 0;
const right = left2 + 1;