mirror of
https://gitee.com/apiadmin/ApiAdmin.git
synced 2025-04-06 03:58:00 +08:00
added 新增元素加载动画
This commit is contained in:
parent
edecf5db77
commit
f224c62b9e
@ -90,6 +90,7 @@ function refresh( url ) {
|
|||||||
if( data.data.tempType == 'table' ){
|
if( data.data.tempType == 'table' ){
|
||||||
$.getScript('/static/js/template/table.js', function (){
|
$.getScript('/static/js/template/table.js', function (){
|
||||||
$('#content').html($.buildTable(data.data));
|
$('#content').html($.buildTable(data.data));
|
||||||
|
$('#tableBox').hide().fadeIn(800);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
*/
|
*/
|
||||||
(function ($) {
|
(function ($) {
|
||||||
$.buildTable = function ( tableObj ) {
|
$.buildTable = function ( tableObj ) {
|
||||||
var tableHtml = '<div class="box"><div class="box-body">';
|
var tableHtml = '<div class="box" id="tableBox"><div class="box-body">';
|
||||||
if( tableObj.rightButton && tableObj.rightButton.length ){
|
if( tableObj.rightButton && tableObj.rightButton.length ){
|
||||||
tableObj.header.push({field:"action",info:"操作"});
|
tableObj.header.push({field:"action",info:"操作"});
|
||||||
}
|
}
|
||||||
@ -23,6 +23,11 @@
|
|||||||
return tableHtml;
|
return tableHtml;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建表格头部分
|
||||||
|
* @param tableObj
|
||||||
|
* @returns {string}
|
||||||
|
*/
|
||||||
function buildHeader( tableObj ) {
|
function buildHeader( tableObj ) {
|
||||||
var headerHtml = '<tr><th style="width: 10px"><input type="checkbox"></th>';
|
var headerHtml = '<tr><th style="width: 10px"><input type="checkbox"></th>';
|
||||||
$.each(tableObj.header, function (index, value) {
|
$.each(tableObj.header, function (index, value) {
|
||||||
@ -32,6 +37,11 @@
|
|||||||
return headerHtml;
|
return headerHtml;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建顶部功能按钮
|
||||||
|
* @param tableObj
|
||||||
|
* @returns {string}
|
||||||
|
*/
|
||||||
function buildTopButton( tableObj ) {
|
function buildTopButton( tableObj ) {
|
||||||
var topHtml = '<div class="btn-group margin-bottom">';
|
var topHtml = '<div class="btn-group margin-bottom">';
|
||||||
if( tableObj.topButton ){
|
if( tableObj.topButton ){
|
||||||
@ -50,6 +60,11 @@
|
|||||||
return topHtml;
|
return topHtml;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建数据部分
|
||||||
|
* @param tableObj
|
||||||
|
* @returns {string}
|
||||||
|
*/
|
||||||
function buildDataList( tableObj ) {
|
function buildDataList( tableObj ) {
|
||||||
var dataListHtml = '<tr><td><input type="checkbox"></td>';
|
var dataListHtml = '<tr><td><input type="checkbox"></td>';
|
||||||
$.each(tableObj.data, function (index, value) {
|
$.each(tableObj.data, function (index, value) {
|
||||||
@ -59,6 +74,11 @@
|
|||||||
return dataListHtml;
|
return dataListHtml;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建空数据表
|
||||||
|
* @param tableObj
|
||||||
|
* @returns {string}
|
||||||
|
*/
|
||||||
function buildEmptyTable( tableObj ) {
|
function buildEmptyTable( tableObj ) {
|
||||||
var emptyHtml = '<tr>';
|
var emptyHtml = '<tr>';
|
||||||
var spanNum = tableObj.header.length + 1;
|
var spanNum = tableObj.header.length + 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user