liuyg
2021-06-16 8999472dde70a29ba3abb7ac6ddcf864835aefd1
搜索框调整 阻止操作按钮冒泡
2 files modified
26 ■■■■ changed files
libs/layui/layui/layui.js 4 ●●●● patch | view | raw | blame | history
widgets/searchL/Widget.js 22 ●●●● patch | view | raw | blame | history
libs/layui/layui/layui.js
@@ -8393,12 +8393,12 @@
                        })
                    }
                }), layui.stope(e)
            }), i.layBody.on("click", "*[lay-event]", function () {
        }), i.layBody.on("click", "*[lay-event]", function (event) {
                var e = t(this),
                    a = e.parents("tr").eq(0).data("index");
                layui.event.call(this, h, "tool(" + f + ")", v.call(this, {
                    event: e.attr("lay-event")
                })), i.setThisRowChecked(a)
            })), i.setThisRowChecked(a); layui.stope(event);//阻止冒泡
            }), i.layMain.on("scroll", function () {
                var e = t(this),
                    a = e.scrollLeft(),
widgets/searchL/Widget.js
@@ -392,6 +392,10 @@
                        });
                        table.on('row(test)', function (obj) {
                            that.goOnPosition([obj.data.lon, obj.data.lat], 1, obj.data);
                        });
                        table.on('tool(test)', function (obj) { //注:tool 是工具条事件名,test 是 table 原始容器的属性 lay-filter="对应的值"
                            var data = obj.data //获得当前行数据
                                , layEvent = obj.event; //获得 lay-event 对应的值
@@ -401,9 +405,6 @@
                            } else if (layEvent === 'edit') {
                                that.goOnPosition([obj.data.lon, obj.data.lat], 1, obj.data);
                            }
                        });
                        table.on('row(test)', function (obj) {
                            that.goOnPosition([obj.data.lon, obj.data.lat], 1, obj.data);
                        });
                    }
                    if (data1 != 1) {
@@ -480,9 +481,24 @@
                                that.goOnPosition([obj.data.lon, obj.data.lat], 2, obj.data);
                            }
                        });
                        table.on('row(test1)', function (obj) {
                            console.log(obj)
                            that.goOnPosition([obj.data.lon, obj.data.lat], 2, obj.data);
                        });
                        // $('.layui-table-col-special').click((e) => {
                        //     e.stopPropagation();
                        //     if(e.toElement.innerText == '视频'){
                        //     }else if(e.toElement.innerText == '定位'){
                        //     }
                        //     console.log(e.toElement.innerText);
                        // })
                        // $('#test').on('click', 'div[lay-id="test"] .layui-table-body tr', function () {
                        //     var obj = table.cache.conManager[parseInt($(this).attr('data-index'))];
                        //     console.log(obj)
                        // })
                    }
                    if (data2 != 1) {