Files
SBPanel-Backend/frontend/admin/node_modules/element-plus/es/hooks/use-calc-input-width/index.mjs.map
CN-JS-HuiBai db7f1ba82f
Some checks failed
build / build (api, amd64, linux) (push) Failing after -51s
build / build (api, arm64, linux) (push) Failing after -52s
build / build (api.exe, amd64, windows) (push) Failing after -51s
使用VUE重构项目
2026-04-20 00:19:11 +08:00

1 line
1.1 KiB
Plaintext

{"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"}