tdesign-vue-next
Version:
TDesign Component for vue-next
57 lines (52 loc) • 1.63 kB
JavaScript
/**
* tdesign v1.20.3
* (c) 2026 tdesign
* @license MIT
*/
import { ref } from 'vue';
import { F as useListener } from '../../_chunks/dep-5975d369.mjs';
import { i as isServer } from '../../_chunks/dep-12b4e978.mjs';
import 'lodash-es';
import '../../_chunks/dep-adf8ce39.mjs';
import '../../_chunks/dep-390963eb.mjs';
import '../../_chunks/dep-d84a2ec7.mjs';
import '../../config-provider/hooks/useConfig.mjs';
import '../../config-provider/utils/context.mjs';
import '../../_chunks/dep-cf105282.mjs';
import '../../_chunks/dep-0841ee8f.mjs';
import '../../_chunks/dep-dcbc09c5.mjs';
import '../../_chunks/dep-9fc6972b.mjs';
import '../../_chunks/dep-ff183185.mjs';
import '../../_chunks/dep-a1cbfaae.mjs';
import '../../_chunks/dep-3f53eff0.mjs';
import '../../_chunks/dep-4c65e11b.mjs';
import '../../_chunks/dep-46776e3b.mjs';
import '../../_chunks/dep-07d8f2aa.mjs';
import '../../_chunks/dep-8aebe545.mjs';
var calcSize = function calcSize(width) {
var size = "xs";
if (width < 768) {
size = "xs";
} else if (width >= 768 && width < 992) {
size = "sm";
} else if (width >= 992 && width < 1200) {
size = "md";
} else if (width >= 1200 && width < 1400) {
size = "lg";
} else if (width >= 1400 && width < 1880) {
size = "xl";
} else {
size = "xxl";
}
return size;
};
function useRowSize() {
var size = ref(calcSize(isServer ? 0 : window.innerWidth));
var updateSize = function updateSize() {
size.value = calcSize(isServer ? 0 : window.innerWidth);
};
useListener("resize", updateSize);
return size;
}
export { useRowSize };
//# sourceMappingURL=index.mjs.map