index.wxs 331 Bytes
Newer Older
李嘉林 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
/* eslint-disable */
function displayTitle(item) {
  if (item.title) {
    return item.title;
  }

  var match = item.options.filter(function(option) {
    return option.value === item.value;
  });
  var displayTitle = match.length ? match[0].text : '';
  return displayTitle;
}

module.exports = {
  displayTitle: displayTitle
};