From babf75504aa40aa4a9566965b05e059942f3fc00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B4=A4=E5=BF=83?= <3277200+sentsim@users.noreply.github.com> Date: Wed, 31 Aug 2022 00:49:26 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E5=89=94=E9=99=A4=20layedit=20=E5=86=85?= =?UTF-8?q?=E7=BD=AE=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layui.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/layui.js b/src/layui.js index d370be40..fb180859 100644 --- a/src/layui.js +++ b/src/layui.js @@ -54,7 +54,6 @@ ,laydate: 'laydate' //日期 ,laypage: 'laypage' //分页 ,laytpl: 'laytpl' //模板引擎 - ,layedit: 'layedit' //富文本编辑器 ,form: 'form' //表单集 ,upload: 'upload' //上传 ,dropdown: 'dropdown' //下拉菜单 From 2934ab0066e2054b89c2b11e8ad9b148ad578c62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B4=A4=E5=BF=83?= <3277200+sentsim@users.noreply.github.com> Date: Wed, 31 Aug 2022 01:05:30 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20version?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- src/layui.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index ab3aab79..e329ead2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "layui", - "version": "2.7.6", + "version": "2.8.0-beta.1", "description": "Classic modular Front-End UI library", "main": "dist/layui.js", "license": "MIT", diff --git a/src/layui.js b/src/layui.js index fb180859..adbc38df 100644 --- a/src/layui.js +++ b/src/layui.js @@ -15,7 +15,7 @@ } ,Layui = function(){ - this.v = '2.7.6'; // layui 版本号 + this.v = '2.8.0-beta.1'; // Layui 版本号 } //识别预先可能定义的指定全局对象 From 0d09448599414ffc8767f966b577b01699823652 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B4=A4=E5=BF=83?= <3277200+sentsim@users.noreply.github.com> Date: Wed, 31 Aug 2022 01:45:37 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20css=20=E5=8A=A0?= =?UTF-8?q?=E8=BD=BD=E8=B7=AF=E5=BE=84=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/code.js | 7 ++++++- src/modules/laydate.js | 17 ++++++++++++----- src/modules/layer.js | 9 ++++++--- 3 files changed, 24 insertions(+), 9 deletions(-) diff --git a/src/modules/code.js b/src/modules/code.js index 743a0471..47a1fc5d 100644 --- a/src/modules/code.js +++ b/src/modules/code.js @@ -96,4 +96,9 @@ layui.define(['lay', 'util'], function(exports){ }); }); -}).addcss('modules/code.css?v=3', 'skincodecss'); \ No newline at end of file +}); + +// 若为源码版,则自动加载该组件依赖的 css 文件 +if(!layui['layui.all']){ + layui.addcss('modules/code.css?v=3', 'skincodecss'); +} \ No newline at end of file diff --git a/src/modules/laydate.js b/src/modules/laydate.js index 2bf890f7..b76b1441 100644 --- a/src/modules/laydate.js +++ b/src/modules/laydate.js @@ -24,7 +24,7 @@ //外部调用 ,laydate = { - v: '5.3.1' //layDate 版本号 + v: '5.4.0' //layDate 版本号 ,config: { weekStart: 0, // 默认周日一周的开始 } //全局配置项 @@ -39,10 +39,17 @@ } // 主体 CSS 等待事件 - ,ready: function(fn){ - var cssname = 'laydate', ver = '' - ,path = (isLayui ? 'modules/' : 'css/') + 'laydate.css?v='+ laydate.v + ver; - isLayui ? layui.addcss(path, fn, cssname) : ready.link(path, fn, cssname); + ,ready: function(callback){ + var cssname = 'laydate'; + var ver = '' + var path = (isLayui ? 'modules/' : 'css/') + 'laydate.css?v='+ laydate.v + ver; + + isLayui ? ( + layui['layui.all'] + ? (typeof callback === 'function' && callback()) + : layui.addcss(path, callback, cssname) + ) : ready.link(path, callback, cssname); + return this; } } diff --git a/src/modules/layer.js b/src/modules/layer.js index f5a96ffd..141c1138 100644 --- a/src/modules/layer.js +++ b/src/modules/layer.js @@ -120,15 +120,18 @@ var layer = { return this; }, - //主体 CSS 等待事件 + // 主体 CSS 等待事件 ready: function(callback){ - var cssname = 'layer', ver = '' - ,path = (isLayui ? 'modules/' : 'css/') + 'layer.css?v='+ layer.v + ver; + var cssname = 'layer'; + var ver = ''; + var path = (isLayui ? 'modules/' : 'css/') + 'layer.css?v='+ layer.v + ver; + isLayui ? ( layui['layui.all'] ? (typeof callback === 'function' && callback()) : layui.addcss(path, callback, cssname) ) : ready.link(path, callback, cssname); + return this; }, From dd7c3ab33d9b881a167f6a33c0b9e5a5a0c158e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B4=A4=E5=BF=83?= <3277200+sentsim@users.noreply.github.com> Date: Wed, 31 Aug 2022 01:46:01 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20all=20=E7=A4=BA?= =?UTF-8?q?=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- examples/all.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/all.html b/examples/all.html index 44f0e9f0..5dfd61d8 100644 --- a/examples/all.html +++ b/examples/all.html @@ -5,7 +5,7 @@ 完整库使用 - layui - +