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>
|
<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 class="layui-tab-title">
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
@ -192,7 +192,7 @@
|
|||||||
})
|
})
|
||||||
|
|
||||||
layui.use(['layer', 'form', 'element', 'table'], function () {
|
layui.use(['layer', 'form', 'element', 'table'], function () {
|
||||||
var layer = layui.layer
|
let layer = layui.layer
|
||||||
, form = layui.form
|
, form = layui.form
|
||||||
, table = layui.table
|
, table = layui.table
|
||||||
, element = layui.element;
|
, element = layui.element;
|
||||||
@ -201,13 +201,31 @@
|
|||||||
if (json.code === 0) {
|
if (json.code === 0) {
|
||||||
for (let index = 0; index < json.data.length; index++) {
|
for (let index = 0; index < json.data.length; index++) {
|
||||||
const ret = json.data[index];
|
const ret = json.data[index];
|
||||||
element.tabAdd('type', {
|
element.tabAdd('animType', {
|
||||||
title: ret.title
|
title: ret.title
|
||||||
, content: '<table id="passwordlist' + ret.id + '" lay-filter="adminTable"></table>'
|
, content: '<table id="passwordlist' + ret.id + '" lay-filter="adminTable"></table>'
|
||||||
, id: ret.id
|
, 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({
|
let rssList = table.render({
|
||||||
@ -226,24 +244,8 @@
|
|||||||
]]
|
]]
|
||||||
})
|
})
|
||||||
form.render()
|
form.render()
|
||||||
element.on('tab(type)', function (data) {
|
|
||||||
tabid = $(this).attr('lay-id')
|
element.on('tabDelete(animType)', function (data) {
|
||||||
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) {
|
|
||||||
let name = $(data.elem.prevObject.prevObject[0]).text().replace("ဆ", "")
|
let name = $(data.elem.prevObject.prevObject[0]).text().replace("ဆ", "")
|
||||||
let id = $(data.elem.prevObject.prevObject[0]).attr('lay-id')
|
let id = $(data.elem.prevObject.prevObject[0]).attr('lay-id')
|
||||||
layer.open({
|
layer.open({
|
||||||
|
@ -1,12 +1,14 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" href="/layui/css/layui.css" media="all">
|
||||||
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="layui-side layui-bg-black" id='myside'>
|
<div class="layui-side layui-bg-black" id='myside'>
|
||||||
<div class="layui-side-scroll side-bg" id="myside_div">
|
<div class="layui-side-scroll side-bg" id="myside_div">
|
||||||
<!-- 左侧导航区域(可配合layui已有的垂直导航) -->
|
<!-- 左侧导航区域(可配合layui已有的垂直导航) -->
|
||||||
<ul class="layui-nav layui-nav-tree side-bg" lay-filter="test">
|
<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>
|
<a class="" href="javascript:;">本体管理</a>
|
||||||
<dl class="layui-nav-child">
|
<dl class="layui-nav-child">
|
||||||
<dd><a href="/html/body/nas/ip.html">查看IP</a></dd>
|
<dd><a href="/html/body/nas/ip.html">查看IP</a></dd>
|
||||||
@ -27,9 +29,12 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<script src="/layui/layui.js"></script>
|
||||||
|
<script src="/js/jquery-3.2.1.js"></script>
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
let mobile = layui.device().mobile;
|
let mobile = layui.device().mobile;
|
||||||
|
console.log(mobile)
|
||||||
if (mobile) {
|
if (mobile) {
|
||||||
|
|
||||||
$('#myside').removeClass('layui-side')
|
$('#myside').removeClass('layui-side')
|
||||||
|
Loading…
Reference in New Issue
Block a user