var cacheMap = new Map();
cacheMap.put('1','仓库1');
cacheMap.put('2','仓库2');
cacheMap.put('3','仓库3');
//1.模版导入扩展方法
template.defaults.imports.getHouseName = function(houseId) {
return cacheMap.get(houseId);
}
//2.使用
{{getHouseName($value.wareHouseId)}}
art template 模版引擎 扩展方法
猜你喜欢
转载自my.oschina.net/u/2433960/blog/1797908
今日推荐
周排行