We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
<View css="{justify-content='space-between'}"></View>
这样的写法,会报错:
space_between isn't a valid key in valid Dic { center = 1; "flex-end" = 2; "flex-start" = 0; "space-around" = 4; "space-between" = 3; }
原因是对css的解析不严谨,将css字符串整体将-替换为_,之后对css属性替换回来,值没有替换回来。
-
_
elseif (_v.name == "css") then _v.value = _gsub(_v.value, "-","_") local paramFun = sys:loadstring("return " .. _v.value) local t = paramFun() local css = "" for _k, _v in pairs(t) do _k = _gsub(_k, "_","-") if (_find(_k, "margin")) then css = css .. _k .. ":" .. _v*sys.scale .. "," else css = css .. _k .. ":" .. _v .. "," end end
https://github.com/alibaba/LuaViewSDK/blob/master/IOS/luaviewEx/luaviewEx/Assets/kit/pica.lua#L180
The text was updated successfully, but these errors were encountered:
No branches or pull requests
问题
这样的写法,会报错:
原因
原因是对css的解析不严谨,将css字符串整体将
-
替换为_
,之后对css属性替换回来,值没有替换回来。https://github.com/alibaba/LuaViewSDK/blob/master/IOS/luaviewEx/luaviewEx/Assets/kit/pica.lua#L180
The text was updated successfully, but these errors were encountered: