UNPKG

hongluan-ui

Version:
71 lines (67 loc) 1.31 kB
'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); const progressProps = { percentage: { type: Number, default: 0, validator: (val) => val >= 0 && val <= 100 }, type: String, format: { type: Function, default: (percentage) => `${percentage}%` }, striped: Boolean, active: Boolean, indicating: Boolean, showText: { type: Boolean, default: true }, round: Boolean, showAs: { type: String, default: "", validator: (val) => ["", "line", "stack", "circle", "dashboard"].indexOf(val) > -1 }, stack: { type: Array, default: () => [], validator: (val) => { let invalid = false, sum = 0; val.forEach((n) => { if (n.percentage < 0 || n.percentage > 100) { invalid = true; } sum += n.percentage; }); if (sum > 100) { invalid = true; } return !invalid; } }, text: { type: String, default: "" }, strokeWidth: { type: String }, trackColor: { type: String }, strokeLinecap: { type: String, default: "round" }, color: { type: [String, Array, Function], default: "" }, align: { type: String } }; exports.progressProps = progressProps; //# sourceMappingURL=progress2.js.map