Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set directive v-ripple component #37

Open
MaximeStl opened this issue May 10, 2022 · 0 comments
Open

Set directive v-ripple component #37

MaximeStl opened this issue May 10, 2022 · 0 comments

Comments

@MaximeStl
Copy link

Hi, thanks for this directive.
How can y set v-ripple on component before define it globally ?

I have a b-btn like this :

And i want to set v-ripple directive for all my buttons so after it should be :

My libs configuration for v-ripple is :
import Ripple from 'vue-ripple-directive'

Ripple.color = 'rgba(255, 255, 255, 0.35)'
Ripple.zIndex = 55

export default Ripple

And before set BButton globaly i do that :
import Vue from 'vue'
import {
BVConfigPlugin,
BSidebar,
BOverlay,
BTable,
BButton,
BFormDatepicker,
BRow,
BCol,
} from 'bootstrap-vue'
import Ripple from './vue-ripple-directive'
import i18n from '@/libs/i18n'

Vue.use(BVConfigPlugin, {
BSidebar: {
backdrop: true,
bgVariant: 'white',
lazy: true,
noHeader: true,
right: true,
shadow: true,
sidebarClass: 'sidebar-lg',
},
BOverlay: {
rounded: true,
spinnerSmall: true,
spinnerVariant: 'primary',
},
BTable: {
// emptyText: i18n.t('common.no_record_found'),
responsive: true,
showEmpty: true,
hover: true,
},
BButton: { variant: 'primary' },
BFormDatepicker: {
// locale: i18n.locale,
dateFormatOptions: {
year: 'numeric',
month: 'short',
day: '2-digit',
weekday: 'short',
},
menuClass: 'w-100',
calendarWidth: '100%',
},
BRow,
})

BButton.directive('ripple', Ripple)

Vue.component('BSidebar', BSidebar)
Vue.component('BOverlay', BOverlay)
Vue.component('BTable', BTable)
Vue.component('BButton', BButton)
Vue.component('BFormDatepicker', BFormDatepicker)
Vue.component('BRow', BRow)
Vue.component('BCol', BCol)

But it's not work...

Can you help me ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant