1
0
mirror of https://shylinux.com/x/volcanos synced 2025-04-25 16:58:06 +08:00

opt table.js

This commit is contained in:
shylinux 2020-02-19 12:38:37 +08:00
parent c3d8554e2c
commit dc30d7d4c0
2 changed files with 3 additions and 1 deletions

View File

@ -275,6 +275,8 @@ Volcanos("page", {help: "网页模块",
if (text.startsWith("http")) {return "<a href='"+text+"' target='_blank'>"+text+"</a>"} if (text.startsWith("http")) {return "<a href='"+text+"' target='_blank'>"+text+"</a>"}
text = text.replace(/\033\[31m/g, "<span style='color:#f00'>") text = text.replace(/\033\[31m/g, "<span style='color:#f00'>")
text = text.replace(/\033\[32m/g, "<span style='color:#0f0'>") text = text.replace(/\033\[32m/g, "<span style='color:#0f0'>")
text = text.replace(/\033\[36m/g, "<span style='color:#0ff'>")
text = text.replace(/\033\[1m/g, "<span style='font-weight:bold'>")
text = text.replace(/\033\[0m/g, "</span>") text = text.replace(/\033\[0m/g, "</span>")
text = text.replace(/\033\[m/g, "</span>") text = text.replace(/\033\[m/g, "</span>")
text = text.replace(/\\n/g, "<br>") text = text.replace(/\\n/g, "<br>")

View File

@ -1,7 +1,7 @@
Volcanos("onimport", {help: "导入数据", list: [], Volcanos("onimport", {help: "导入数据", list: [],
init: function(can, msg, cb, output, action, option) {output.innerHTML = ""; init: function(can, msg, cb, output, action, option) {output.innerHTML = "";
if (!msg.append || msg.append.length == 0) { if (!msg.append || msg.append.length == 0) {
var code = can.page.Append(can, output, [{view: ["code", "div", msg.Result()]}]).code; var code = can.page.Append(can, output, [{view: ["code", "div", can.page.Display(msg.Result())]}]).code;
return typeof cb == "function" && cb(msg), code; return typeof cb == "function" && cb(msg), code;
} }