update
This commit is contained in:
parent
ef602e52bc
commit
de0670ea88
@ -19,7 +19,7 @@
|
||||
|
||||
|
||||
<button type="button" id="addType" class="layui-btn layui-btn-normal">新增分类</button>
|
||||
<div class="layui-tab" lay-filter="type" lay-allowclose="true">
|
||||
<div class="layui-tab" lay-filter="animType" lay-allowclose="true">
|
||||
<ul class="layui-tab-title">
|
||||
|
||||
</ul>
|
||||
@ -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: '<table id="passwordlist' + ret.id + '" lay-filter="adminTable"></table>'
|
||||
, 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({
|
||||
|
@ -1,12 +1,14 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<link rel="stylesheet" href="/layui/css/layui.css" media="all">
|
||||
</head>
|
||||
<body>
|
||||
<div class="layui-side layui-bg-black" id='myside'>
|
||||
<div class="layui-side-scroll side-bg" id="myside_div">
|
||||
<!-- 左侧导航区域(可配合layui已有的垂直导航) -->
|
||||
<ul class="layui-nav layui-nav-tree side-bg" lay-filter="test">
|
||||
<li class="layui-nav-item layui-nav-itemed">
|
||||
<li class="layui-nav-item">
|
||||
<a class="" href="javascript:;">本体管理</a>
|
||||
<dl class="layui-nav-child">
|
||||
<dd><a href="/html/body/nas/ip.html">查看IP</a></dd>
|
||||
@ -27,9 +29,12 @@
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<script src="/layui/layui.js"></script>
|
||||
<script src="/js/jquery-3.2.1.js"></script>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
let mobile = layui.device().mobile;
|
||||
console.log(mobile)
|
||||
if (mobile) {
|
||||
|
||||
$('#myside').removeClass('layui-side')
|
||||
|
Loading…
Reference in New Issue
Block a user