From 0a35665fc43b60e60d8ef5bab121d24507d24436 Mon Sep 17 00:00:00 2001 From: shaoying Date: Wed, 21 Oct 2020 17:51:36 +0800 Subject: [PATCH] opt some --- lib/page.js | 2 +- plugin/local/code/inner.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/page.js b/lib/page.js index 92fb1c8c..b296f921 100644 --- a/lib/page.js +++ b/lib/page.js @@ -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 ""+ls[0]+""+ls.slice(1).join(" ") } diff --git a/plugin/local/code/inner.js b/plugin/local/code/inner.js index fc77948e..ef131d9f 100644 --- a/plugin/local/code/inner.js +++ b/plugin/local/code/inner.js @@ -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)+"%" },