mirror of
https://shylinux.com/x/icebergs
synced 2025-06-27 02:37:31 +08:00
opt some
This commit is contained in:
parent
3ce2b1ff2b
commit
58a38d095a
@ -90,7 +90,7 @@ func init() {
|
|||||||
SPIDE: {Name: SPIDE, Help: "蜘蛛侠", Value: kit.Data(kit.MDB_SHORT, "client.name")},
|
SPIDE: {Name: SPIDE, Help: "蜘蛛侠", Value: kit.Data(kit.MDB_SHORT, "client.name")},
|
||||||
},
|
},
|
||||||
Commands: map[string]*ice.Command{
|
Commands: map[string]*ice.Command{
|
||||||
SPIDE: {Name: "spide client.name action=raw,msg,save,cache method=GET,PUT,POST,DELETE url format=form,part,json,data,file arg auto 创建", Help: "蜘蛛侠", Action: map[string]*ice.Action{
|
SPIDE: {Name: "spide client.name action=raw,msg,save,cache method=GET,PUT,POST,DELETE url format=form,part,json,data,file arg 执行:button create", Help: "蜘蛛侠", Action: map[string]*ice.Action{
|
||||||
mdb.CREATE: {Name: "create name address", Help: "添加", Hand: func(m *ice.Message, arg ...string) {
|
mdb.CREATE: {Name: "create name address", Help: "添加", Hand: func(m *ice.Message, arg ...string) {
|
||||||
if arg[0] != "name" {
|
if arg[0] != "name" {
|
||||||
m.Option("name", arg[0])
|
m.Option("name", arg[0])
|
||||||
@ -301,7 +301,8 @@ func init() {
|
|||||||
|
|
||||||
case SPIDE_RAW:
|
case SPIDE_RAW:
|
||||||
if b, e := ioutil.ReadAll(res.Body); m.Assert(e) {
|
if b, e := ioutil.ReadAll(res.Body); m.Assert(e) {
|
||||||
m.Echo(string(b))
|
m.Echo(kit.Formats(kit.UnMarshal(string(b))))
|
||||||
|
// m.Echo(string(b))
|
||||||
}
|
}
|
||||||
|
|
||||||
case SPIDE_MSG:
|
case SPIDE_MSG:
|
||||||
|
@ -104,7 +104,7 @@ func init() {
|
|||||||
"log", "true", "err", "true",
|
"log", "true", "err", "true",
|
||||||
|
|
||||||
"md", "true", "license", "true", "makefile", "true",
|
"md", "true", "license", "true", "makefile", "true",
|
||||||
"ini", "true", "conf", "true", "toml", "true",
|
"ini", "true", "conf", "true", "toml", "true", "yaml", "true",
|
||||||
),
|
),
|
||||||
"plug", kit.Dict(
|
"plug", kit.Dict(
|
||||||
"s", kit.Dict(
|
"s", kit.Dict(
|
||||||
@ -135,6 +135,9 @@ func init() {
|
|||||||
"css", kit.Dict(
|
"css", kit.Dict(
|
||||||
SUFFIX, kit.Dict("{", COMMENT),
|
SUFFIX, kit.Dict("{", COMMENT),
|
||||||
),
|
),
|
||||||
|
"yaml", kit.Dict(
|
||||||
|
PREFIX, kit.Dict("#", COMMENT),
|
||||||
|
),
|
||||||
|
|
||||||
"md", kit.Dict(),
|
"md", kit.Dict(),
|
||||||
"makefile", kit.Dict(
|
"makefile", kit.Dict(
|
||||||
|
@ -174,7 +174,12 @@ func (b *Label) Draw(m *ice.Message, x, y int) Chart {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 输出
|
// 输出
|
||||||
if m.Option("compact") != "true" {
|
switch m.Option("compact") {
|
||||||
|
case "max":
|
||||||
|
item.Width = b.Width/len(line) - b.MarginX
|
||||||
|
case "true":
|
||||||
|
|
||||||
|
default:
|
||||||
item.Width = b.max[i]
|
item.Width = b.max[i]
|
||||||
}
|
}
|
||||||
item.Draw(m, left, top)
|
item.Draw(m, left, top)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user