NervJS / taro-plugin-platform-kwai

快手小程序平台插件
27 stars 10 forks source link

fix: function (buildFlattenNodeAttributes) return component Attributes error #27

Closed debugtheworldbot closed 1 year ago

debugtheworldbot commented 1 year ago

函数buildFlattenNodeAttributes返回的Attributes有点问题,比如对于<Input />组件 ,FlattenNodeAttributes 之前该组件的attrs为:

image

而map之后属性变成了 image, 可以看到input的focus的值变成了focus="{{item.focus===undefined?!1:i.focus}}" 而正确的应该是 focus="{{item.focus===undefined?!1:item.focus}}"

所以需要把replace换成replaceAll,自测下来应该没有问题

debugtheworldbot commented 1 year ago

cc @Chen-jj @mapleqin

Chen-jj commented 1 year ago

感谢贡献~