1
0
mirror of https://shylinux.com/x/icebergs synced 2025-04-25 17:18:05 +08:00
This commit is contained in:
shylinux 2020-07-29 11:39:50 +08:00
parent 8db22f281c
commit b51e99983d
2 changed files with 7 additions and 4 deletions

View File

@ -3,7 +3,6 @@ package chat
import (
ice "github.com/shylinux/icebergs"
"github.com/shylinux/icebergs/base/mdb"
"github.com/shylinux/icebergs/base/web"
kit "github.com/shylinux/toolkits"
"strings"
@ -79,12 +78,14 @@ func init() {
if strings.Contains(m.Option(ice.MSG_USERUA), "MicroMessenger") {
return
}
m.Push("action", m.Cmdx(mdb.RENDER, web.RENDER.Button, "删除"))
return
}
m.Push("detail", value)
})
m.Sort("time", "time_r")
if len(arg) == 0 {
m.PushAction("复制", "删除")
m.Sort("time", "time_r")
}
}},
},
}, nil)

View File

@ -59,9 +59,11 @@ func (m *Message) AddCmd(cmd *Command) string {
func (m *Message) PushAction(list ...interface{}) {
m.Table(func(index int, value map[string]string, head []string) {
action := []string{}
for _, k := range kit.Simple(list...) {
m.Push(k, m.Cmdx("render", "button", k))
action = append(action, m.Cmdx("render", "button", k))
}
m.Push("操作", strings.Join(action, ""))
})
}
func (m *Message) PushDetail(value interface{}, arg ...interface{}) *Message {