fix: 修复多个UI样式问题和优化代码格式
Some checks failed
Lock Threads / action (push) Has been cancelled
Issue Close Require / close-issues (push) Has been cancelled
Close stale issues / stale (push) Has been cancelled
CodeQL / Analyze (javascript-typescript) (push) Has been cancelled

-调整VXE表格搜索表单和分页样式间距
-优化use-layout-style和use-priority-value代码格式
This commit is contained in:
2026-01-09 17:03:34 +08:00
parent ccfa4b5f15
commit f93751e74a
8 changed files with 30 additions and 38 deletions

View File

@@ -36,14 +36,11 @@ export function useLayoutContentStyle() {
};
});
const debouncedCalcHeight = useDebounceFn(
(_entries: ResizeObserverEntry[]) => {
visibleDomRect.value = getElementVisibleRect(contentElement.value);
contentHeight.value = `${visibleDomRect.value.height}px`;
contentWidth.value = `${visibleDomRect.value.width}px`;
},
16,
);
const debouncedCalcHeight = useDebounceFn((_entries: ResizeObserverEntry[]) => {
visibleDomRect.value = getElementVisibleRect(contentElement.value);
contentHeight.value = `${visibleDomRect.value.height}px`;
contentWidth.value = `${visibleDomRect.value.width}px`;
}, 16);
onMounted(() => {
if (contentElement.value && !resizeObserver) {

View File

@@ -2,10 +2,7 @@ import type { ComputedRef, Ref } from 'vue';
import { computed, getCurrentInstance, unref, useAttrs, useSlots } from 'vue';
import {
getFirstNonNullOrUndefined,
kebabToCamelCase,
} from '@vben-core/shared/utils';
import { getFirstNonNullOrUndefined, kebabToCamelCase } from '@vben-core/shared/utils';
/**
* 依次从插槽、attrs、props、state 中获取值
@@ -32,8 +29,7 @@ export function usePriorityValue<
for (const [key, value] of Object.entries(rawProps)) {
standardRawProps[kebabToCamelCase(key) as K] = value;
}
const propsKey =
standardRawProps?.[key] === undefined ? undefined : props[key];
const propsKey = standardRawProps?.[key] === undefined ? undefined : props[key];
// slot可以关闭
return getFirstNonNullOrUndefined(
@@ -77,11 +73,7 @@ export function useForwardPriorityValues<
const computedResult: { [K in keyof T]: ComputedRef<T[K]> } = {} as never;
(Object.keys(props) as (keyof T)[]).forEach((key) => {
computedResult[key] = usePriorityValue(
key as keyof typeof props,
props,
state,
);
computedResult[key] = usePriorityValue(key as keyof typeof props, props, state);
});
return computed(() => {