测试
This commit is contained in:
7
frontend/node_modules/element-plus/lib/hooks/use-calc-input-width/index.d.ts
generated
vendored
Normal file
7
frontend/node_modules/element-plus/lib/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;
|
||||
}>;
|
||||
};
|
||||
28
frontend/node_modules/element-plus/lib/hooks/use-calc-input-width/index.js
generated
vendored
Normal file
28
frontend/node_modules/element-plus/lib/hooks/use-calc-input-width/index.js
generated
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
||||
var vue = require('vue');
|
||||
var core = require('@vueuse/core');
|
||||
var form = require('../../constants/form.js');
|
||||
|
||||
function useCalcInputWidth() {
|
||||
const calculatorRef = vue.shallowRef();
|
||||
const calculatorWidth = vue.ref(0);
|
||||
const inputStyle = vue.computed(() => ({
|
||||
minWidth: `${Math.max(calculatorWidth.value, form.MINIMUM_INPUT_WIDTH)}px`
|
||||
}));
|
||||
const resetCalculatorWidth = () => {
|
||||
var _a, _b;
|
||||
calculatorWidth.value = (_b = (_a = calculatorRef.value) == null ? void 0 : _a.getBoundingClientRect().width) != null ? _b : 0;
|
||||
};
|
||||
core.useResizeObserver(calculatorRef, resetCalculatorWidth);
|
||||
return {
|
||||
calculatorRef,
|
||||
calculatorWidth,
|
||||
inputStyle
|
||||
};
|
||||
}
|
||||
|
||||
exports.useCalcInputWidth = useCalcInputWidth;
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
frontend/node_modules/element-plus/lib/hooks/use-calc-input-width/index.js.map
generated
vendored
Normal file
1
frontend/node_modules/element-plus/lib/hooks/use-calc-input-width/index.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","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":["shallowRef","ref","computed","MINIMUM_INPUT_WIDTH","useResizeObserver"],"mappings":";;;;;;;;AAGO,SAAS,iBAAiB,GAAG;AACpC,EAAE,MAAM,aAAa,GAAGA,cAAU,EAAE,CAAC;AACrC,EAAE,MAAM,eAAe,GAAGC,OAAG,CAAC,CAAC,CAAC,CAAC;AACjC,EAAE,MAAM,UAAU,GAAGC,YAAQ,CAAC,OAAO;AACrC,IAAI,QAAQ,EAAE,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,eAAe,CAAC,KAAK,EAAEC,wBAAmB,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,EAAEC,sBAAiB,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