Skip to content

Commit

Permalink
修复全屏还有滚动条的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
su committed Jun 28, 2018
1 parent 68e6a6c commit 80eff5d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions laymd/laymd.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ layui.define(['jquery'], function(exports) {
].join(''));

//设置编辑框和预览框
EL.$body = $('body');
EL.$div.find('.layui-laymd-area').height(config.height);
EL.$textArea = EL.$div.find('textarea').attr('name', EL.$div.attr('name') || EL.$div.prop('id')).val(initValue);
EL.$iframe = EL.$div.find('iframe');
Expand Down Expand Up @@ -596,10 +597,12 @@ layui.define(['jquery'], function(exports) {
EL.$div.removeClass('layui-laymd-full');
element && $(element).text('↗');
EL.$div.find('i.laymd-tool-preview').show();
EL.$body.removeAttr('style');
} else {
EL.$div.addClass('layui-laymd-full');
element && $(element).text('↙');
EL.$div.find('i.laymd-tool-preview').hide();
EL.$body.attr('style', 'overflow: hidden;');
}
},
preview: function (event, element, EL, params) {
Expand Down

0 comments on commit 80eff5d

Please sign in to comment.