@@ -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 @@
-
+
+
+
+
+