yuche / vue-strap

Bootstrap components built with Vue.js
http://yuche.github.io/vue-strap/
MIT License
4.71k stars 935 forks source link

When i trigger vue-strap modal nothing happen (no error in console etc) #455

Open jazib-bashir opened 7 years ago

jazib-bashir commented 7 years ago

When i trigger vue-strap modal nothing happen (no error in console etc)

Modal Template

<modal :show.sync="showModal" effect="fade" :large=true :backdrop=false>
    <div slot="modal-header" class="modal-header">
        <h4 class="modal-title">
            {{ attachment.document_file_name }}
        </h4>
    </div>
    <div slot="modal-body" class="modal-body">
        <img width="100%" :src="attachment.url"/>
    </div>
    <div slot="modal-footer" class="modal-footer">
        <button type="button" class="btn btn-default" @click="showModal = false">Close</button>
    </div>
</modal>

Trigger Modal From Component

 data: function () {
        return {
            showModal: false,
            attachment: {}
        }
    },
    components: {
        modal: VueStrap.modal
    },
    methods: {
        previewAttachment: function (attachment) {
            this.showModal = true;
            this.attachment = attachment;
        }
    }

I'm using vue-strap in rails application using rails-assets Rails Assets fetch v1.0.11 using bower component. vue v2.1.10

wffranco commented 7 years ago

Check the version... You can't use this vue-strap with vue 2, only the v2 branch but is outdated... the last fixes for vue 2 are in my fork: https://github.com/wffranco/vue-strap

iamvitali commented 6 years ago

Is this v2 branch still outdated @wffranco ?