使用VUE重构项目
This commit is contained in:
12
frontend/admin/node_modules/element-plus/es/hooks/use-calc-input-width/index.d.ts
generated
vendored
Normal file
12
frontend/admin/node_modules/element-plus/es/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 };
|
||||
23
frontend/admin/node_modules/element-plus/es/hooks/use-calc-input-width/index.mjs
generated
vendored
Normal file
23
frontend/admin/node_modules/element-plus/es/hooks/use-calc-input-width/index.mjs
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
import { MINIMUM_INPUT_WIDTH } from "../../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, MINIMUM_INPUT_WIDTH)}px` }));
|
||||
const resetCalculatorWidth = () => {
|
||||
calculatorWidth.value = calculatorRef.value?.getBoundingClientRect().width ?? 0;
|
||||
};
|
||||
useResizeObserver(calculatorRef, resetCalculatorWidth);
|
||||
return {
|
||||
calculatorRef,
|
||||
calculatorWidth,
|
||||
inputStyle
|
||||
};
|
||||
}
|
||||
|
||||
//#endregion
|
||||
export { useCalcInputWidth };
|
||||
//# sourceMappingURL=index.mjs.map
|
||||
1
frontend/admin/node_modules/element-plus/es/hooks/use-calc-input-width/index.mjs.map
generated
vendored
Normal file
1
frontend/admin/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","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,gBAAgB,YAAyB;CAC/C,MAAM,kBAAkB,IAAI,EAAE;CAE9B,MAAM,aAAa,gBAAgB,EACjC,UAAU,GAAG,KAAK,IAAI,gBAAgB,OAAO,oBAAoB,CAAC,KACnE,EAAE;CAEH,MAAM,6BAA6B;AACjC,kBAAgB,QACd,cAAc,OAAO,uBAAuB,CAAC,SAAS;;AAG1D,mBAAkB,eAAe,qBAAqB;AAEtD,QAAO;EACL;EACA;EACA;EACD"}
|
||||
Reference in New Issue
Block a user