view-design / ViewUI

A high quality UI Toolkit built on Vue.js 2.0
https://www.iviewui.com/
Other
2.64k stars 797 forks source link

[Feature Request]Empowerment this.$Modal.confirm #45

Open kovjogin opened 5 years ago

kovjogin commented 5 years ago

What problem does this feature solve?

I want to add "this.modal.open()". API to Modal, without icons, with hideFooter, maskClosable and other props. This will allow you to call modal windows from methods, rather than a template. And use a single api and have a callback in code. I can make such a pull request.

What does the proposed API look like?

this.$modal.open({ title: 'title', render: (h) => h(MyComponent), () maskClosable: true, hideFooter: true })

Hide footer because in component has custom buttons. They have validation state. I am surprised that "maskСlosable" is not supported by default

weizhiqimail commented 5 years ago

you can paste your demo code here https://run.iviewui.com/