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