renren-security 列表页,点击某一行弹出详情

提问 1 658
然然
然然 2020-09-24
版本:renren-security 4.0 开发环境:
在生成表格的js里面写了超链接,如下: [pre] colModel: [ { label: '工程编号', name: 'proNo', index: 'pro_no', width: 80, formatter: function(item, index){ return item == null ? '' : '<a style="cursor: pointer;" href="javascript:;" @click="checkProItem">'+item+'</a>'; } }, { label: '工程名称', name: 'proName', index: 'pro_name', width: 80 }, { label: '年份', name: 'proYear', index: 'pro_year', width: 80 }, { label: '工程类型', name: 'proType', index: 'pro_type', width: 80, formatter: function(item, index){ return item == '01' ? '大修' : '配网'; }} ], [/pre] 在js的methods里面,也定义了checkProItem方法,如下: [pre] checkProItem: function(){ alert(0) layer.open({ type: 1, skin: 'layui-layer-molv', title: "工程详情", area: ['650px', '570px'], shadeClose: false, content: jQuery("#proItemLayer"), btn: ['返回'] }); }, [/pre] 但是,在页面上点击时没有反应,也没有alert,也就是没有进入checkProItem方法。 正确的方式应该怎样写?
回帖
  • 然然
    然然 (楼主)
    2020-09-24
    @Mark 看到了帖子:https://www.renren.io/detail/10110。问题已经解决。
    0 回复