diff --git a/component/pear/modules/common.js b/component/pear/modules/common.js index d383608..6f1eac8 100644 --- a/component/pear/modules/common.js +++ b/component/pear/modules/common.js @@ -29,6 +29,17 @@ layui.define(['jquery', 'element','table'], function(exports) { return ids; } + /** + * 当前是否为与移动端 + * */ + this.isModile = function(){ + if ($(window).width() <= 768) { + return true; + } + return false; + } + + /** * 提交 json 数据 * @param data 提交数据 diff --git a/view/system/user.html b/view/system/user.html index 38288ea..def3343 100644 --- a/view/system/user.html +++ b/view/system/user.html @@ -201,7 +201,7 @@ type: 2, title: '新增', shade: 0.1, - area: ['500px', '400px'], + area: [common.isModile()?'100%':'500px', common.isModile()?'100%':'400px'], content: MODULE_PATH + 'add.html' }); }