From c6bf264fd5a4aaa4bbac63d84630e71f3587e517 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, 19 May 2023 17:42:34 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20upload=20=E5=9B=BE?= =?UTF-8?q?=E7=89=87=E7=B1=BB=E5=9E=8B=E7=9A=84=20`.svg`=20=E6=89=A9?= =?UTF-8?q?=E5=B1=95=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/upload.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/upload.js b/src/modules/upload.js index 78b972fc..23b51f4f 100644 --- a/src/modules/upload.js +++ b/src/modules/upload.js @@ -399,7 +399,7 @@ layui.define(['lay','layer'], function(exports){ break; default: //图片文件 layui.each(value, function(i, item){ - if(!RegExp('.\\.('+ (exts || 'jpg|png|gif|bmp|jpeg') +')$', 'i').test(escape(item))){ + if(!RegExp('.\\.('+ (exts || 'jpg|png|gif|bmp|jpeg|svg') +')$', 'i').test(escape(item))){ return check = true; } }); From 2de30ea10025764bcd51ee687bdc868b02dfcc99 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, 20 May 2023 23:59:08 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20table=20=E8=BE=B9?= =?UTF-8?q?=E6=A1=86=E7=9A=84=E6=B5=8B=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-border.html | 148 ++++++++++++++++++++++++++++++++ 1 file changed, 148 insertions(+) create mode 100644 examples/table-test-border.html diff --git a/examples/table-test-border.html b/examples/table-test-border.html new file mode 100644 index 00000000..850ec95e --- /dev/null +++ b/examples/table-test-border.html @@ -0,0 +1,148 @@ + + + + + + 表格边框测试 + + + + + + + +
+ 无统计、无分页 +
+ +
+ +
+ 有统计、无分页 +
+ +
+ +
+ 无统计、有分页 +
+ +
+ +
+ 有统计、有分页 +
+ +
+ + + + + From 28cebf9e4e1deee88a8f923dc71fb0167895cf4e Mon Sep 17 00:00:00 2001 From: sight <1453017105@qq.com> Date: Mon, 22 May 2023 00:42:30 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20form=20=E9=87=8D?= =?UTF-8?q?=E6=96=B0=E6=B8=B2=E6=9F=93=E6=97=B6=20checkbox=20=E8=87=AA?= =?UTF-8?q?=E5=AE=9A=E4=B9=89=E6=A8=A1=E7=89=88=E6=9C=AA=E6=AD=A3=E7=A1=AE?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/form.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/modules/form.js b/src/modules/form.js index 41428288..1c6ca300 100644 --- a/src/modules/form.js +++ b/src/modules/form.js @@ -690,6 +690,13 @@ layui.define(['lay', 'layer', 'util'], function(exports){ }())); var disabled = this.disabled; + if(!skins[skin]) skin = 'primary'; // 若非内置风格,则强制为默认风格 + var RE_CLASS = CLASS[skin] || CLASS.checkbox; + + // 替代元素 + var hasRender = othis.next('.' + RE_CLASS[0]); + hasRender[0] && hasRender.remove(); // 如果已经渲染,则Rerender + // 若存在标题模板,则优先读取标题模板 if(othis.next('[lay-checkbox]')[0]){ title = othis.next().html() || ''; @@ -697,14 +704,10 @@ layui.define(['lay', 'layer', 'util'], function(exports){ // 若为开关,则对 title 进行分隔解析 title = skin === 'switch' ? title.split('|') : [title]; - - if(!skins[skin]) skin = 'primary'; // 若非内置风格,则强制为默认风格 - var RE_CLASS = CLASS[skin] || CLASS.checkbox; if(typeof othis.attr('lay-ignore') === 'string') return othis.show(); // 替代元素 - var hasRender = othis.next('.' + RE_CLASS[0]); var reElem = $(['