This commit is contained in:
lik
2026-05-28 17:06:18 +08:00
parent a93a75b3c6
commit db0f47d994
582 changed files with 8060 additions and 1781 deletions

View File

@@ -1,3 +1,5 @@
var utils = require('../common/utils.wxs');
var getListThemeItemClass = function (props) {
var classPrefix = props.classPrefix;
var item = props.item;
@@ -9,11 +11,24 @@ var getListThemeItemClass = function (props) {
return classList.join(' ');
};
var getIconData = function (icon) {
if (utils.isString(icon)) {
return { name: icon };
}
if (utils.isNoEmptyObj(icon)) {
return icon;
}
return null;
};
var isImage = function (name) {
return name.indexOf('/') !== -1;
};
module.exports = {
getListThemeItemClass: getListThemeItemClass,
getIconData: getIconData,
isImage: isImage,
};