完全跑通1.0版本
This commit is contained in:
12
frontend/node_modules/element-plus/lib/hooks/use-calc-input-width/index.d.ts
generated
vendored
Normal file
12
frontend/node_modules/element-plus/lib/hooks/use-calc-input-width/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
import * as _$vue from "vue";
|
||||
|
||||
//#region ../../packages/hooks/use-calc-input-width/index.d.ts
|
||||
declare function useCalcInputWidth(): {
|
||||
calculatorRef: _$vue.ShallowRef<HTMLElement | undefined, HTMLElement | undefined>;
|
||||
calculatorWidth: _$vue.Ref<number, number>;
|
||||
inputStyle: _$vue.ComputedRef<{
|
||||
minWidth: string;
|
||||
}>;
|
||||
};
|
||||
//#endregion
|
||||
export { useCalcInputWidth };
|
||||
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
|
||||
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","names":[],"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"],"mappings":";;;;;;AAIA,SAAgB,oBAAoB;CAClC,MAAM,iBAAA,GAAA,IAAA,aAAyC;CAC/C,MAAM,mBAAA,GAAA,IAAA,KAAsB,EAAE;CAE9B,MAAM,cAAA,GAAA,IAAA,iBAA6B,EACjC,UAAU,GAAG,KAAK,IAAI,gBAAgB,OAAA,GAA2B,CAAC,KACnE,EAAE;CAEH,MAAM,6BAA6B;EACjC,gBAAgB,QACd,cAAc,OAAO,uBAAuB,CAAC,SAAS;;CAG1D,CAAA,GAAA,aAAA,mBAAkB,eAAe,qBAAqB;CAEtD,OAAO;EACL;EACA;EACA;EACD"}
|
||||
Reference in New Issue
Block a user