liuyg
2021-06-08 11af1c1f00ee900bfb988c884532cd27d7271ae6
widgets/searchL/Widget.js
@@ -63,9 +63,7 @@
               $('.searchLMain').hide();
            })
            $('.cloce').click(() => {
               $('.popup').css({'display': 'none'})
            })
         },
         closeToolBox: function (item) {
@@ -131,7 +129,8 @@
         },
         beginLayUi: function (data) {
            console.log(data)
            // data.push(...data)
            // console.log(data)
            layui.use(function () {
               var element = layui.element
                  , table = layui.table //表格
@@ -165,15 +164,15 @@
               });
               table.on('tool(test)', function(obj){ //注:tool 是工具条事件名,test 是 table 原始容器的属性 lay-filter="对应的值"
               table.on('tool(test)', function (obj) { //注:tool 是工具条事件名,test 是 table 原始容器的属性 lay-filter="对应的值"
                  var data = obj.data //获得当前行数据
                  ,layEvent = obj.event; //获得 lay-event 对应的值
                  if(layEvent === 'detail'){
                  //   layer.msg('查看操作');
                     , layEvent = obj.event; //获得 lay-event 对应的值
                  if (layEvent === 'detail') {
                     //   layer.msg('查看操作');
                  }
                  window.open("https://www.baidu.com");
                  console.log(obj)
                 });
               });
               table.render({
                  elem: '#test1'
@@ -202,17 +201,17 @@
                  , limit: 10 //每页默认显示的数量
               });
               table.on('tool(test1)', function(obj){ //注:tool 是工具条事件名,test 是 table 原始容器的属性 lay-filter="对应的值"
               table.on('tool(test1)', function (obj) { //注:tool 是工具条事件名,test 是 table 原始容器的属性 lay-filter="对应的值"
                  var data = obj.data //获得当前行数据
                  ,layEvent = obj.event; //获得 lay-event 对应的值
                  if(layEvent === 'detail'){
                  //   layer.msg('查看操作');
                     , layEvent = obj.event; //获得 lay-event 对应的值
                  if (layEvent === 'detail') {
                     //   layer.msg('查看操作');
                  }
                  $('.popup').css({'display': 'block'});
                  $('.p-main').eq(0).css({'display': 'block'}).siblings().css({'display': 'none'});
                  $('.jimu-widget-searchTabaPopup').css({ 'display': 'block' });
                  $('.jimu-widget-searchTabaPopup').find('.p-main').eq(0).css({ 'display': 'block' }).siblings().css({ 'display': 'none' });
                  console.log(obj)
                 });
               });
               table.render({
                  elem: '#test2'
                  // , url: './data'
@@ -240,16 +239,17 @@
                  , limit: 10 //每页默认显示的数量
               });
               table.on('tool(test2)', function(obj){ //注:tool 是工具条事件名,test 是 table 原始容器的属性 lay-filter="对应的值"
               table.on('tool(test2)', function (obj) { //注:tool 是工具条事件名,test 是 table 原始容器的属性 lay-filter="对应的值"
                  var data = obj.data //获得当前行数据
                  ,layEvent = obj.event; //获得 lay-event 对应的值
                  if(layEvent === 'detail'){
                  //   layer.msg('查看操作');
                     , layEvent = obj.event; //获得 lay-event 对应的值
                  if (layEvent === 'detail') {
                     //   layer.msg('查看操作');
                  }
                  $('.popup').css({'display': 'block'});
                  $('.p-main').eq(1).css({'display': 'block'}).siblings().css({'display': 'none'});
                  $('.jimu-widget-searchTabaPopup').css({ 'display': 'block' });
                  $('.jimu-widget-searchTabaPopup').find('.p-main').eq(1).css({ 'display': 'block' }).siblings().css({ 'display': 'none' });
                  console.log(obj)
                 });
               });
               //…
            });