-
Notifications
You must be signed in to change notification settings - Fork 328
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Version
2.23.0
Vue Version
2.7.16
Link to minimal reproduction
modal的slot不兼容vue2
Step to reproduce
modal的slot对应的render函数如下
h(
"div",
{
class: "tiny-modal__content",
},
defaultSlot
? defaultSlot.call(
this,
{
$modal: this,
},
h
)
: [
h(
"div",
{
class: "tiny-modal__text",
},
typeof message2 === "function"
? message2.call(this, h)
: [message2]
),
]
)
这里defaultSlot.call需要用数组格式,否则children是undefined,需要如下格式才行
[
defaultSlot.call(
this,
{
$modal: this,
},
h
)
]
可能vue3这样可以,但是vue2不行
What is expected
No response
What is actually happening
No response
What is your project name
todo
Any additional comments (optional)
No response
kagol
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working