Skip to content

Commit ae180a9

Browse files
committed
v1.1.2
1 parent 59166b4 commit ae180a9

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

script/aui-alert.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,14 @@
2727
btnColor = opts.btnColor?opts.btnColor:btnColor;
2828
}
2929
var _init = function(){
30+
if(api.winName=='root'){
31+
frmUrl = 'html/aui_alert_frm.html';
32+
}else{
33+
frmUrl = 'aui_alert_frm.html';
34+
}
3035
api.openFrame({
3136
name:'aui_alert_frm',
32-
url:'aui_alert_frm.html',
37+
url:frmUrl,
3338
rect:{
3439
x:0,
3540
y:0,
@@ -52,9 +57,10 @@
5257
api.addEventListener({
5358
name: 'myEvent'
5459
}, function(ret){
55-
if(ret && ret.value){
60+
61+
if(ret){
5662
setTimeout(function(){
57-
callback(ret.value.buttonIndex);
63+
callback(''+ret.value.buttonIndex+'');
5864
},150)
5965

6066
}

0 commit comments

Comments
 (0)