Open cypherix93 opened 4 years ago
When calling Vue.use(VueWindowedModal), please allow passing in the default options as a 2nd parameter, for example:
Vue.use(VueWindowedModal)
Vue.use(VueWindowedModal, { fullscreen: true, dimAmount: 0.25 })
I'm thinking the only change that would be required to do this is accept a 2nd parameter in the install function in the plugin, along with augmenting the base default options with the provided options if any. For example:
install
install(Vue, pluginOptions) { // -- omitted -- Vue.prototype.$showModal = function(component, options) { const defaultOptions = { fullscreen: false, animated: true, stretched: false, dimAmount: 0.5, ios: {}, ...pluginOptions }; // build options object with defaults options = { ...defaultOptions, ...options }; // -- omitted -- } }
I would submit a PR, but I have no way of testing this on iOS. It should work as described above, let me know what you think.
Thanks.
When calling
Vue.use(VueWindowedModal)
, please allow passing in the default options as a 2nd parameter, for example:I'm thinking the only change that would be required to do this is accept a 2nd parameter in the
install
function in the plugin, along with augmenting the base default options with the provided options if any. For example:I would submit a PR, but I have no way of testing this on iOS. It should work as described above, let me know what you think.
Thanks.