Skip to content

Commit e8fa88a

Browse files
committed
refactor(COffcanvas): Non-function value encountered for default slot
1 parent 5520d0d commit e8fa88a

File tree

1 file changed

+14
-15
lines changed

1 file changed

+14
-15
lines changed

src/components/offcanvas/COffcanvas.ts

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -104,22 +104,21 @@ const COffcanvas = defineComponent({
104104
onLeave: (el, done) => handleLeave(el, done),
105105
onAfterLeave: (el) => handleAfterLeave(el),
106106
},
107-
[
107+
() =>
108108
props.visible &&
109-
h(
110-
'div',
111-
{
112-
class: [
113-
'offcanvas',
114-
{
115-
[`offcanvas-${props.placement}`]: props.placement,
116-
},
117-
],
118-
ref: offcanvasRef,
119-
},
120-
slots.default && slots.default(),
121-
),
122-
],
109+
h(
110+
'div',
111+
{
112+
class: [
113+
'offcanvas',
114+
{
115+
[`offcanvas-${props.placement}`]: props.placement,
116+
},
117+
],
118+
ref: offcanvasRef,
119+
},
120+
slots.default && slots.default(),
121+
),
123122
),
124123
props.backdrop &&
125124
h(CBackdrop, {

0 commit comments

Comments
 (0)