From 8999472dde70a29ba3abb7ac6ddcf864835aefd1 Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Wed, 16 Jun 2021 15:26:04 +0800
Subject: [PATCH] 搜索框调整 阻止操作按钮冒泡

---
 widgets/searchL/Widget.js |   22 +++++++++++++++++++---
 1 files changed, 19 insertions(+), 3 deletions(-)

diff --git a/widgets/searchL/Widget.js b/widgets/searchL/Widget.js
index 4d092e7..61febf1 100644
--- a/widgets/searchL/Widget.js
+++ b/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) {
 

--
Gitblit v1.9.3