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
页面的一个变量存储了windows路径, 使用SPLIT、REPLACE、CONTAINS等内置表达式均无法处理双反斜线 "\", 使用表达式${xx|split:\},可以处理, 因为目前需要使用REPLACE、CONTAINS等方法,想问下该怎么处理(JS可实现,但不便于后续维护)
页面定义变量{"C_PATH":"S:\CACHE"}, 使用 SPLIT(C_PATH, '\'),返回的是 ["S:\CACHE"],不正确 使用 ${C_PATH|split:\},返回的是 ["S:","CACHE"],正确
{ "type": "page", "title": "测试", "body": [ { "type": "input-text", "label": "【正确】数据映射split处理字符串", "name": "t1", "id": "u:ab6edffd75df", "value": "${C_PATH|split:\\\\}" }, { "type": "input-text", "label": "【错误】表达式SPLIT处理字符串", "name": "t2", "id": "u:d5f70deb9cb8", "value": "${SPLIT(C_PATH,'\\\\')}" } ], "id": "u:99f3d9bbbac0", "asideResizor": false, "pullRefresh": { "disabled": true }, "regions": [ "body" ], "data": { "C_PATH": "S:\\CACHE" } }
The text was updated successfully, but these errors were encountered:
补充:版本是 6.3.0
Sorry, something went wrong.
fix: 修复公式字符串中转义反斜杠处理不正确的问题 Close: baidu#9933
0410261
08e34de
fix: 修复公式字符串中转义反斜杠处理不正确的问题 Close: #9933 (#9943)
62c6d63
2betop
Successfully merging a pull request may close this issue.
实现场景:
页面的一个变量存储了windows路径,
使用SPLIT、REPLACE、CONTAINS等内置表达式均无法处理双反斜线 "\",
使用表达式${xx|split:\},可以处理,
因为目前需要使用REPLACE、CONTAINS等方法,想问下该怎么处理(JS可实现,但不便于后续维护)
存在的问题:
页面定义变量{"C_PATH":"S:\CACHE"},
使用 SPLIT(C_PATH, '\'),返回的是 ["S:\CACHE"],不正确
使用 ${C_PATH|split:\},返回的是 ["S:","CACHE"],正确
当前方案:
The text was updated successfully, but these errors were encountered: