fix(carousel): 修复切换按钮会触发 form 表单 submit 事件的问题 (#2059)

* fix(carousel): 修复切换按钮会触发form表单submit事件的问题

* Update src/modules/carousel.js

* Update src/modules/carousel.js

---------

Co-authored-by: huangzepeng <huangzepeng@excellence.com.cn>
Co-authored-by: 贤心 <3277200+sentsim@users.noreply.github.com>
This commit is contained in:
Pencil-hzp 2024-06-27 22:48:30 +08:00 committed by GitHub
parent 673dd19b34
commit 1e548d7c48
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -204,8 +204,8 @@ layui.define(['jquery', 'lay'], function(exports){
// 模板
var tplArrow = $([
'<button class="layui-icon '+ ELEM_ARROW +'" lay-type="sub">'+ (options.anim === 'updown' ? '&#xe619;' : '&#xe603;') +'</button>',
'<button class="layui-icon '+ ELEM_ARROW +'" lay-type="add">'+ (options.anim === 'updown' ? '&#xe61a;' : '&#xe602;') +'</button>'
'<button type="button" class="layui-icon '+ (options.anim === 'updown' ? 'layui-icon-up' : 'layui-icon-left') + ' ' + ELEM_ARROW +'" lay-type="sub"></button>',
'<button type="button" class="layui-icon '+ (options.anim === 'updown' ? 'layui-icon-down' : 'layui-icon-right') + ' ' + ELEM_ARROW +'" lay-type="add"></button>'
].join(''));
// 预设基础属性