  return `#${Math.random().toString(16).slice(2, 8)}`
    }
    /**
     * 初始化canvas原始尺寸
     * @param {HTMLCanvasElement} cvs
     */
    function init(cvs) {
      cvs.width = cvs.clientWidth * devicePixelRatio
      cvs.height = cvs.clientHeight * devicePixelRatio
    }
    /**
     * 根据时间计算百分比
     * @param {number} time
     */
    function calcPercent(time) {
      const percent = time / 100
      return percent > 100 ? 100 : percent
    }
    /**
     * 绘制进度条