ad938c9e290781e4c1c34d2c126be742766dccc4c6ad87dbe1a5ad96fc6fcd5110a567350676bf92e8b1d43f648b8a0d85967dc9bdf994cf3af4538f7c1c52 971 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. import { defineComponent, createVNode } from 'vue';
  2. import { autoResizerProps } from '../auto-resizer.mjs';
  3. import { useAutoResize } from '../composables/use-auto-resize.mjs';
  4. import { useNamespace } from '../../../../hooks/use-namespace/index.mjs';
  5. const AutoResizer = defineComponent({
  6. name: "ElAutoResizer",
  7. props: autoResizerProps,
  8. setup(props, {
  9. slots
  10. }) {
  11. const ns = useNamespace("auto-resizer");
  12. const {
  13. height,
  14. width,
  15. sizer
  16. } = useAutoResize(props);
  17. const style = {
  18. width: "100%",
  19. height: "100%"
  20. };
  21. return () => {
  22. var _a;
  23. return createVNode("div", {
  24. "ref": sizer,
  25. "class": ns.b(),
  26. "style": style
  27. }, [(_a = slots.default) == null ? void 0 : _a.call(slots, {
  28. height: height.value,
  29. width: width.value
  30. })]);
  31. };
  32. }
  33. });
  34. var AutoResizer$1 = AutoResizer;
  35. export { AutoResizer$1 as default };
  36. //# sourceMappingURL=auto-resizer.mjs.map