Skip to content

Commit 6bc30a0

Browse files
committed
fix(layout-sider): support layout-sider trigger slot
1 parent fdf7857 commit 6bc30a0

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

components/layout/Sider.tsx

+3-9
Original file line numberDiff line numberDiff line change
@@ -142,15 +142,9 @@ export default defineComponent({
142142

143143
return () => {
144144
const pre = prefixCls.value;
145-
const {
146-
collapsedWidth,
147-
width,
148-
reverseArrow,
149-
zeroWidthTriggerStyle,
150-
trigger,
151-
collapsible,
152-
theme,
153-
} = props;
145+
const { collapsedWidth, width, reverseArrow, zeroWidthTriggerStyle, collapsible, theme } =
146+
props;
147+
const trigger = props.trigger || (slots.trigger && slots.trigger());
154148
const rawWidth = collapsed.value ? collapsedWidth : width;
155149
// use "px" as fallback unit for width
156150
const siderWidth = isNumeric(rawWidth) ? `${rawWidth}px` : String(rawWidth);

0 commit comments

Comments
 (0)