tdesign-mobile-vue
Version:
tdesign-mobile-vue
35 lines (31 loc) • 816 B
JavaScript
/**
* tdesign v1.9.3
* (c) 2025 TDesign Group
* @license MIT
*/
import { isString, toUpper } from 'lodash-es';
import { MOBILE_CIRCLE_SIZE_PX } from './const.js';
var getDiameter = function getDiameter(size) {
if (!size) return MOBILE_CIRCLE_SIZE_PX.DEFAULT;
if (isString(size)) {
var KEY = toUpper(size);
if (KEY in MOBILE_CIRCLE_SIZE_PX) {
return MOBILE_CIRCLE_SIZE_PX[KEY];
}
return MOBILE_CIRCLE_SIZE_PX.DEFAULT;
}
return size;
};
var getCircleStokeWidth = function getCircleStokeWidth(strokeWidth, size) {
if (!strokeWidth) {
if (size === "micro") {
return 2;
}
}
if (typeof strokeWidth !== "number" || Number.isNaN(strokeWidth)) {
return 6;
}
return strokeWidth;
};
export { getCircleStokeWidth, getDiameter };
//# sourceMappingURL=utils.js.map