You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

11 lines
313 B
TypeScript

import { computed, type Ref } from "vue";
import { buildTicks } from "../services/tickService";
/**
* 依据当前主容器宽度返回刻度列表(含缓存)。
*/
export function useRulerTicks(totalWidth: Ref<number>) {
const ticks = computed(() => buildTicks(totalWidth.value));
return { ticks };
}