mousheng / lowcoder_CN

🔥🔥🔥开源Retool, Tooljet和Appsmith的替代方案,码匠的开源版
GNU Affero General Public License v3.0
159 stars 47 forks source link

[Bug]: form.setData 无效 #44

Closed oceanynh closed 12 months ago

oceanynh commented 12 months ago

Is there an existing issue for this?

Current Behavior

我在使用表单控件的时候,修改或更新的时候是没问题的,form.data能读取。但是如何我想初始化表单数据或根据日期条件自动获取表单内容的时候,form.setData就失效了,我尝试过form.setData({})或form.setData(jsonData)或form.setData({id:'1234',name:'name'})也是一点反应都没有

Expected Behavior

我用chrome开发者工具调试的时候,在

setData(Ut, Vt) {
        const Wt = yr(yr({}, Vt != null ? Vt : this.children.initialData.getView()), Ut);
        return this.runMethodOfItems({
            name: "setValue",
            getParams: Kt=>{
                var Qt;
                const qt = ((Qt = Kt.children.comp.children.formDataKey) == null ? void 0 : Qt.getView()) || Kt.children.name.getView()
                  , Yt = Wt[qt];
                return Yt !== void 0 ? [Yt] : void 0
            }
        }, {
            name: "resetValue"
        }, {
            name: "clearValue"
        })
    }

发行setValue与控件input的方法SetValue不一致,不知道是不是这原因导致的

Steps to reproduce

已经尝试过query.run

Environment

No response

Additional Information

No response

mousheng commented 12 months ago

你使用的是Lowcoder什么版本?是我仓库克隆下去最新版还是在 lowcoder.mousheng.top上的版本? lowcoder.mousheng.top上不是最新的版本 2

oceanynh commented 12 months ago

https://hub.docker.com/r/moushengkoo/lowcoder_cn/tags 我拉的是latest,不太清楚是什么版本,26天前拉的,我再更新一下。看看会不会有什么变化

oceanynh commented 12 months ago

我完全按照您的操作,毫无反应 rr

mousheng commented 12 months ago

image 已修复的问题,docker镜像版本太低了,我重新推了,你重新拉一下就好了