智慧水务管理系统 - 精河县供水工程综合管理平台

123456789101112131415161718192021222324
  1. Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
  2. require("../../_virtual/_rolldown/runtime.js");
  3. require("../../constants/form.js");
  4. let _vueuse_core = require("@vueuse/core");
  5. let vue = require("vue");
  6. //#region ../../packages/hooks/use-calc-input-width/index.ts
  7. function useCalcInputWidth() {
  8. const calculatorRef = (0, vue.shallowRef)();
  9. const calculatorWidth = (0, vue.ref)(0);
  10. const inputStyle = (0, vue.computed)(() => ({ minWidth: `${Math.max(calculatorWidth.value, 11)}px` }));
  11. const resetCalculatorWidth = () => {
  12. calculatorWidth.value = calculatorRef.value?.getBoundingClientRect().width ?? 0;
  13. };
  14. (0, _vueuse_core.useResizeObserver)(calculatorRef, resetCalculatorWidth);
  15. return {
  16. calculatorRef,
  17. calculatorWidth,
  18. inputStyle
  19. };
  20. }
  21. //#endregion
  22. exports.useCalcInputWidth = useCalcInputWidth;
  23. //# sourceMappingURL=index.js.map