Configuration
To change the settings jenesius-vue-modal
you need to use function config
. You can influence the handling of pressing Esc
, name of animation, scroll
lock, etc:
import {config} from "jenesius-vue-modal";
config({
// Params
})
The configuration object has the following properties:
scrollLock
Default value istrue
. If installed valuetrue
, opening a modal window will blockscroll
on page.animation
Default value ismodal-list
. Used to set the animation name fortransition-group
. Read more can be found on this page.escClose
Default value istrue
. Controls closing modal window by pressingEsc
.
For Namespace
If you are working with a different namespace
than the original one, you need to take care of the closure yourself.
backgroundClose
Default value istrue
. Parameter is responsible for closing the modal window by clicking on the darkened background. In case, if set totrue
, clicking on the back area will cause the modal window to close.skipInitCheck
Default value isfalse
. Is used for checking for the presence ofcontainer
on the page when the modal is opened window. When you try to open a modal window you will receive an errorNotInitilized
. If your project assumes that the container will create after opening the modal window, you can pass valuetrue
. Thus skipping thecontainer
check procedure.store
Default value is{}
. Used for storage modal windows and opening them by key. You can read more in detail on here.singleShow
The default value isfalse
. Used in case if you need to show only the last modal window when using several windows (viapushModal
). In such a case, if the value is set to true, When you open a fashion window, all voices will be closed (through the mechanismv-show
).