perf: table

This commit is contained in:
tangjinzhou 2023-02-20 11:15:17 +08:00
parent 087dfa2f1b
commit 7af22a70f9
2 changed files with 3 additions and 17 deletions

View File

@ -6,7 +6,6 @@ import { computed, defineComponent, ref, watchEffect } from 'vue';
import { useInjectTable } from '../context/TableContext';
import { useInjectBody } from '../context/BodyContext';
import classNames from '../../_util/classNames';
import { parseStyleText } from '../../_util/props-util';
import type { MouseEventHandler } from '../../_util/EventInterface';
export interface BodyRowProps<RecordType> {
@ -128,10 +127,7 @@ export default defineComponent<BodyRowProps<unknown>>({
computeRowClassName.value,
additionalProps.value.class,
)}
style={{
...style,
...parseStyleText(additionalProps.value.style),
}}
style={[style, additionalProps.value.style]}
onClick={onClick}
>
{flattenColumns.map((column, colIndex) => {

View File

@ -1,10 +1,5 @@
import classNames from '../../_util/classNames';
import {
filterEmpty,
flattenChildren,
isValidElement,
parseStyleText,
} from '../../_util/props-util';
import { filterEmpty, flattenChildren, isValidElement } from '../../_util/props-util';
import type { CSSProperties, VNodeArrayChildren } from 'vue';
import { Text, computed, defineComponent, isVNode, renderSlot } from 'vue';
@ -348,12 +343,7 @@ export default defineComponent<CellProps>({
onMouseenter(e, mergedRowSpan);
},
onMouseleave,
style: {
...parseStyleText(additionalProps.style as any),
...alignStyle,
...fixedStyle,
...cellStyle,
},
style: [additionalProps.style, alignStyle, fixedStyle, cellStyle],
};
return (