From 93d0f8898768682e7e8aa4a572b55b00366b17fa Mon Sep 17 00:00:00 2001 From: harveyshao Date: Sun, 15 May 2022 23:29:44 +0800 Subject: [PATCH] opt vimer --- go.mod | 2 +- src/debug/go.mod | 2 +- src/hi/he.js | 35 ------------------------------ src/hi/hi.go | 20 ++++++----------- src/hi/hi.js | 11 ++++------ src/hi/hi.py | 1 + src/hi/hi.sh | 17 +++++++-------- src/hi/hi.shy | 32 +++++++++++++++++++++++++--- src/main.shy | 1 + src/website/hi.iml | 9 ++++---- src/website/hi.zml | 53 ++++++++++++---------------------------------- 11 files changed, 70 insertions(+), 113 deletions(-) delete mode 100644 src/hi/he.js diff --git a/go.mod b/go.mod index 2891983c..0a52dc41 100644 --- a/go.mod +++ b/go.mod @@ -11,7 +11,7 @@ require ( ) require ( - shylinux.com/x/ice v0.9.6 + shylinux.com/x/ice v0.9.7 shylinux.com/x/icebergs v1.2.4 shylinux.com/x/toolkits v0.5.9 ) diff --git a/src/debug/go.mod b/src/debug/go.mod index 2891983c..0a52dc41 100644 --- a/src/debug/go.mod +++ b/src/debug/go.mod @@ -11,7 +11,7 @@ require ( ) require ( - shylinux.com/x/ice v0.9.6 + shylinux.com/x/ice v0.9.7 shylinux.com/x/icebergs v1.2.4 shylinux.com/x/toolkits v0.5.9 ) diff --git a/src/hi/he.js b/src/hi/he.js deleted file mode 100644 index 5cb706ae..00000000 --- a/src/hi/he.js +++ /dev/null @@ -1,35 +0,0 @@ -Volcanos("onimport", {help: "导入数据", list: [ - {type: "button", name: "list"}, - {type: "button", name: "back"}, - {type: "button", name: "show"}, -], _init: function(can, msg, cb, target) { - if (msg.Length() == 0) { - msg.Push("hi", "hello") - msg.Push("he", "world") - msg.Echo("hello world") - } - can.onmotion.clear(can) - can.onappend.table(can, msg) - can.onappend.board(can, msg) - can.base.isFunc(cb) && cb(msg) -}}) -Volcanos("onaction", {help: "操作数据", list: ["show", "some"], - _trans: {show: "展示", some: "其它"}, - show: function(event, can) { var msg = can.request(event) - msg.Push("value", 200) - msg.Push("value", 300) - msg.Push("value", 300) - msg.Push("value", 300) - msg.Push("value", 400) - msg.Option("height", 400) - can.onappend._output(can.sup, msg, "/plugin/story/pie.js") - }, - some: function(event, can) { var msg = can.request(event) - msg.Push("hi", "hello") - msg.Push("hi", "hello") - msg.Push("hi", "hello") - msg.Push("hi", "hello") - msg.Push("hi", "hello") - can.onappend.table(can, msg) - }, -}) diff --git a/src/hi/hi.go b/src/hi/hi.go index e1a4f556..377b732b 100644 --- a/src/hi/hi.go +++ b/src/hi/hi.go @@ -2,27 +2,21 @@ package hi import ( "shylinux.com/x/ice" - "shylinux.com/x/icebergs/base/ctx" ) type hi struct { ice.Zone - list string `name:"list zone id auto insert" help:"示例"` + list string `name:"list zone id auto insert show" help:"示例"` } -func (h hi) Command(m *ice.Message, arg ...string) { - if !m.PodCmd(ctx.COMMAND, arg) { - m.Cmdy(ctx.COMMAND, arg) - } +func (s hi) Show(m *ice.Message, arg ...string) { + m.Echo("hello world") } -func (h hi) Run(m *ice.Message, arg ...string) { - if m.Right(arg) && !m.PodCmd(arg) { - m.Cmdy(arg) - } -} -func (h hi) List(m *ice.Message, arg ...string) { - h.Zone.List(m, arg...) + +func (s hi) List(m *ice.Message, arg ...string) { + s.Zone.List(m, arg...) + m.Echo("hello world") } func init() { ice.Cmd("web.code.hi.hi", hi{}) } diff --git a/src/hi/hi.js b/src/hi/hi.js index 8fe4eb95..41954ccd 100644 --- a/src/hi/hi.js +++ b/src/hi/hi.js @@ -1,7 +1,4 @@ -Volcanos("onimport", {help: "导入数据", list: [], _init: function(can, msg, cb, target) { - msg.Echo("hello world") - can.onmotion.clear(can) - can.onappend.table(can, msg) - can.onappend.board(can, msg) - can.base.isFunc(cb) && cb(msg) -}}, [""]) +Volcanos("onimport", {help: "导入数据", _init: function(can, msg) { + msg.Echo("hello world") + msg.Dump(can) +}}) \ No newline at end of file diff --git a/src/hi/hi.py b/src/hi/hi.py index e2c08566..be5a3a29 100644 --- a/src/hi/hi.py +++ b/src/hi/hi.py @@ -1 +1,2 @@ +print "hello world" print "hello world" \ No newline at end of file diff --git a/src/hi/hi.sh b/src/hi/hi.sh index 6b695fe4..e529eefc 100644 --- a/src/hi/hi.sh +++ b/src/hi/hi.sh @@ -1,13 +1,12 @@ #! /bin/sh -echo "*$#*" -echo "*$@*" -echo "*$**" +_list +echo + +_list hi +echo + +_list hi 1 +echo -date -uptime -uname echo "hello world" -echo "hello world" -echo "hello world" -env diff --git a/src/hi/hi.shy b/src/hi/hi.shy index de68b04d..25e0de6b 100644 --- a/src/hi/hi.shy +++ b/src/hi/hi.shy @@ -1,5 +1,31 @@ chapter "hi" -field "hi" web.code.hi.hi -field "hi" web.code.hi.hi -field "hi" web.code.hi.hi +chain ` +contexts + volcanos + volcanos + lib + page + panel + publish + icebergs + base + core + misc + toolkits +` ship.stroke-width 1 line.stroke-width 1 + +field cli.system + +field cli.qrcode + +chart sequence ` +fe be os hd +0 call 1 some 3 +0 call 1 some 3 +0 call 1 some 3 +0 call 1 some 3 +0 call 1 some 3 +` marginx 80 + +field cli.system diff --git a/src/main.shy b/src/main.shy index 3a87ae63..340c291e 100644 --- a/src/main.shy +++ b/src/main.shy @@ -36,3 +36,4 @@ field "趋势图" web.code.git.trend args `intshell` field "架构图" web.code.git.spide args `intshell` spark md README.md + diff --git a/src/website/hi.iml b/src/website/hi.iml index 3b94af5d..7cab9731 100644 --- a/src/website/hi.iml +++ b/src/website/hi.iml @@ -1,10 +1,6 @@ 系统 命令 - hi/hi.sh - hi/hi.shy - hi/hi.py - hi/hi.go - hi/hi.js + cli.system 环境 cli.runtime 开发 @@ -12,4 +8,7 @@ hi/hi.go 脚本 hi/hi.sh + hi/hi.shy + hi/hi.py + hi/hi.go hi/hi.js \ No newline at end of file diff --git a/src/website/hi.zml b/src/website/hi.zml index aa9e165b..5ec96949 100644 --- a/src/website/hi.zml +++ b/src/website/hi.zml @@ -1,40 +1,15 @@ -head - 基础配置 - 高级配置 - h1 - h2 - h3 - h4 - 导航配置 +left username -left style.width 240 - tabs - 地址 - 山东省 - 邹城市 - 济南市 - 青岛市 - 江苏省 - 徐州市 index cli.runtime - 南京市 index web.code.git.repos - 苏州 index cli.qrcode - 无锡 index web.code.git.trend args icebergs - 北京市 - 海淀区 index hi/hi.sh - 昌平区 index hi/hi.shy - 朝阳区 index hi/hi.py - 西城区 index hi/hi.go - 东城区 index hi/hi.js - 广东省 - 深圳市 - 宝安区 - 南山区 - 福田区 - 龙华区 - 茂名市 - 组件 - 列表 index cli.runtime - 卡片 index cli.qrcode - 数据 -main - + 系统 + 命令 index cli.system + 共享 index cli.qrcode + 代码 + 趋势 index web.code.git.trend args icebergs action auto + 状态 index web.code.git.status args icebergs + 脚本 + 终端 index hi/hi.sh + 文档 index hi/hi.shy + 数据 index hi/hi.py + 后端 index hi/hi.go + 前端 index hi/hi.js +main \ No newline at end of file