mazipan / vue2-simplert

⚠️ Vue 2 Simple Alert Component (SweetAlert Inspired)

Home Page:https://vue2-simplert.gitbook.io/docs/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ButtonText slot?

pilisir opened this issue · comments

Hi,

I try to add some elements under buttons, just like

<button class="btn btn-danger">
    <i class="fa fa-trash"></i> Delete!
</button>

Unfortunately, customConfirmBtnText would do this, <i class="fa fa-trash"> Delete!</i>, as TEXT instead of HTML.

But it a little bit fall away from spirit of MVVM ,if it could be done by customConfirmBtnText.

I'm wondering whether the slot of Vue is in this project?
So, I can custom child elements under Button, even components!

<simplert id="simplert" :useRadius="true" :useIcon="true" ref="simplert">
    <template slot="confirmBtn" slot-scope="data">
        <icon :name="data.iconName"></icon>
        {{data.customConfirmBtnText}}
    </template>
</simplert>

Thanks.