mirror of
https://github.com/motajs/template.git
synced 2026-11-20 11:24:30 +08:00
chore: 调整 renderContent 参数
This commit is contained in:
1 parent
d56d2a8ae4
commit
c92080a285
1 file changed
+3
-5
@@ -15,7 +15,6 @@ import {
|
||||
Container,
|
||||
ElementLocator,
|
||||
CustomRenderItem,
|
||||
Transform,
|
||||
MotaOffscreenCanvas2D,
|
||||
IActionEvent,
|
||||
IWheelEvent,
|
||||
@@ -68,7 +67,7 @@ export interface ScrollProps extends DefaultProps {
|
||||
padEnd?: number;
|
||||
}
|
||||
|
||||
type ScrollSlots = SlotsType<{
|
||||
export type ScrollSlots = SlotsType<{
|
||||
default: () => VNode | VNode[];
|
||||
}>;
|
||||
|
||||
@@ -354,8 +353,7 @@ export const Scroll = defineComponent<ScrollProps, {}, string, ScrollSlots>(
|
||||
|
||||
const renderContent = (
|
||||
canvas: MotaOffscreenCanvas2D,
|
||||
children: IRenderItem[],
|
||||
transform: Transform
|
||||
children: IRenderItem[]
|
||||
) => {
|
||||
const ctx = canvas.ctx;
|
||||
ctx.save();
|
||||
@@ -366,7 +364,7 @@ export const Scroll = defineComponent<ScrollProps, {}, string, ScrollSlots>(
|
||||
}
|
||||
children.forEach(v => {
|
||||
if (v.hidden) return;
|
||||
v.renderContent(canvas, transform);
|
||||
v.renderContent(canvas);
|
||||
});
|
||||
ctx.restore();
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user