测试
This commit is contained in:
7
frontend/node_modules/element-plus/es/hooks/use-calc-input-width/index.d.ts
generated
vendored
Normal file
7
frontend/node_modules/element-plus/es/hooks/use-calc-input-width/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
export declare function useCalcInputWidth(): {
|
||||
calculatorRef: import("vue").ShallowRef<HTMLElement | undefined>;
|
||||
calculatorWidth: import("vue").Ref<number>;
|
||||
inputStyle: import("vue").ComputedRef<{
|
||||
minWidth: string;
|
||||
}>;
|
||||
};
|
||||
24
frontend/node_modules/element-plus/es/hooks/use-calc-input-width/index.mjs
generated
vendored
Normal file
24
frontend/node_modules/element-plus/es/hooks/use-calc-input-width/index.mjs
generated
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
import { shallowRef, ref, computed } from 'vue';
|
||||
import { useResizeObserver } from '@vueuse/core';
|
||||
import { MINIMUM_INPUT_WIDTH } from '../../constants/form.mjs';
|
||||
|
||||
function useCalcInputWidth() {
|
||||
const calculatorRef = shallowRef();
|
||||
const calculatorWidth = ref(0);
|
||||
const inputStyle = computed(() => ({
|
||||
minWidth: `${Math.max(calculatorWidth.value, MINIMUM_INPUT_WIDTH)}px`
|
||||
}));
|
||||
const resetCalculatorWidth = () => {
|
||||
var _a, _b;
|
||||
calculatorWidth.value = (_b = (_a = calculatorRef.value) == null ? void 0 : _a.getBoundingClientRect().width) != null ? _b : 0;
|
||||
};
|
||||
useResizeObserver(calculatorRef, resetCalculatorWidth);
|
||||
return {
|
||||
calculatorRef,
|
||||
calculatorWidth,
|
||||
inputStyle
|
||||
};
|
||||
}
|
||||
|
||||
export { useCalcInputWidth };
|
||||
//# sourceMappingURL=index.mjs.map
|
||||
1
frontend/node_modules/element-plus/es/hooks/use-calc-input-width/index.mjs.map
generated
vendored
Normal file
1
frontend/node_modules/element-plus/es/hooks/use-calc-input-width/index.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.mjs","sources":["../../../../../packages/hooks/use-calc-input-width/index.ts"],"sourcesContent":["import { computed, ref, shallowRef } from 'vue'\nimport { useResizeObserver } from '@vueuse/core'\nimport { MINIMUM_INPUT_WIDTH } from '@element-plus/constants'\n\nexport function useCalcInputWidth() {\n const calculatorRef = shallowRef<HTMLElement>()\n const calculatorWidth = ref(0)\n\n const inputStyle = computed(() => ({\n minWidth: `${Math.max(calculatorWidth.value, MINIMUM_INPUT_WIDTH)}px`,\n }))\n\n const resetCalculatorWidth = () => {\n calculatorWidth.value =\n calculatorRef.value?.getBoundingClientRect().width ?? 0\n }\n\n useResizeObserver(calculatorRef, resetCalculatorWidth)\n\n return {\n calculatorRef,\n calculatorWidth,\n inputStyle,\n }\n}\n"],"names":[],"mappings":";;;;AAGO,SAAS,iBAAiB,GAAG;AACpC,EAAE,MAAM,aAAa,GAAG,UAAU,EAAE,CAAC;AACrC,EAAE,MAAM,eAAe,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;AACjC,EAAE,MAAM,UAAU,GAAG,QAAQ,CAAC,OAAO;AACrC,IAAI,QAAQ,EAAE,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,eAAe,CAAC,KAAK,EAAE,mBAAmB,CAAC,CAAC,EAAE,CAAC;AACzE,GAAG,CAAC,CAAC,CAAC;AACN,EAAE,MAAM,oBAAoB,GAAG,MAAM;AACrC,IAAI,IAAI,EAAE,EAAE,EAAE,CAAC;AACf,IAAI,eAAe,CAAC,KAAK,GAAG,CAAC,EAAE,GAAG,CAAC,EAAE,GAAG,aAAa,CAAC,KAAK,KAAK,IAAI,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,qBAAqB,EAAE,CAAC,KAAK,KAAK,IAAI,GAAG,EAAE,GAAG,CAAC,CAAC;AACnI,GAAG,CAAC;AACJ,EAAE,iBAAiB,CAAC,aAAa,EAAE,oBAAoB,CAAC,CAAC;AACzD,EAAE,OAAO;AACT,IAAI,aAAa;AACjB,IAAI,eAAe;AACnB,IAAI,UAAU;AACd,GAAG,CAAC;AACJ;;;;"}
|
||||
Reference in New Issue
Block a user