34 lines
557 B
JavaScript
34 lines
557 B
JavaScript
import {
|
|
observable,
|
|
action,
|
|
} from 'mobx';
|
|
|
|
export default class DialogStore {
|
|
get staticDialogProps() {
|
|
return {
|
|
hasScroll: true,
|
|
icon: 'icon-coms-hrm',
|
|
iconBgcolor: '#217346',
|
|
onCancel: () => this.closeDialog && this.closeDialog(),
|
|
}
|
|
};
|
|
|
|
@observable buttons = [];
|
|
|
|
@observable visible = false;
|
|
|
|
@action openDialog = () => {
|
|
this.visible = true;
|
|
}
|
|
|
|
@action closeDialog = () => {
|
|
this.visible = false;
|
|
}
|
|
|
|
setDialogConfig = (config) =>{
|
|
Object.keys(config).forEach(key=>{
|
|
this[key] = config[key];
|
|
})
|
|
return this;
|
|
}
|
|
} |