1
0
mirror of https://shylinux.com/x/volcanos synced 2025-04-25 16:58:06 +08:00
This commit is contained in:
shaoying 2020-10-21 17:51:36 +08:00
parent a8b5196597
commit 0a35665fc4
2 changed files with 3 additions and 2 deletions

View File

@ -277,7 +277,7 @@ var page = Volcanos("page", {help: "网页模块",
}),
Display: function(text) {
if (text.startsWith("http") || text.startsWith("ftp")) {
if (text.startsWith("http://") || text.startsWith("https://") || text.startsWith("ftp://")) {
var ls = text.split(" ")
return "<a href='"+ls[0]+"' target='_blank'>"+ls[0]+"</a>"+ls.slice(1).join(" ")
}

View File

@ -62,6 +62,7 @@ Volcanos("onimport", {help: "导入数据", _init: function(can, msg, list, cb,
project: function(can, path, cb) { can.Option({path: path})
var msg = can.request({}); msg.Option("dir_root", path), msg.Option("dir_deep", "true")
can.run(msg._event, ["action", "dir", "./"], function(msg) { can.ui.project.innerHTML = ""
can.Status("文件数", msg.path.length)
can.onappend.tree(can, msg, "path", "/", can.ui.project, function(event, value) {
can.onimport.tabview(can, can.Option("path"), value.path)
}), typeof cb == "function" && cb()
@ -272,7 +273,7 @@ Volcanos("onaction", {help: "控件交互", list: [],
}, true)
},
})
Volcanos("onexport", {help: "导出数据", list: ["解析器", "文件名", "当前行", "跳转数", "标签数"],
Volcanos("onexport", {help: "导出数据", list: ["文件数", "解析器", "文件名", "当前行", "跳转数", "标签数"],
position: function(can, index, total) { total = total || can.max
return (parseInt(index))+"/"+parseInt(total)+" = "+parseInt((index)*100/total)+"%"
},