lemo-crm/web/app/helpers/customer-application-images.js
2018-03-18 22:15:30 +08:00

17 lines
475 B
JavaScript

import { helper } from '@ember/component/helper';
export function customerApplicationImages([fileBasePath, appId, images, titles]) {
if (images) {
titles = titles ? titles.split(String.fromCharCode(0x1d)) : [];
return images.split(String.fromCharCode(0x1d)).map((image, i) => {
return {
image: fileBasePath + 'app/' + appId + '/' + image,
title: titles[i]
}
});
}
return [];
}
export default helper(customerApplicationImages);