818738e0b90ef4d4066d9cad78ff3856d48fff52463af5e6c635ded512ddb31c7ba47a49567bbca1c85910d02312d6c451047b28360f51cacd56df6594e889 432 B

1234567891011121314
  1. import { ref, computed } from 'vue';
  2. import { useElementSize } from '@vueuse/core';
  3. function useContainer(layout) {
  4. const containerEl = ref();
  5. const { width, height } = useElementSize(containerEl);
  6. const containerSize = computed(() => {
  7. return layout.value === "horizontal" ? width.value : height.value;
  8. });
  9. return { containerEl, containerSize };
  10. }
  11. export { useContainer };
  12. //# sourceMappingURL=useContainer.mjs.map