色婷婷狠狠18禁久久YY,CHINESE性内射高清国产,国产女人18毛片水真多1,国产AV在线观看

jquery mobile云盤

夏志豪1年前7瀏覽0評論

隨著互聯網和移動平臺的發展,云盤的使用越來越廣泛,jquery mobile作為一種適用于移動設備的前端開發框架,也有很多應用于云盤的情況。

下面給大家介紹一下jquery mobile的云盤案例:

$(document).on('pageshow', '#root', function(event, ui) {
var rootFile = {
"name": "root",
"type": "folder",
"path": "/",
"modified": "2021-01-01",
"children": [
{
"name": "文檔",
"type": "folder",
"path": "/文檔",
"modified": "2021-01-02",
"children": [
{
"name": "word.docx",
"type": "file",
"path": "/文檔/word.docx",
"modified": "2021-01-03",
"size": "1024KB"
},
{
"name": "excel.xlsx",
"type": "file",
"path": "/文檔/excel.xlsx",
"modified": "2021-01-04",
"size": "2048KB"
}
]
},
{
"name": "圖片",
"type": "folder",
"path": "/圖片",
"modified": "2021-01-05",
"children": [
{
"name": "nature.jpg",
"type": "file",
"path": "/圖片/nature.jpg",
"modified": "2021-01-06",
"size": "512KB"
},
{
"name": "scenery.png",
"type": "file",
"path": "/圖片/scenery.png",
"modified": "2021-01-07",
"size": "256KB"
}
]
}
]
}
$("#fileList").empty();
$("#breadcrumb").empty();
var fileList = rootFile.children;
var breadcrumb = "";
breadcrumb += "
  • " + rootFile.name + "
  • "; $("#breadcrumb").append(breadcrumb); $.each(fileList, function(i, file) { var html = ""; if (file.type == "folder") { html += "
  • folder

    " + file.name + "

  • "; } else { html += "
  • file

    " + file.name + "

    " + file.modified + "

    " + file.size + "

  • "; } $("#fileList").append(html); }); });

    以上是jquery mobile的云盤案例代碼示例,提供了云盤的基本功能,包括文件夾和文件的展示,文件的打開和下載等等。開發者們可以根據自己需求進行二次開發。