deguodaigou/utils/dist/dropdown-menu/index.wxs
2019-12-14 09:20:48 +08:00

17 lines
331 B
XML

/* 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
};