feat: login rest
This commit is contained in:
+15
@@ -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,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user