Comments (10)
@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.
@ethanclevenger91 I've provided a PR #81 to address this issue. Please have a look.
from bootstrap-vue.
from bootstrap-vue.
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.
@jgog @ethanclevenger91 Thanks a lot!
this project is awesome <3
from bootstrap-vue.
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.
@mosinve Looks like a typo in the second bind line:
...hide()).bing(this)
probably should be
...hide()).bind(this)
from bootstrap-vue.
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.
Yep, thanks @riker09 - it was my typo. In working app all correct and works
from bootstrap-vue.
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)
- I'm trying to setup bootstrap-vue/nuxt but i got this error "Cannot restart nuxt: Cannot read properties of undefined (reading 'hook')" HOT 3
- Support for Tree View Component HOT 2
- the b-nav not switching tabs when clicking
- TS support for @vue/compat usage with vue3/optionsApi HOT 1
- Update to nuxt 3
- Set attributes on b-dropdown-group header
- vue 3.3.5+ in compat mode throws errors HOT 1
- b-form-checkbox assign is not a function HOT 16
- [Mobile devies] Cannot open tooltip again when call `this.$root.$emit("bv::hide::tooltip")`
- Sortable does not show HOT 1
- B-form-spinbutton : how to add two features : default value, and direction (+/-) on @change event HOT 3
- @row-selected in b-table not fired after calling multiple selectRow function
- -
- disabled buttons style radio-group displays the checked option as not checked
- can i get the source of web site "https://bootstrap-vue.org/" HOT 1
- b-form-radio-group Issue : Not able to Get the Id and Text on v-model for b-form-radio-group HOT 2
- nb
- b-form-select throws error el[assignKey] is not a function HOT 2
- Bootstrap-vue doesn't work with latest VUE + VITE
- Alias vue: '@vue/compat' breaking PrimeVue datatable HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bootstrap-vue.