fix: 修复多个UI样式问题和优化代码格式
-调整VXE表格搜索表单和分页样式间距 -优化use-layout-style和use-priority-value代码格式
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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(() => {
|
||||
|
||||
Reference in New Issue
Block a user