Giter Club home page Giter Club logo

Comments (10)

riker09 avatar riker09 commented on May 20, 2024 1

@ethanclevenger91 Hello Ethan, do you have any news on the modal implementation? I'm currently fiddling around a bit with Vue + Bootstrap and would like to use the Modal component. What I noticed, is that the CSS class "show" is not set. Instead, a CSS class "in" is set. Hope this helps.

from bootstrap-vue.

riker09 avatar riker09 commented on May 20, 2024 1

@ethanclevenger91 I've provided a PR #81 to address this issue. Please have a look.

from bootstrap-vue.

ethanclevenger91 avatar ethanclevenger91 commented on May 20, 2024

from bootstrap-vue.

jenil avatar jenil commented on May 20, 2024

I got it to work using the following code:

<template>
<div id="app">
        <b-button @click="toggleModal">
            Click Me!
        </b-button>
    <b-modal ref="modal">
        <div slot="modal-body" class="modal-body">...</div>
    </b-modal>
</div>
</template>

<script>
export default {
    mounted() {
        console.log('welcome!')
    },
    methods: {
        toggleModal() {
            this.$refs.modal.show();
        }
    }
}
</script>

from bootstrap-vue.

marklofff avatar marklofff commented on May 20, 2024

@jgog @ethanclevenger91 Thanks a lot!
this project is awesome <3

from bootstrap-vue.

mosinve avatar mosinve commented on May 20, 2024

Got worked by changing modal's created method to:

 created() {
        const hub = this.$root;
        hub.$on('show::modal', id => id === this.id && this.show()).bind(this);
        hub.$on('hide::modal', id => id === this.id && this.hide()).bing(this);
    },

and the emitter method of opener:

    openObjects() {
                this.$root.$emit('show::modal', 'modaldlg');
            }

from bootstrap-vue.

riker09 avatar riker09 commented on May 20, 2024

@mosinve Looks like a typo in the second bind line:

...hide()).bing(this)

probably should be

...hide()).bind(this)

from bootstrap-vue.

pi0 avatar pi0 commented on May 20, 2024

Thanks @riker09 for mentioning that. I'm working on modal so it may be my mistake. It will be all better soon :)

from bootstrap-vue.

mosinve avatar mosinve commented on May 20, 2024

Yep, thanks @riker09 - it was my typo. In working app all correct and works

from bootstrap-vue.

mosinve avatar mosinve commented on May 20, 2024

Seems, that impossible to use modal in "Option 2: import individual components".

[Vue warn]: Unknown custom element: - did you register the component correctly? For recursive components, make sure to provide the "name" option.
(found in at D:\Dev\reestrius_spa\node_modules\bootstrap-vue\components\modal.vue)

from bootstrap-vue.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.