[feat] Icon: 添加识别本地图片路径的功能 (#1884)

添加识别本地图片路径的功能,以 “.” , "/", "../" 开头的本地路径都以正确的被读取
This commit is contained in:
v4125251 2019-08-20 20:34:00 +08:00 committed by neverland
parent c8dab86079
commit 8d2cad0ade

2
dist/wxs/utils.wxs vendored
View File

@ -2,7 +2,7 @@ var bem = require('./bem.wxs').bem;
var memoize = require('./memoize.wxs').memoize;
function isSrc(url) {
return url.indexOf('http') === 0 || url.indexOf('data:image') === 0 || url.indexOf('//') === 0;
return url.indexOf(".") === 0 || url.indexOf("/") === 0 || url.indexOf('http') === 0 || url.indexOf('data:image') === 0 || url.indexOf('//') === 0;
}
module.exports = {