完全跑通1.0版本
This commit is contained in:
24
frontend/node_modules/element-plus/lib/hooks/use-calc-input-width/index.js
generated
vendored
Normal file
24
frontend/node_modules/element-plus/lib/hooks/use-calc-input-width/index.js
generated
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
||||
require("../../_virtual/_rolldown/runtime.js");
|
||||
require("../../constants/form.js");
|
||||
let _vueuse_core = require("@vueuse/core");
|
||||
let vue = require("vue");
|
||||
//#region ../../packages/hooks/use-calc-input-width/index.ts
|
||||
function useCalcInputWidth() {
|
||||
const calculatorRef = (0, vue.shallowRef)();
|
||||
const calculatorWidth = (0, vue.ref)(0);
|
||||
const inputStyle = (0, vue.computed)(() => ({ minWidth: `${Math.max(calculatorWidth.value, 11)}px` }));
|
||||
const resetCalculatorWidth = () => {
|
||||
calculatorWidth.value = calculatorRef.value?.getBoundingClientRect().width ?? 0;
|
||||
};
|
||||
(0, _vueuse_core.useResizeObserver)(calculatorRef, resetCalculatorWidth);
|
||||
return {
|
||||
calculatorRef,
|
||||
calculatorWidth,
|
||||
inputStyle
|
||||
};
|
||||
}
|
||||
//#endregion
|
||||
exports.useCalcInputWidth = useCalcInputWidth;
|
||||
|
||||
//# sourceMappingURL=index.js.map
|
||||
Reference in New Issue
Block a user