'
+ +'>'
+ function(){
var tplData = $.extend(true, {
LAY_COL: item3
@@ -1179,7 +1176,7 @@ layui.define(['lay', 'laytpl', 'laypage', 'form', 'util'], function(exports){
var checkName = table.config.checkName;
var disabledName = table.config.disabledName;
- //渲染不同风格的列
+ // 渲染不同风格的列
switch(item3.type){
case 'checkbox': // 复选
return '
' + function(){
var totalRow = item3.totalRow || options.totalRow;
From 4870901d9265cb3803b5275338064c14f8655875 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=B4=A4=E5=BF=83?=
<3277200+sentsim@users.noreply.github.com>
Date: Fri, 1 Sep 2023 17:38:22 +0800
Subject: [PATCH 03/57] =?UTF-8?q?=E6=9B=B4=E6=AD=A3=20version=20=E6=9B=B4?=
=?UTF-8?q?=E6=96=B0=E6=97=A5=E5=BF=97=E4=B8=AD=E7=9A=84=E9=94=99=E5=88=AB?=
=?UTF-8?q?=E5=AD=97?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
docs/versions.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/versions.md b/docs/versions.md
index 80a0aca8..5c2b34cd 100644
--- a/docs/versions.md
+++ b/docs/versions.md
@@ -31,7 +31,7 @@ toc: true
- 修复 `data` 模式下排序之后出现节点结构错乱的问题 # 1358/I7TXXL
- 优化 `data.cascade` 属性,新增 `none` 可选值,即操作节点时不做任何联动 # 1358
- 优化 数据项为禁用状态时的全选复选框的状态 # 1329
- - 优化 异步加载字节点为空时的展开状态 # 1326
+ - 优化 异步加载子节点为空时的展开状态 # 1326
- #### laydate
- 优化 `shortcuts.value` 快捷选项的赋值属性,支持函数类型 # 1324
- #### rate
From 9024d2e496086f891061a883a2cd98c3ec943e41 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=B4=A4=E5=BF=83?=
<3277200+sentsim@users.noreply.github.com>
Date: Fri, 1 Sep 2023 17:38:56 +0800
Subject: [PATCH 04/57] =?UTF-8?q?=E4=BC=98=E5=8C=96=20=E9=83=A8=E5=88=86?=
=?UTF-8?q?=E6=A0=B7=E5=BC=8F=EF=BC=8C=E4=BB=A5=E9=80=82=E9=85=8D=20IE8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/css/layui.css | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/css/layui.css b/src/css/layui.css
index 7b568357..a3f7722b 100644
--- a/src/css/layui.css
+++ b/src/css/layui.css
@@ -796,8 +796,8 @@ a cite{font-style: normal; *cursor:pointer;}
.layui-input-wrap .layui-input-number{width: 24px; padding: 0;}
.layui-input-wrap .layui-input-number .layui-icon{position: absolute; right: 0; width: 100%; height: 50%; line-height: normal; font-size: 12px;}
.layui-input-wrap .layui-input-number .layui-icon:before{position: absolute; left: 50%; top: 50%; margin-top: -6px; margin-left: -6px;}
-.layui-input-wrap .layui-input-number .layui-icon:first-child{top: 0; border-bottom: 1px solid #eee;}
-.layui-input-wrap .layui-input-number .layui-icon:last-child{bottom: 0;}
+.layui-input-wrap .layui-input-number .layui-icon-up{top: 0; border-bottom: 1px solid #eee;}
+.layui-input-wrap .layui-input-number .layui-icon-down{bottom: 0;}
.layui-input-wrap .layui-input-number .layui-icon:hover{font-weight: 700;}
.layui-input-wrap .layui-input[type="number"]::-webkit-outer-spin-button,
.layui-input-wrap .layui-input[type="number"]::-webkit-inner-spin-button{-webkit-appearance: none !important;}
@@ -1287,7 +1287,7 @@ select.layui-table-edit{padding: 0 0 0 10px; border-color: #d2d2d2;}
/* 导航浅色背景 */
.layui-nav.layui-bg-gray .layui-nav-item a,
-.layui-nav-tree.layui-bg-gray a{color: rgba(0,0,0,.8);}
+.layui-nav-tree.layui-bg-gray a{color: #373737; color: rgba(0,0,0,.8);}
.layui-nav-tree.layui-bg-gray{padding: 6px 0;}
.layui-nav-tree.layui-bg-gray .layui-nav-itemed>a{color: #000 !important;}
.layui-nav.layui-bg-gray .layui-this a{color: #16b777;}
From 352cbe26133de7e96303cadf165b0d1731e879c9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=B4=A4=E5=BF=83?=
<3277200+sentsim@users.noreply.github.com>
Date: Fri, 1 Sep 2023 17:40:10 +0800
Subject: [PATCH 05/57] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20`Array.indexof()`=20?=
=?UTF-8?q?=E5=9C=A8=20ie8=20=E4=B8=8B=E7=9A=84=E5=85=BC=E5=AE=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/modules/lay.js | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/src/modules/lay.js b/src/modules/lay.js
index 550ca47c..dadec147 100644
--- a/src/modules/lay.js
+++ b/src/modules/lay.js
@@ -27,6 +27,21 @@
that.push(elem[index]);
});
};
+
+ /*
+ * API 兼容
+ */
+ Array.prototype.indexOf = Array.prototype.indexOf || function(searchElement, fromIndex) {
+ var rst = -1;
+ fromIndex = fromIndex || 0;
+ layui.each(this, function(index, val){
+ if (searchElement === val && index >= fromIndex) {
+ rst = index;
+ return !0;
+ }
+ });
+ return rst;
+ };
/*
lay 对象操作
From 4517ec7864d650d26188b5b66d2c8323f70f2bda Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=B4=A4=E5=BF=83?=
<3277200+sentsim@users.noreply.github.com>
Date: Fri, 1 Sep 2023 23:44:10 +0800
Subject: [PATCH 06/57] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20`lay.clipboard.write?=
=?UTF-8?q?Text()`=20=E6=96=B9=E6=B3=95=EF=BC=8C=E7=94=A8=E4=BA=8E?=
=?UTF-8?q?=E5=86=99=E5=85=A5=E5=89=AA=E5=88=87=E6=9D=BF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/modules/lay.js | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/src/modules/lay.js b/src/modules/lay.js
index dadec147..99963200 100644
--- a/src/modules/lay.js
+++ b/src/modules/lay.js
@@ -309,6 +309,37 @@
return matched;
};
+ // 剪切板
+ lay.clipboard = {
+ // 写入文本
+ writeText: function(options) {
+ var text = String(options.text);
+
+ try {
+ navigator.clipboard.writeText(text).then(
+ options.done
+ ).catch(options.error);
+ } catch(e) {
+ var elem = document.createElement('textarea');
+
+ elem.value = text;
+ elem.style.position = 'absolute';
+ elem.style.opacity = '0';
+ document.body.appendChild(elem);
+ elem.select();
+
+ try {
+ document.execCommand('copy');
+ typeof options.done === 'function' && options.done();
+ } catch(err) {
+ typeof options.error === 'function' && options.error(err);
+ }
+
+ elem.remove();
+ }
+ }
+ };
+
/*
* lay 元素操作
From 5b564534899e879002bbae299f9891c4ea476b41 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=B4=A4=E5=BF=83?=
<3277200+sentsim@users.noreply.github.com>
Date: Fri, 1 Sep 2023 23:45:00 +0800
Subject: [PATCH 07/57] =?UTF-8?q?=E4=BC=98=E5=8C=96=20code=20=E5=A4=8D?=
=?UTF-8?q?=E5=88=B6=E4=BB=A3=E7=A0=81=EF=BC=8C=E7=BB=9F=E4=B8=80=E9=87=87?=
=?UTF-8?q?=E7=94=A8=20`lay.clipboard.writeText()`?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/modules/code.js | 29 +++++++++++------------------
1 file changed, 11 insertions(+), 18 deletions(-)
diff --git a/src/modules/code.js b/src/modules/code.js
index 2a9dd4ce..bb003ae2 100644
--- a/src/modules/code.js
+++ b/src/modules/code.js
@@ -104,27 +104,20 @@ layui.define(['lay', 'util', 'element', 'form'], function(exports){
className: 'file-b',
title: ['复制代码'],
event: function(el, type){
- var text = util.unescape(finalCode);
- try {
- navigator.clipboard.writeText(text).then(function(){
+ var code = util.unescape(finalCode);
+
+ // 写入剪切板
+ lay.clipboard.writeText({
+ text: code,
+ done: function() {
layer.msg('已复制', {icon: 1});
- });
- } catch(e) {
- var textarea = document.createElement('textarea');
- textarea.value = text;
- textarea.style.position = 'absolute';
- textarea.style.opacity = '0';
- document.body.appendChild(textarea);
- textarea.select();
- try {
- document.execCommand('copy');
- layer.msg('已复制', {icon: 1});
- } catch(err) {
+ },
+ error: function() {
layer.msg('复制失败', {icon: 2});
}
- textarea.remove();
- }
- typeof options.onCopy === 'function' && options.onCopy(text);
+ });
+
+ typeof options.onCopy === 'function' && options.onCopy(code);
}
}
};
From 5e0d71ddc3c8563c97e44e1a6d3f4df706969a7d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=B4=A4=E5=BF=83?=
<3277200+sentsim@users.noreply.github.com>
Date: Sat, 2 Sep 2023 22:52:20 +0800
Subject: [PATCH 08/57] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20`layui-padding-*`=20?=
=?UTF-8?q?=E5=92=8C=20`layui-margin-*`=20=E5=86=85=E5=A4=96=E8=BE=B9?=
=?UTF-8?q?=E8=B7=9D=E6=A0=B7=E5=BC=8F=E7=B1=BB=E5=90=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/css/layui.css | 48 ++++++++++++++++++++++++++++++++++-------------
1 file changed, 35 insertions(+), 13 deletions(-)
diff --git a/src/css/layui.css b/src/css/layui.css
index a3f7722b..5fa04183 100644
--- a/src/css/layui.css
+++ b/src/css/layui.css
@@ -513,12 +513,37 @@ a cite{font-style: normal; *cursor:pointer;}
.layui-col-space32>*{padding: 16px;}
-/** 页面元素 **/
-.layui-btn, .layui-input, .layui-textarea, .layui-upload-button, .layui-select{outline: none; -webkit-appearance: none; transition: all .3s; -webkit-transition: all .3s; box-sizing: border-box;}
+/* 内边距 */
+.layui-padding-1{padding: 4px !important;}
+.layui-padding-2{padding: 8px !important;}
+.layui-padding-3{padding: 16px !important;}
+.layui-padding-4{padding: 32px !important;}
+.layui-padding-5{padding: 48px !important;}
-/* 引用 */.layui-elem-quote{margin-bottom: 10px; padding: 15px; line-height: 1.8; border-left: 5px solid #16b777; border-radius: 0 2px 2px 0; background-color: #fafafa;}
+/* 外边距 */
+.layui-margin-1{margin: 4px !important;}
+.layui-margin-2{margin: 8px !important;}
+.layui-margin-3{margin: 16px !important;}
+.layui-margin-4{margin: 32px !important;}
+.layui-margin-5{margin: 48px !important;}
+
+
+/*
+ * 页面元素
+ */
+
+.layui-btn,
+.layui-input,
+.layui-select,
+.layui-textarea,
+.layui-upload-button{outline: none; -webkit-appearance: none; transition: all .3s; -webkit-transition: all .3s; box-sizing: border-box;}
+
+/* 引用 */
+.layui-elem-quote{margin-bottom: 10px; padding: 15px; line-height: 1.8; border-left: 5px solid #16b777; border-radius: 0 2px 2px 0; background-color: #fafafa;}
.layui-quote-nm{border-style: solid; border-width: 1px; border-left-width: 5px; background: none;}
-/* 字段集合 */.layui-elem-field{margin-bottom: 10px; padding: 0; border-width: 1px; border-style: solid;}
+
+/* 字段集合 */
+.layui-elem-field{margin-bottom: 10px; padding: 0; border-width: 1px; border-style: solid;}
.layui-elem-field legend{margin-left: 20px; padding: 0 10px; font-size: 20px;}
.layui-field-title{margin: 16px 0; border-width: 0; border-top-width: 1px;}
.layui-field-box{padding: 15px;}
@@ -534,10 +559,8 @@ a cite{font-style: normal; *cursor:pointer;}
/*
-
- 面板
-
-*/
+ * 面板
+ */
/* 折叠面板 */
@@ -644,7 +667,7 @@ a cite{font-style: normal; *cursor:pointer;}
.layui-text blockquote:not(.layui-elem-quote){padding: 5px 15px; border-left: 5px solid #eee;}
.layui-text pre > code:not(.layui-code){padding: 15px; font-family: Courier New,Lucida Console,Consolas; background-color: #fafafa;}
-/* 字体大小及颜色 */
+/* 字体大小 */
.layui-font-12{font-size: 12px !important;}
.layui-font-13{font-size: 13px !important;}
.layui-font-14{font-size: 14px !important;}
@@ -658,6 +681,7 @@ a cite{font-style: normal; *cursor:pointer;}
.layui-font-30{font-size: 30px !important;}
.layui-font-32{font-size: 32px !important;}
+/* 字体颜色 */
.layui-font-red{color: #ff5722 !important;} /*赤*/
.layui-font-orange{color: #ffb800!important;} /*橙*/
.layui-font-green{color: #16baaa!important;} /*绿*/
@@ -670,10 +694,8 @@ a cite{font-style: normal; *cursor:pointer;}
/*
-
- 按钮
-
-*/
+ * 按钮
+ */
.layui-btn{display: inline-block; vertical-align: middle; height: 38px; line-height: 38px; border: 1px solid transparent; padding: 0 18px; background-color: #16baaa; color: #fff; white-space: nowrap; text-align: center; font-size: 14px; border-radius: 2px; cursor: pointer; -moz-user-select: none; -webkit-user-select: none; -ms-user-select: none;}
.layui-btn:hover{opacity: 0.8; filter:alpha(opacity=80); color: #fff;}
From 818bfb6466ce2f1a2bebb942b12065a221f1b761 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=B4=A4=E5=BF=83?=
<3277200+sentsim@users.noreply.github.com>
Date: Sat, 2 Sep 2023 23:45:00 +0800
Subject: [PATCH 09/57] =?UTF-8?q?=E5=8A=A0=E5=BC=BA=20code=20=E7=9A=84=20`?=
=?UTF-8?q?tools`=20=E5=92=8C=20`toolsEvent`=20=E5=B1=9E=E6=80=A7=EF=BC=8C?=
=?UTF-8?q?=E6=8F=90=E5=8D=87=E5=8F=AF=E6=89=A9=E5=B1=95=E6=80=A7?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/modules/code.js | 31 +++++++++++++++++++++++++++----
1 file changed, 27 insertions(+), 4 deletions(-)
diff --git a/src/modules/code.js b/src/modules/code.js
index bb003ae2..ad63b85e 100644
--- a/src/modules/code.js
+++ b/src/modules/code.js
@@ -210,14 +210,37 @@ layui.define(['lay', 'util', 'element', 'form'], function(exports){
elemToolbar.on('click', '>i', function(){
var oi = $(this);
var type = oi.data('type');
+
+ // 内部 tools event
tools[type] && typeof tools[type].event === 'function' && tools[type].event(oi, type);
- typeof options.toolsEvent === 'function' && options.toolsEvent(oi, type);
+
+ // 外部 tools event
+ typeof options.toolsEvent === 'function' && options.toolsEvent({
+ elem: oi,
+ type: type,
+ rawCode: codes.join(''), // 原始 code
+ finalCode: util.unescape(finalCode) // 最终 code
+ });
});
+
+ // 渲染工具栏
layui.each(options.tools, function(i, v){
- var className = (tools[v] && tools[v].className) || v;
- var title = (tools[v] && tools[v].title) || [''];
+ var viso = typeof v === 'object'; // 若为 object 值,则可自定义更多属性
+ var tool = viso ? v : (
+ tools[v] || {
+ className: v,
+ title: [v]
+ }
+ );
+
+ var className = tool.className || tool.type;
+ var title = tool.title || [''];
+ var type = viso ? ( tool.type || className ) : v;
+
+ if (!type) return;
+
elemToolbar.append(
- '
'
);
});
From 5a00d0a32f4d5a44144b0fe0136d8113cb10c090 Mon Sep 17 00:00:00 2001
From: morning-star
Date: Sun, 3 Sep 2023 08:20:41 +0800
Subject: [PATCH 10/57] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20lay.clipboard.writeT?=
=?UTF-8?q?ext=20IE8=20=E4=B8=8B=E6=8A=A5=E9=94=99=E7=9A=84=E9=97=AE?=
=?UTF-8?q?=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
修复 lay.clipboard.writeText IE8 下报错的问题,catch 是保留字
---
src/modules/lay.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/modules/lay.js b/src/modules/lay.js
index 99963200..a42e59ce 100644
--- a/src/modules/lay.js
+++ b/src/modules/lay.js
@@ -318,7 +318,7 @@
try {
navigator.clipboard.writeText(text).then(
options.done
- ).catch(options.error);
+ ).['catch'](options.error);
} catch(e) {
var elem = document.createElement('textarea');
From cc9cdeb03e99d7f6e19e30b6d653cdc2750fdb2a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=B4=A4=E5=BF=83?=
<3277200+sentsim@users.noreply.github.com>
Date: Sun, 3 Sep 2023 12:14:32 +0800
Subject: [PATCH 11/57] =?UTF-8?q?=E4=BC=98=E5=8C=96=20ie8=20`.remove()`=20?=
=?UTF-8?q?=E6=8A=A5=E9=94=99=E5=92=8C=E5=A4=8D=E5=88=B6=E6=97=B6=E6=BB=9A?=
=?UTF-8?q?=E5=8A=A8=E6=9D=A1=E7=BD=AE=E5=BA=95=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/modules/lay.js | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/src/modules/lay.js b/src/modules/lay.js
index a42e59ce..21d0b6a1 100644
--- a/src/modules/lay.js
+++ b/src/modules/lay.js
@@ -318,13 +318,16 @@
try {
navigator.clipboard.writeText(text).then(
options.done
- ).['catch'](options.error);
+ )['catch'](options.error);
} catch(e) {
var elem = document.createElement('textarea');
elem.value = text;
- elem.style.position = 'absolute';
+ elem.style.position = 'fixed';
elem.style.opacity = '0';
+ elem.style.top = '0px';
+ elem.style.left = '0px';
+
document.body.appendChild(elem);
elem.select();
@@ -333,9 +336,9 @@
typeof options.done === 'function' && options.done();
} catch(err) {
typeof options.error === 'function' && options.error(err);
+ } finally {
+ elem.remove ? elem.remove() : document.body.removeChild(elem);
}
-
- elem.remove();
}
}
};
From ad5e575b314942dda4805100fc2471d446d86081 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=9C=B0=E4=BA=9A=E5=B0=94-IT?=
<136627746+Diyar-IT@users.noreply.github.com>
Date: Sun, 3 Sep 2023 12:16:33 +0800
Subject: [PATCH 12/57] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=8F=82=E6=95=B0?=
=?UTF-8?q?=E5=92=8C=E5=8F=98=E4=B8=80=E8=87=B4=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/modules/upload.js | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/modules/upload.js b/src/modules/upload.js
index f2514fdc..3bc77163 100644
--- a/src/modules/upload.js
+++ b/src/modules/upload.js
@@ -87,7 +87,7 @@ layui.define(['lay','layer'], function(exports){
};
// 初始渲染
- Class.prototype.render = function(options){
+ Class.prototype.render = function(){
var that = this;
var options = that.config;
@@ -494,13 +494,13 @@ layui.define(['lay','layer'], function(exports){
};
//重置方法
- Class.prototype.reload = function(options){
+ Class.prototype.reload = function(opts){
options = options || {};
delete options.elem;
delete options.bindAction;
var that = this;
- var options = that.config = $.extend({}, that.config, upload.config, options);
+ var options = that.config = $.extend({}, that.config, upload.config, opts);
var next = options.elem.next();
//更新文件域相关属性
From 504e44ab4964b23c22e4c6f11fceb40dfd1951c0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=B4=A4=E5=BF=83?=
<3277200+sentsim@users.noreply.github.com>
Date: Sun, 3 Sep 2023 12:42:48 +0800
Subject: [PATCH 13/57] =?UTF-8?q?=E4=BC=98=E5=8C=96=20upload=20=E9=87=8D?=
=?UTF-8?q?=E8=BD=BD=E5=A4=84=E4=BB=A3=E7=A0=81=E7=BB=86=E8=8A=82?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/modules/upload.js | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/modules/upload.js b/src/modules/upload.js
index 3bc77163..41992d4c 100644
--- a/src/modules/upload.js
+++ b/src/modules/upload.js
@@ -493,17 +493,17 @@ layui.define(['lay','layer'], function(exports){
send();
};
- //重置方法
+ // 重置方法
Class.prototype.reload = function(opts){
- options = options || {};
- delete options.elem;
- delete options.bindAction;
+ opts = opts || {};
+ delete opts.elem;
+ delete opts.bindAction;
var that = this;
var options = that.config = $.extend({}, that.config, upload.config, opts);
var next = options.elem.next();
- //更新文件域相关属性
+ // 更新文件域相关属性
next.attr({
name: options.name,
accept: options.acceptMime,
From f52f13385e6ab782531a6bee7faf283d27265fe7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=B4=A4=E5=BF=83?=
<3277200+sentsim@users.noreply.github.com>
Date: Sun, 3 Sep 2023 12:49:49 +0800
Subject: [PATCH 14/57] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20table=20=E6=96=87?=
=?UTF-8?q?=E6=A1=A3=E9=A2=84=E7=95=99=E5=85=83=E7=B4=A0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
docs/table/index.md | 2 ++
1 file changed, 2 insertions(+)
diff --git a/docs/table/index.md b/docs/table/index.md
index 5336c86e..b81db3ff 100644
--- a/docs/table/index.md
+++ b/docs/table/index.md
@@ -11,6 +11,8 @@ toc: true
以下所有示例中演示的数据均为「静态模拟数据」,实际使用时换成您的真实接口即可。
+
+
{{- d.include("/table/detail/demo.md") }}
From 4822de817f56ba275ac12027e5fa09253be204e5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=B4=A4=E5=BF=83?=
<3277200+sentsim@users.noreply.github.com>
Date: Sun, 3 Sep 2023 12:49:59 +0800
Subject: [PATCH 15/57] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20layer=20=E6=96=87?=
=?UTF-8?q?=E6=A1=A3=E9=A2=84=E7=95=99=E5=85=83=E7=B4=A0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
docs/layer/detail/demo.md | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/docs/layer/detail/demo.md b/docs/layer/detail/demo.md
index 8aa37919..44ed95d4 100644
--- a/docs/layer/detail/demo.md
+++ b/docs/layer/detail/demo.md
@@ -6,6 +6,8 @@
+
+
弹层类型
@@ -98,4 +100,4 @@
### 小贴士
-> 事实上 layer 丰富的基础属性,可足够让您的弹出层变得千变万化,为了避免占用太多篇幅,就不做过多演示了。
\ No newline at end of file
+> 事实上 layer 丰富的基础属性,可足够让您的弹出层变得千变万化,为了避免占用太多篇幅,就不做过多演示了。
From 00ec787d510e0c57e599755db68a759b13f2dea4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=B4=A4=E5=BF=83?=
<3277200+sentsim@users.noreply.github.com>
Date: Sun, 3 Sep 2023 12:50:18 +0800
Subject: [PATCH 16/57] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20layer=20=E7=A4=BA?=
=?UTF-8?q?=E4=BE=8B=E5=9B=BE=E7=89=87=E5=9C=B0=E5=9D=80?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
docs/layer/examples/other.md | 8 ++++----
docs/layer/examples/type.md | 8 ++++----
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/docs/layer/examples/other.md b/docs/layer/examples/other.md
index 2d607b1e..86357152 100644
--- a/docs/layer/examples/other.md
+++ b/docs/layer/examples/other.md
@@ -64,7 +64,7 @@ layui.use(function(){
{
"alt": "浩瀚宇宙",
"pid": 5,
- "src": "https://unpkg.com/outeres/demo/outer-space.jpg",
+ "src": "https://unpkg.com/outeres@0.1.1/demo/outer-space.jpg",
}
]
},
@@ -80,17 +80,17 @@ layui.use(function(){
{
"alt": "layer",
"pid": 1,
- "src": "https://unpkg.com/outeres/demo/layer.png",
+ "src": "https://unpkg.com/outeres@0.1.1/demo/layer.png",
},
{
"alt": "壁纸",
"pid": 3,
- "src": "https://unpkg.com/outeres/demo/000.jpg",
+ "src": "https://unpkg.com/outeres@0.1.1/demo/000.jpg",
},
{
"alt": "浩瀚宇宙",
"pid": 5,
- "src": "https://unpkg.com/outeres/demo/outer-space.jpg",
+ "src": "https://unpkg.com/outeres@0.1.1/demo/outer-space.jpg",
}
]
}
diff --git a/docs/layer/examples/type.md b/docs/layer/examples/type.md
index 61ef7ba0..7e90e919 100644
--- a/docs/layer/examples/type.md
+++ b/docs/layer/examples/type.md
@@ -84,17 +84,17 @@ layui.use(function(){
{
"alt": "layer",
"pid": 1,
- "src": "https://unpkg.com/outeres/demo/layer.png",
+ "src": "https://unpkg.com/outeres@0.1.1/demo/layer.png",
},
{
"alt": "壁纸",
"pid": 3,
- "src": "https://unpkg.com/outeres/demo/000.jpg",
+ "src": "https://unpkg.com/outeres@0.1.1/demo/000.jpg",
},
{
"alt": "浩瀚宇宙",
"pid": 5,
- "src": "https://unpkg.com/outeres/demo/outer-space.jpg",
+ "src": "https://unpkg.com/outeres@0.1.1/demo/outer-space.jpg",
}
]
}
@@ -102,4 +102,4 @@ layui.use(function(){
}
});
});
-
\ No newline at end of file
+
From 597d689f23a8264d7f749d0ca7067f040a517ae9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=B4=A4=E5=BF=83?=
<3277200+sentsim@users.noreply.github.com>
Date: Sun, 3 Sep 2023 12:50:42 +0800
Subject: [PATCH 17/57] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20upload=20=E6=96=87?=
=?UTF-8?q?=E6=A1=A3=E9=A2=84=E7=95=99=E5=85=83=E7=B4=A0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
docs/upload/index.md | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/docs/upload/index.md b/docs/upload/index.md
index 95f8f7bc..0eab1777 100644
--- a/docs/upload/index.md
+++ b/docs/upload/index.md
@@ -11,6 +11,8 @@ toc: true
以下示例的部分上传接口由第三方网站 `https://httpbin.org` 提供,它可以模拟各类 HTTP 请求。若未配置上传接口的,每次上传都会报「请求上传接口出现异常」的提示,这属于正常现象。
+
+
{{- d.include("/upload/detail/demo.md") }}
@@ -122,4 +124,4 @@ inst.reload({
- 自建上传服务。在服务端配置 `CORS` 开启跨资源共享。 即对接口所在的服务器设置 `Access-Control-Allow-Origin ` 相关 `header` 信息。
-- 第三方上传服务。如:阿里云、腾讯云等,只需按照不同平台对应的上传 SDK 进行操作即可。
\ No newline at end of file
+- 第三方上传服务。如:阿里云、腾讯云等,只需按照不同平台对应的上传 SDK 进行操作即可。
From 804244f868a40b3b72822ae712300338934edce9 Mon Sep 17 00:00:00 2001
From: morning-star <1453017105@qq.com>
Date: Sun, 3 Sep 2023 21:25:03 +0800
Subject: [PATCH 18/57] =?UTF-8?q?=E9=87=8D=E6=9E=84=20code=20=E7=BB=84?=
=?UTF-8?q?=E4=BB=B6=EF=BC=8C=E4=BB=A5=E6=9B=B4=E5=A5=BD=E5=9C=B0=E9=80=82?=
=?UTF-8?q?=E9=85=8D=E7=AC=AC=E4=B8=89=E6=96=B9=E8=AF=AD=E6=B3=95=E9=AB=98?=
=?UTF-8?q?=E4=BA=AE=E5=BA=93=20(#1352)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* 新增 code 组件 codeRender 选项
* 新增 code 组件 highlighter 和 lang 选项
* 优化 code 换行符正则表达式
* 调整 code 包裹结构
* 修复一些样式问题
* 修复一些样式问题
* 默认关闭 langMarker 选项, 优化边距
* 优化样式
* 修复开启 title 时行号错位的问题
* 优化 ie8 下样式
* 修复 IE8 下的一些问题
* 删除未使用的代码
* 删除不必要的常量
* 优化行号
---
src/css/modules/code.css | 43 +++++++++-----
src/modules/code.js | 124 +++++++++++++++++++++++++++------------
2 files changed, 112 insertions(+), 55 deletions(-)
diff --git a/src/css/modules/code.css b/src/css/modules/code.css
index e999b59d..cb798110 100644
--- a/src/css/modules/code.css
+++ b/src/css/modules/code.css
@@ -6,35 +6,37 @@
html #layuicss-skincodecss{display:none; position: absolute; width:1989px;}
/* 默认风格 */
-.layui-code-view{display: block; position: relative; margin: 11px 0; padding: 0; border: 1px solid #eee; border-left-width: 6px; background-color: #FAFAFA; color: #333; font-family: Courier New; font-size: 13px;}
+.layui-code-view{display: block; position: relative; margin: 11px 0; padding: 0 !important; border: 1px solid #eee; border-left-width: 6px; background-color: #FAFAFA; color: #333; font-family: 'Courier New'; font-size: 13px; white-space: pre; overflow: auto;}
+.layui-code-view.layui-code-line-numbers-mode{padding-left: 45px !important;}
.layui-code-title{position: relative; padding: 0 10px; height: 40px; line-height: 40px; border-bottom: 1px solid #eee; font-size: 12px;}
.layui-code-title > .layui-code-about{position: absolute; right: 10px; top: 0; color: #B7B7B7;}
+.layui-code-line-numbers-mode .layui-code-title{margin-left: -45px;}
+.layui-code-title ~ .layui-code-line-numbers{margin-top: 40px;}
.layui-code-about > a{padding-left: 10px;}
-.layui-code-view > .layui-code-ol,
-.layui-code-view > .layui-code-ul{max-height: 100%; padding: 0 !important; position: relative; overflow: auto;}
-.layui-code-view > .layui-code-ol > li{position: relative; margin-top: 0 !important; margin-left: 45px !important; line-height: 20px; padding: 0 10px !important; border-left: 1px solid #e2e2e2; list-style-type: decimal-leading-zero; *list-style-type: decimal; background-color: #fff;}
-.layui-code-view > .layui-code-ol > li:first-child,
-.layui-code-view > .layui-code-ul > li:first-child{padding-top: 10px !important;}
-.layui-code-view > .layui-code-ol > li:last-child,
-.layui-code-view > .layui-code-ul > li:last-child{padding-bottom: 10px !important;}
-.layui-code-view > .layui-code-ul > li{position: relative; line-height: 20px; padding: 0 10px !important; list-style-type: none; *list-style-type: none; background-color: #fff;}
+.layui-code-view > .layui-code-lines{display:block; max-height: 100%; padding: 15px 10px !important; position: relative;background-color: #fff;font-family: 'Courier New'}
+.layui-code-view > .layui-code-lines > .layui-code-line{position: relative; display: block; line-height: 20px;}
.layui-code-view pre{margin: 0;}
+.layui-code-line-numbers{position: absolute;top: 0;bottom: 0;left: 0;width: 45px; border-right: 1px solid #e2e2e2; text-align: center; padding: 15px 0; line-height: 20px; user-select: none;}
+.layui-code-line-number{display: block;}
+.layui-code-lang-marker{position: absolute; top: 2px; right: 11px; color: currentColor;}
+.layui-code-view:hover > .layui-code-lang-marker{display: none;}
/* 深色风格 */
.layui-code-dark{border: 1px solid #0C0C0C; border-left-color: #3F3F3F; background-color: #0C0C0C; color: #C2BE9E}
.layui-code-dark > .layui-code-title{border-bottom: none;}
-.layui-code-dark > .layui-code-ol > li,
-.layui-code-dark > .layui-code-ul > li{background-color: #3F3F3F; border-left: none;}
-.layui-code-dark > .layui-code-ul > li{margin-left: 6px;}
+.layui-code-dark > .layui-code-lines{background-color: #3F3F3F !important; border-left: none !important;}
+.layui-code-dark > .layui-code-lines{margin-left: 6px;}
+.layui-code-dark.layui-code-line-numbers-mode > .layui-code-lines{margin-left: 0;}
/* 代码预览 */
.layui-code textarea{display: none;}
-.layui-code-preview > .layui-code{margin: 0;}
+.layui-code-preview > .layui-code,
+.layui-code-preview > .layui-code-view{margin: 0;}
.layui-code-preview > .layui-tab{position: relative; z-index: 1; margin-bottom: 0;}
.layui-code-preview > .layui-tab > .layui-tab-title{border-bottom: none;}
.layui-code-preview > .layui-code > .layui-code-title{display: none;}
.layui-code-preview .layui-code-item{display: none;}
-.layui-code-preview .layui-code-view > .layui-code-ol > li{}
+.layui-code-preview .layui-code-view > .layui-code-lines > .layui-code-line{}
.layui-code-item-preview{position: relative; padding: 16px; overflow: auto;}
.layui-code-item-preview > iframe{position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none;}
@@ -56,5 +58,14 @@ html #layuicss-skincodecss{display:none; position: absolute; width:1989px;}
.layui-code-full{position: fixed; left: 0; top: 0; z-index: 1111111; width: 100%; height: 100%; background-color: #fff;}
.layui-code-full .layui-code-item{width: 100% !important; border-width: 0 !important; border-top-width: 1px !important;}
.layui-code-full .layui-code-item,
-.layui-code-full .layui-code-ol,
-.layui-code-full .layui-code-ul{height: calc(100vh - 51px) !important; box-sizing: border-box;}
+.layui-code-full .layui-code-view{max-height: calc(100vh - 51px) !important; box-sizing: border-box;}
+
+/* 代码高亮重置 */
+.layui-code-view[class*=language-]{
+ font-size: 13px !important;
+ line-height: 20px !important;
+}
+.layui-code-view[class*=language-] > .layui-code-lines,
+.layui-code-view[class*=language-] > .layui-code-line-numbers{
+ background-color: transparent;
+}
diff --git a/src/modules/code.js b/src/modules/code.js
index ad63b85e..f437f96e 100644
--- a/src/modules/code.js
+++ b/src/modules/code.js
@@ -1,11 +1,11 @@
/**
- * code
+ * code
* Code 预览组件
*/
-
+
layui.define(['lay', 'util', 'element', 'form'], function(exports){
"use strict";
-
+
var $ = layui.$;
var util = layui.util;
var element = layui.element;
@@ -21,7 +21,10 @@ layui.define(['lay', 'util', 'element', 'form'], function(exports){
ELEM_FULL: 'layui-code-full',
ELEM_PREVIEW: 'layui-code-preview',
ELEM_ITEM: 'layui-code-item',
- ELEM_SHOW: 'layui-show'
+ ELEM_SHOW: 'layui-show',
+ ELEM_LINE: 'layui-code-line',
+ ELEM_LINES: 'layui-code-lines',
+ ELEM_LINE_NUMBERS_MODE: 'layui-code-line-numbers-mode',
};
// 默认参数项
@@ -35,14 +38,21 @@ layui.define(['lay', 'util', 'element', 'form'], function(exports){
// 默认文本
text: {
code: util.escape('>'),
- preview: 'Preview'
- }
+ preview: 'Preview',
+ },
+ lang: 'text', // 指定语言类型
+ highlighter: false, // 是否开启语法高亮,'prism','hljs','shiki'
+ langMarker: false, // 代码区域是否显示语言类型标记
};
+ var trimEnd = function(str){
+ return String(str).replace(/\s+$/, '');
+ }
+ // 保留首行缩进
var trim = function(str){
- return $.trim(str).replace(/^\n|\n$/, '');
+ return trimEnd(str).replace(/^\n|\n$/, '');
};
-
+
// export api
exports('code', function(options){
var opts = options = $.extend(true, {}, config, options);
@@ -62,36 +72,40 @@ layui.define(['lay', 'util', 'element', 'form'], function(exports){
var value = othis.attr('lay-'+ attr);
if(typeof value === 'string'){
obj[attr] = value;
- }
+ }
})
return obj;
}({}));
+ // codeRender 需要关闭编码
+ // 未使用 codeRender 时若开启了预览,则强制开启编码
+ options.encode = (options.encode || options.preview) && !options.codeRender;
+
// 最终显示的代码
var finalCode;
// 获得初始代码
- var codes = othis.data('code') || function(){
+ var rawCode = othis.data('code') || function(){
var arr = [];
var textarea = othis.children('textarea');
-
+
// 若内容放置在 textarea 中
textarea.each(function(){
arr.push(trim(this.value));
});
-
+
// 内容直接放置在元素外层
if(arr.length === 0){
arr.push(trim(othis.html()));
}
-
+
return arr;
}();
- othis.data('code', codes);
+ othis.data('code', rawCode);
// code
- var html = finalCode = codes.join('');
+ var html = finalCode = rawCode.join('');
// 外部重新解析 code
if(typeof options.codeParse === 'function'){
@@ -127,13 +141,13 @@ layui.define(['lay', 'util', 'element', 'form'], function(exports){
var FILTER_VALUE = 'LAY-CODE-DF-'+ index;
var layout = options.layout || ['code', 'preview'];
var isIframePreview = options.preview === 'iframe';
-
+
// 追加 Tab 组件
var elemView = $('');
var elemTabView = $('
');
var elemHeaderView = $('
');
var elemPreviewView = $('
');
@@ -146,9 +160,6 @@ layui.define(['lay', 'util', 'element', 'form'], function(exports){
elemView.addClass(options.className);
elemTabView.attr('lay-filter', FILTER_VALUE);
- // 若开启预览,则强制对 code 进行编码
- options.encode = true;
-
// 标签头
layui.each(layout, function(i, v){
var li = $('
');
@@ -218,7 +229,7 @@ layui.define(['lay', 'util', 'element', 'form'], function(exports){
typeof options.toolsEvent === 'function' && options.toolsEvent({
elem: oi,
type: type,
- rawCode: codes.join(''), // 原始 code
+ rawCode: rawCode.join(''), // 原始 code
finalCode: util.unescape(finalCode) // 最终 code
});
});
@@ -253,7 +264,7 @@ layui.define(['lay', 'util', 'element', 'form'], function(exports){
options.tools && elemTabView.append(elemToolbar); // 追加工具栏
othis.wrap(elemView).addClass(CONST.ELEM_ITEM).before(elemTabView); // 追加标签结构
-
+
// 追加预览
if(isIframePreview){
elemPreviewView.html('');
@@ -265,7 +276,7 @@ layui.define(['lay', 'util', 'element', 'form'], function(exports){
if(isIframePreview && iframe){
iframe.srcdoc = finalCode;
} else {
- thisItemBody.html(codes.join(''));
+ thisItemBody.html(rawCode.join(''));
}
// 回调的返回参数
var params = {
@@ -301,7 +312,7 @@ layui.define(['lay', 'util', 'element', 'form'], function(exports){
var thisElem = $(data.elem).closest('.'+ CONST.ELEM_PREVIEW);
var elemItemBody = thisElem.find('.'+ CONST.ELEM_ITEM);
var thisItemBody = elemItemBody.eq(data.index);
-
+
elemItemBody.removeClass(CONST.ELEM_SHOW);
thisItemBody.addClass(CONST.ELEM_SHOW);
@@ -311,9 +322,7 @@ layui.define(['lay', 'util', 'element', 'form'], function(exports){
});
}
- // 有序或无序列表
- var listTag = options.ln ? 'ol' : 'ul';
- var listElem = $('<'+ listTag +' class="layui-code-'+ listTag +'">');
+ var listElem = $('
'); // 此处的闭合标签是为了兼容 IE8
// header
var headerElem = $('');
@@ -328,19 +337,42 @@ layui.define(['lay', 'util', 'element', 'form'], function(exports){
othis.addClass('layui-code-'+ options.skin);
}
-
+ // 高亮
+ if(options.highlighter) othis.addClass(options.highlighter + ' language-' + options.lang);
// 转义 HTML 标签
if(options.encode) html = util.escape(html); // 编码
- html = html.replace(/[\r\t\n]+/g, '
'); // 转义换行符
-
+
+ // code 转 html
+ if(typeof options.codeRender === 'function') html = options.codeRender(html, options);
+ var lines = html.split(/\r?\n/g);
+ html = (options.codeRender && !options.highlighter)
+ ? html
+ : $.map(lines, function(line){
+ return ['', (line || ' '), '
'].join(''); // 空行填充空格,以保证换行效果
+ }).join('')
+
// 生成列表
- othis.html(listElem.html('' + html + ''));
-
+ othis.html(listElem.html(html));
+
+ // 创建行号
+ if(options.ln) {
+ var lineNumbersCode = ['
']
+ layui.each(lines, function(index){
+ lineNumbersCode.push('' + util.digit(index + 1) +'.')
+ });
+ lineNumbersCode.push('
');
+ othis.addClass(CONST.ELEM_LINE_NUMBERS_MODE);
+ othis.append(lineNumbersCode.join(''));
+ othis.children('.layui-code-line-numbers').css({
+ height: listElem.height(),
+ })
+ }
+
// 创建 header
if(options.header && !othis.children('.'+ CONST.ELEM_TITLE)[0]){
headerElem.html((options.title || options.text.code) + (
- options.about
+ options.about
? '
' + options.about + '
'
: ''
));
@@ -355,16 +387,20 @@ layui.define(['lay', 'util', 'element', 'form'], function(exports){
// 按行数适配左边距
(function(autoIncNums){
if(autoIncNums > 0){
- listElem.css('margin-left', autoIncNums + 'px');
+ othis.css('margin-left', autoIncNums + 'px');
}
- })(Math.floor(listElem.find('li').length/100));
+ })(Math.floor(listElem.find('.' + CONST.ELEM_LINE).length/100));
// 限制 Code 最大高度
if(options.height){ // 兼容旧版本
- listElem.css('max-height', options.height);
+ othis.css('max-height', options.height);
}
// Code 内容区域样式
- listElem.attr('style', options.codeStyle);
+ if(options.codeStyle){
+ othis.attr('style', function(_, origVal){
+ return (origVal || '') + options.codeStyle;
+ });
+ }
// 是否开启代码复制
if(options.copy && !options.preview){
@@ -372,7 +408,7 @@ layui.define(['lay', 'util', 'element', 'form'], function(exports){
'
',
''].join(''));
var elemCopyHas = othis.children('.'+ CONST.ELEM_COPY);
- var isHeight = listElem[0].style.height || listElem[0].style.maxHeight;
+ var isHeight = othis[0].style.height || othis[0].style.maxHeight;
if(isHeight) elemCopy.addClass(CONST.ELEM_COPY + '-offset'); // 偏移
if(elemCopyHas[0]) elemCopyHas.remove(); // 移除旧的复制元素
@@ -384,8 +420,18 @@ layui.define(['lay', 'util', 'element', 'form'], function(exports){
});
}
+ // language marker
+ if(options.langMarker){
+ var elemMarker = $('
' + options.lang + '')
+ var isHeight = othis[0].style.height || othis[0].style.maxHeight;
+ var elemMarkerHas = othis.children("." + CONST.ELEM_MARKER);
+ if(isHeight) elemMarker.css('margin-right', '17px')
+ if(elemMarkerHas) elemMarkerHas.remove();
+ othis.append(elemMarker);
+ }
+
});
-
+
});
});
From 3d86a890b70dfab826681b17bf51658298d83dcd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=B4=A4=E5=BF=83?=
<3277200+sentsim@users.noreply.github.com>
Date: Mon, 4 Sep 2023 17:22:26 +0800
Subject: [PATCH 19/57] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20docs=20=E5=9C=A8?=
=?UTF-8?q?=E7=BA=BF=E6=B5=8B=E8=AF=95=E9=93=BE=E6=8E=A5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
docs/index.md | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/docs/index.md b/docs/index.md
index 2a510a62..c088bc6d 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -109,12 +109,12 @@ npm i layui
点击上方 `Preview` 标签可进行效果预览。
-
其他帮助
+
其他帮助
--
在线测试
--
深色主题 (社区贡献)
+-
在线测试
+-
深色主题 (社区贡献)
## 初识寄语
-> 愿 Layui 从此成为您得心应手的 Web 界面解决方案,化作您方寸屏幕前的亿万字节!
\ No newline at end of file
+> 愿 Layui 从此成为您得心应手的 Web 界面解决方案,化作您方寸屏幕前的亿万字节!
From b588b4c7657e9dda6b24834ffb1d488bc8a54668 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=B4=A4=E5=BF=83?=
<3277200+sentsim@users.noreply.github.com>
Date: Mon, 4 Sep 2023 17:23:00 +0800
Subject: [PATCH 20/57] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20table=20=E6=A8=A1?=
=?UTF-8?q?=E6=8B=9F=E6=95=B0=E6=8D=AE=E5=AD=97=E6=AE=B5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
examples/json/table/demo1.json | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/examples/json/table/demo1.json b/examples/json/table/demo1.json
index 39bee73e..9e1e38de 100644
--- a/examples/json/table/demo1.json
+++ b/examples/json/table/demo1.json
@@ -5,6 +5,7 @@
,"totalRow": {
"checkin": "777"
}
+ ,"data1": []
,"data": [{
"id": "10001"
,"username": "杜甫123"
@@ -129,4 +130,4 @@
,"checkin": "106"
,"joinTime": "2016-10-14"
}]
-}
\ No newline at end of file
+}
From 67f681982361630bedd861dfe8da6788af9074cf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=B4=A4=E5=BF=83?=
<3277200+sentsim@users.noreply.github.com>
Date: Mon, 4 Sep 2023 17:23:17 +0800
Subject: [PATCH 21/57] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20table=20=E6=B5=8B?=
=?UTF-8?q?=E8=AF=95=E7=94=A8=E4=BE=8B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
examples/table-test.html | 109 +++++++++++++++------------------------
1 file changed, 43 insertions(+), 66 deletions(-)
diff --git a/examples/table-test.html b/examples/table-test.html
index fa829c5a..dc1b4ffe 100644
--- a/examples/table-test.html
+++ b/examples/table-test.html
@@ -31,10 +31,8 @@
重载测试
-
+
+