Files
Neo-ZQYY/tmp/DEMO-miniprogram/miniprogram/components/perf-progress-bar/perf-progress-bar.ts

26 lines
1.0 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
Component({
properties: {
/** 进度条填充百分比 0~100 */
filledPct: { type: Number, value: 0 },
/** 火星位置百分比 0~100夹紧在进度末端 */
clampedSparkPct: { type: Number, value: 0 },
/** 当前档位 0~5控制刻度高亮 */
currentTier: { type: Number, value: 0 },
/**
* 刻度数组(从接口传入,不写死)
* 每项:{ value: number, label: string, left: string, highlight?: boolean }
* left: 百分比字符串,如 '45.45%'
* highlight: 是否加粗高亮(如关键档位)
*/
ticks: { type: Array, value: [] },
/** 高光单次播放触发 */
shineRunning: { type: Boolean, value: false },
/** 火花单次播放触发 */
sparkRunning: { type: Boolean, value: false },
/** 高光动画时长(毫秒),由页面层按进度+速度计算后传入 */
shineDurMs: { type: Number, value: 1000 },
/** 火花动画时长(毫秒) */
sparkDurMs: { type: Number, value: 1400 },
},
})