This commit is contained in:
aqu415
2022-02-12 22:48:31 +08:00
parent 7e07f7fab6
commit cd1dfa1652
+8 -6
View File
@@ -56,13 +56,14 @@
const me = this
//执行一个laypage实例
laypage.render({
elem: 'page_bar' //注意,这里的 test1 是 ID,不用加 # 号
elem: me.opts.page_bar_elem //注意,这里的 test1 是 ID,不用加 # 号
, count: 50 //数据总数,从服务端得到
, limit: me.limit // 每页显示的条数。
});
},
// 合并属性
merge_obj: function (target, src) {
for (var o in src) {
for (let o in src) {
if (o in target) {
if (typeof target[o] === 'object' && Object.prototype.toString.call(target[o]).toLowerCase() === '[object object]' && !target[o].length) {
this.merge(target[o], src[o]);
@@ -79,15 +80,16 @@
$(function () {
// 初始化对象
const list_view = new listView({'s': 'p'})
list_view.init()
list_view.fetch_data()
const view = new listView({'page_bar_elem': 'page_bar'})
view.init()
view.fetch_data()
view.auto_page_bar()
// 绑定事件
$('#c_').click(function () {
const mind_name = $('#mind_name').val()
if (mind_name) {
list_view.fetch_data()
view.fetch_data()
} else {
layer.msg('请输入导图名称')
}