mirror of
https://shylinux.com/x/ContextOS
synced 2025-04-25 16:58:06 +08:00
mix branch 'master'
This commit is contained in:
commit
8e9999016b
@ -7,5 +7,5 @@ var version = struct {
|
|||||||
self int
|
self int
|
||||||
}{
|
}{
|
||||||
[]string{"2017-11-01 01:02:03", "2019-07-13 18:02:21"},
|
[]string{"2017-11-01 01:02:03", "2019-07-13 18:02:21"},
|
||||||
`2019-10-24 08:04:57`, `mac`, 652,
|
`2019-10-24 09:49:55`, `mac`, 653,
|
||||||
}
|
}
|
||||||
|
@ -232,7 +232,7 @@ var Index = &ctx.Context{Name: "mdb", Help: "数据中心",
|
|||||||
return
|
return
|
||||||
}},
|
}},
|
||||||
"show": &ctx.Command{Name: "show table fields...", Help: "查询数据, table: 表名, fields: 字段, where: 查询条件, group: 聚合字段, order: 排序字段",
|
"show": &ctx.Command{Name: "show table fields...", Help: "查询数据, table: 表名, fields: 字段, where: 查询条件, group: 聚合字段, order: 排序字段",
|
||||||
Form: map[string]int{"where": 1, "eq": 2, "in": 2, "like": 2, "begin": 2, "group": 1, "order": 1, "desc": 0, "limit": 1, "offset": 1, "other": -1},
|
Form: map[string]int{"where": 1, "eq": 2, "ne": 2, "in": 2, "like": 2, "begin": 2, "group": 1, "order": 1, "desc": 0, "limit": 1, "offset": 1, "other": -1},
|
||||||
Hand: func(m *ctx.Message, c *ctx.Context, key string, arg ...string) (e error) {
|
Hand: func(m *ctx.Message, c *ctx.Context, key string, arg ...string) (e error) {
|
||||||
if len(arg) == 0 {
|
if len(arg) == 0 {
|
||||||
m.Cmdy(".query", "show tables")
|
m.Cmdy(".query", "show tables")
|
||||||
@ -251,6 +251,9 @@ var Index = &ctx.Context{Name: "mdb", Help: "数据中心",
|
|||||||
for i := 0; i < len(m.Meta["eq"]); i += 2 {
|
for i := 0; i < len(m.Meta["eq"]); i += 2 {
|
||||||
where = append(where, fmt.Sprintf("%s='%s'", m.Meta["eq"][i], m.Meta["eq"][i+1]))
|
where = append(where, fmt.Sprintf("%s='%s'", m.Meta["eq"][i], m.Meta["eq"][i+1]))
|
||||||
}
|
}
|
||||||
|
for i := 0; i < len(m.Meta["ne"]); i += 2 {
|
||||||
|
where = append(where, fmt.Sprintf("%s!='%s'", m.Meta["ne"][i], m.Meta["ne"][i+1]))
|
||||||
|
}
|
||||||
for i := 0; i < len(m.Meta["in"]); i += 2 {
|
for i := 0; i < len(m.Meta["in"]); i += 2 {
|
||||||
where = append(where, fmt.Sprintf("%s in (%s)", m.Meta["in"][i], m.Meta["in"][i+1]))
|
where = append(where, fmt.Sprintf("%s in (%s)", m.Meta["in"][i], m.Meta["in"][i+1]))
|
||||||
}
|
}
|
||||||
|
@ -1035,7 +1035,7 @@ function Plugin(page, pane, field, inits, runs) {
|
|||||||
break
|
break
|
||||||
case "textarea":
|
case "textarea":
|
||||||
kit.AppendChild(option, "br")
|
kit.AppendChild(option, "br")
|
||||||
input.type = "textarea", item.style = "height:"+(item.height||"50px")+";width:"+(pane.target.clientWidth-30)+"px"
|
input.type = "textarea", item.style = "height:"+(item.height||"50px")+";width:"+(pane.target.clientWidth-35)+"px"
|
||||||
// no break
|
// no break
|
||||||
case "text":
|
case "text":
|
||||||
item.value = value || item.value || ""
|
item.value = value || item.value || ""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user