提交 | 用户 | age | ||
d98d05 | 1 | /* eslint-disable */ |
S | 2 | function displayTitle(item) { |
3 | if (item.title) { | |
4 | return item.title; | |
5 | } | |
6 | ||
7 | var match = item.options.filter(function(option) { | |
8 | return option.value === item.value; | |
9 | }); | |
10 | var displayTitle = match.length ? match[0].text : ''; | |
11 | return displayTitle; | |
12 | } | |
13 | ||
14 | module.exports = { | |
15 | displayTitle: displayTitle | |
16 | }; |