Skip to content

Commit 32b5fae

Browse files
author
bearyan
committed
优化example里actionsheet的js的代码
1 parent b751acf commit 32b5fae

File tree

6 files changed

+97
-109
lines changed

6 files changed

+97
-109
lines changed

dist/example/example.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/example/example.js

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -330,43 +330,6 @@ $(function () {
330330
}
331331
}
332332
};
333-
pages.actionsheet.events = {
334-
'#showIOSActionSheet': {
335-
click: (function(){
336-
function hideActionSheet(weuiActionsheet, mask) {
337-
weuiActionsheet.removeClass('weui-actionsheet_toggle');
338-
mask.removeClass('actionsheet__mask_show');
339-
weuiActionsheet.on('transitionend', function () {
340-
mask.css('display', 'none');
341-
}).on('webkitTransitionEnd', function () {
342-
mask.css('display', 'none');
343-
})
344-
}
345-
return function () {
346-
var mask = $('#mask');
347-
var weuiActionsheet = $('#weui-actionsheet');
348-
weuiActionsheet.addClass('weui-actionsheet_toggle');
349-
mask.show().focus().addClass('actionsheet__mask_show').one('click', function () {
350-
hideActionSheet(weuiActionsheet, mask);
351-
});
352-
$('#actionsheet_cancel').one('click', function () {
353-
hideActionSheet(weuiActionsheet, mask);
354-
});
355-
weuiActionsheet.unbind('transitionend').unbind('webkitTransitionEnd');
356-
}
357-
})()
358-
},
359-
'#showAndroidActionSheet':{
360-
'click':function(){
361-
var $androidActionSheet = $('#weui-android-actionsheet');
362-
var $androidMask = $androidActionSheet.find('.weui-mask');
363-
$('#weui-android-actionsheet').fadeIn(200);
364-
$androidMask.one('click',function () {
365-
$androidActionSheet.fadeOut(200);
366-
});
367-
}
368-
}
369-
};
370333
pages.searchbar.events = {
371334
'#search_input':{
372335
focus:function(){

0 commit comments

Comments
 (0)