feature(store) add

This commit is contained in:
coderaiser 2017-05-16 16:15:22 +03:00
parent fe0210d573
commit ea297fc23e
5 changed files with 65 additions and 37 deletions

View file

@ -64,16 +64,17 @@ function EditProto(callback) {
function initConfig(options = {}) {
const config = Object.assign({}, options, ConfigView);
if (options.afterShow) {
checkFn('options.afterShow', options.afterShow);
const afterShow = {config};
config.afterShow = () => {
afterShow();
options.afterShow();
};
}
if (!options.afterShow)
return config;
checkFn('options.afterShow', options.afterShow);
const afterShow = {config};
config.afterShow = () => {
afterShow();
options.afterShow();
};
return config;
}