tdesign-vue
Version:
24 lines (19 loc) • 588 B
JavaScript
/**
* tdesign v1.12.1
* (c) 2025 tdesign
* @license MIT
*/
;
Object.defineProperty(exports, '__esModule', { value: true });
var ANCHOR_SHARP_REGEXP = /#(\S+)$/;
function getOffsetTop(target, container) {
var _target$getBoundingCl = target.getBoundingClientRect(),
top = _target$getBoundingCl.top;
if (container === window) {
return top - document.documentElement.clientTop;
}
return top - container.getBoundingClientRect().top;
}
exports.ANCHOR_SHARP_REGEXP = ANCHOR_SHARP_REGEXP;
exports.getOffsetTop = getOffsetTop;
//# sourceMappingURL=utils.js.map