UNPKG

tdesign-mobile-vue

Version:
72 lines (65 loc) 1.93 kB
/** * tdesign v1.9.3 * (c) 2025 TDesign Group * @license MIT */ 'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); var _common_js_progress_const = require('./const.js'); var isString = require('../../../_chunks/dep-c3cb976c.js'); var toString = require('../../../_chunks/dep-afa9f3f2.js'); require('../../../_chunks/dep-2f809ed9.js'); require('@babel/runtime/helpers/typeof'); require('../../../_chunks/dep-757b152c.js'); require('../../../_chunks/dep-5be9198d.js'); require('../../../_chunks/dep-ae809b86.js'); require('../../../_chunks/dep-2b08c0a6.js'); /** * Converts `string`, as a whole, to upper case just like * [String#toUpperCase](https://mdn.io/toUpperCase). * * @static * @memberOf _ * @since 4.0.0 * @category String * @param {string} [string=''] The string to convert. * @returns {string} Returns the upper cased string. * @example * * _.toUpper('--foo-bar--'); * // => '--FOO-BAR--' * * _.toUpper('fooBar'); * // => 'FOOBAR' * * _.toUpper('__foo_bar__'); * // => '__FOO_BAR__' */ function toUpper(value) { return toString.toString(value).toUpperCase(); } var getDiameter = function getDiameter(size) { if (!size) return _common_js_progress_const.MOBILE_CIRCLE_SIZE_PX.DEFAULT; if (isString.isString(size)) { var KEY = toUpper(size); if (KEY in _common_js_progress_const.MOBILE_CIRCLE_SIZE_PX) { return _common_js_progress_const.MOBILE_CIRCLE_SIZE_PX[KEY]; } return _common_js_progress_const.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; }; exports.getCircleStokeWidth = getCircleStokeWidth; exports.getDiameter = getDiameter; //# sourceMappingURL=utils.js.map