From de0670ea88709640e112463a2926854c035f8b00 Mon Sep 17 00:00:00 2001 From: yutou Date: Wed, 19 May 2021 18:34:04 +0800 Subject: [PATCH] update --- web/html/body/nas/animrss.html | 46 ++++++++++++++++++---------------- web/html/body/nas/side.html | 9 +++++-- 2 files changed, 31 insertions(+), 24 deletions(-) diff --git a/web/html/body/nas/animrss.html b/web/html/body/nas/animrss.html index 7c1441c..3b43b91 100644 --- a/web/html/body/nas/animrss.html +++ b/web/html/body/nas/animrss.html @@ -19,7 +19,7 @@ -
+
@@ -192,7 +192,7 @@ }) layui.use(['layer', 'form', 'element', 'table'], function () { - var layer = layui.layer + let layer = layui.layer , form = layui.form , table = layui.table , element = layui.element; @@ -201,13 +201,31 @@ if (json.code === 0) { for (let index = 0; index < json.data.length; index++) { const ret = json.data[index]; - element.tabAdd('type', { + element.tabAdd('animType', { title: ret.title , content: '
' , id: ret.id }) } - element.tabChange('type', '1'); + element.on('tab(animType)', function (data) { + tabid = $(this).attr('lay-id') + table.render({ + elem: "#passwordlist" + tabid + , url: '/anim/rss/list.do?type=' + tabid + , page: true + , cols: [[ + {field: "id", title: "id", width: 80, sort: true, fixed: 'left'} + , {field: 'title', title: '标题',edit:'text'} + , {field: 'categories', title: '类型'} + , {field: 'author', title: '字幕组'} + , {field: 'titlekey', title: '搜索关键词',edit:'text'} + , {field: 'enable', title: '状态',templet:'#animState'} + , {field: "right", toolbar: '#listTools'} + ]] + }); + }) + element.tabChange('animType', '1'); + } }); let rssList = table.render({ @@ -226,24 +244,8 @@ ]] }) form.render() - element.on('tab(type)', function (data) { - tabid = $(this).attr('lay-id') - table.render({ - elem: "#passwordlist" + tabid - , url: '/anim/rss/list.do?type=' + tabid - , page: true - , cols: [[ - {field: "id", title: "id", width: 80, sort: true, fixed: 'left'} - , {field: 'title', title: '标题',edit:'text'} - , {field: 'categories', title: '类型'} - , {field: 'author', title: '字幕组'} - , {field: 'titlekey', title: '搜索关键词',edit:'text'} - , {field: 'enable', title: '状态',templet:'#animState'} - , {field: "right", toolbar: '#listTools'} - ]] - }); - }) - element.on('tabDelete(type)', function (data) { + + element.on('tabDelete(animType)', function (data) { let name = $(data.elem.prevObject.prevObject[0]).text().replace("ဆ", "") let id = $(data.elem.prevObject.prevObject[0]).attr('lay-id') layer.open({ diff --git a/web/html/body/nas/side.html b/web/html/body/nas/side.html index aecb169..32908c7 100644 --- a/web/html/body/nas/side.html +++ b/web/html/body/nas/side.html @@ -1,12 +1,14 @@ - + + +
+ +