🎨 不记录用户指南滚动位置

This commit is contained in:
Liang Ding 2023-01-07 21:28:59 +08:00
parent 33962b0694
commit 8286c46365
No known key found for this signature in database
GPG key ID: 136F30F901A2231D

View file

@ -57,10 +57,9 @@ func setBlockAttrs(c *gin.Context) {
id := arg["id"].(string)
attrs := arg["attrs"].(map[string]interface{})
if 1 == len(attrs) && "" != attrs["scroll"] && "dev" == util.Mode {
// 开发环境不记录用户指南滚动位置
b := treenode.GetBlockTree(id)
if nil != b && (model.IsUserGuide(b.BoxID)) {
if 1 == len(attrs) && "" != attrs["scroll"] {
// 不记录用户指南滚动位置
if b := treenode.GetBlockTree(id); nil != b && (model.IsUserGuide(b.BoxID)) {
attrs["scroll"] = ""
}
}