我定义了以下 TileMill Teaser:
电话:{{{PHONE}}}
电话数据是带有 10 位电话号码的数字。我想使用 lambda 表达式即时格式化它,如下所示:
电话:{{#formatPhone}}{{PHONE}}{{/formatPhone}}
在哈希中,我知道 formatPhone 可以定义如下:
"formatPhone" : function () {
return function(phone) {
// Do formatting here ...
return phone;
}
}
我不知道如何在 TileMill 预告片界面中定义 Lambda 函数。
非常感谢任何帮助。
谢谢