Notice 关闭 false 问题
parent
5f1d4a080d
commit
8e525f5d6a
|
|
@ -13,12 +13,14 @@ layui.define(['table', 'jquery', 'element'], function (exports) {
|
||||||
//默认配置值
|
//默认配置值
|
||||||
var option = {
|
var option = {
|
||||||
elem: opt.elem,
|
elem: opt.elem,
|
||||||
url:opt.url,
|
url: opt.url ? opt.url : false,
|
||||||
height: opt.height,
|
height: opt.height,
|
||||||
data: opt.data,
|
data: opt.data,
|
||||||
click: opt.click
|
click: opt.click
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (option.url != false) {
|
||||||
|
|
||||||
option.data = getData(option.url);
|
option.data = getData(option.url);
|
||||||
|
|
||||||
var notice = createHtml(option);
|
var notice = createHtml(option);
|
||||||
|
|
@ -33,6 +35,7 @@ layui.define(['table', 'jquery', 'element'], function (exports) {
|
||||||
var form = $(this).attr("notice-form");
|
var form = $(this).attr("notice-form");
|
||||||
option.click(id, title, context, form);
|
option.click(id, title, context, form);
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
|
||||||
return new pearNotice(option);
|
return new pearNotice(option);
|
||||||
}
|
}
|
||||||
|
|
@ -86,7 +89,8 @@ layui.define(['table', 'jquery', 'element'], function (exports) {
|
||||||
|
|
||||||
$.each(item.children, function(i, note) {
|
$.each(item.children, function(i, note) {
|
||||||
|
|
||||||
noticeContent += '<div class="pear-notice-item" notice-form="'+note.form+'" notice-context="'+note.context+'" notice-title="'+note.title+'" notice-id="'+note.id+'">'+
|
noticeContent += '<div class="pear-notice-item" notice-form="' + note.form + '" notice-context="' + note.context +
|
||||||
|
'" notice-title="' + note.title + '" notice-id="' + note.id + '">' +
|
||||||
'<img src="' + note.avatar + '">' +
|
'<img src="' + note.avatar + '">' +
|
||||||
'<span>' + note.title + '</span>' +
|
'<span>' + note.title + '</span>' +
|
||||||
'<span>' + note.time + '</span>' +
|
'<span>' + note.time + '</span>' +
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue