didi / cube-ui

:large_orange_diamond: A fantastic mobile ui lib implement by Vue
https://didi.github.io/cube-ui/
Apache License 2.0
9.14k stars 1.47k forks source link

[New Feature] Dialog组件能否支持HTML模板语法? #741

Closed oodzchen closed 4 years ago

oodzchen commented 4 years ago

What problem does this feature solve?

目前的 $createDialog 只能做简单内容的弹窗,一旦内容的DOM结构嵌套过多,写起来就很麻烦,希望能支持直接的HTML语法,这样才能跟Vue.js的语法风格保持一致

What does the proposed API look like?

{
    domContent: this.$refs.dialogContent
}

或者

{
    domContent: `<div>这是内容</div>`
}
dolymood commented 4 years ago

dialog 的 content 是支持 html 的 然后对于复杂的弹框场景 建议包装组件实现 或者jsx的语法也是可以的