refs.js 408 B

123456789101112131415161718192021
  1. 'use strict';
  2. Object.defineProperty(exports, '__esModule', { value: true });
  3. require('../types.js');
  4. var shared = require('@vue/shared');
  5. const composeRefs = (...refs) => {
  6. return (el) => {
  7. refs.forEach((ref) => {
  8. if (shared.isFunction(ref)) {
  9. ref(el);
  10. } else {
  11. ref.value = el;
  12. }
  13. });
  14. };
  15. };
  16. exports.composeRefs = composeRefs;
  17. //# sourceMappingURL=refs.js.map