-
Notifications
You must be signed in to change notification settings - Fork 14
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
There is an onBeforeModalClose, can you add an onBeforeModalOpen? #117
Comments
Hello. What functionality would you like to see in |
我有一个全局状态 switch , 当switch=false时 , 我希望在全局任意的调用都不会生效 |
Okay, I will add it today! |
可能在vue文件中加 |
It will looks like it: import {config} from "jenesius-vue-modal"
config({
beforeEach() {
if (global.switch === false) return false;
}
}) How do you like it? Or add just: import {beforeEach} from "jenesius-vue-modal" But this is too general a function, I don't want to clutter up the import space |
Please note version 1.11.7. I added the import {config} from "jenesius-vue-modal"
config({
beforeEach() {
if (global.switch === false) return false;
}
}) Thanks for your help in improving the library! |
thanks , This library is great. |
Can each Modal be managed individually? For example:
|
In this case, it is important to understand that this hook will only work when called by name. I'll try to come up with something and write about it as I go along |
backgroundClose also needs to be configured for a separate modal |
I'll try to show the result tomorrow, as long as I have this interface: export interface IStoreComponentConfiguration {
component: Component,
beforeEach: unknown,
backgroundClose: unknown,
scrollLock: unknown,
animation: unknown,
escClose: unknown,
draggable: unknown,
}
config({
store: {
Foo: IStoreComponentConfiguration
}
}) |
Now will available only |
Version 1.11.9. config({
store: {
Foo: {
component:FooComp ,
beforeEach() {
if (global.switch === false) return false;
}
}
}
}) |
There is an onBeforeModalClose, can you add an onBeforeModalOpen?
The text was updated successfully, but these errors were encountered: