update shared components
This commit is contained in:
parent
912bd57ca0
commit
39fe608c2d
7 changed files with 122 additions and 62 deletions
|
@ -2,23 +2,19 @@ define([], function () {
|
|||
|
||||
return function (options) {
|
||||
|
||||
return new Promise(function (resolve, reject) {
|
||||
if (typeof options === 'string') {
|
||||
options = {
|
||||
label: '',
|
||||
text: options
|
||||
};
|
||||
}
|
||||
|
||||
if (typeof options === 'string') {
|
||||
options = {
|
||||
label: '',
|
||||
text: options
|
||||
};
|
||||
}
|
||||
|
||||
var result = prompt(options.label || '', options.text || '');
|
||||
|
||||
if (result) {
|
||||
resolve(result);
|
||||
} else {
|
||||
reject(result);
|
||||
}
|
||||
});
|
||||
var result = prompt(options.label || '', options.text || '');
|
||||
|
||||
if (result) {
|
||||
return Promise.resolve(result);
|
||||
} else {
|
||||
return Promise.reject(result);
|
||||
}
|
||||
};
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue