project init & fix ui

This commit is contained in:
2023-01-06 14:24:11 +08:00
parent abc4f65a8e
commit ac9b479805
866 changed files with 39916 additions and 53 deletions

View File

@@ -0,0 +1,26 @@
module.exports = {
getAvatarOuterClass: function (classPrefix, size, shape, bordered) {
var isIncludePx = size.indexOf('px') > -1;
var borderSize = isIncludePx ? 'medium' : size;
var classNames = [
classPrefix,
classPrefix + (shape === 'round' ? '--round' : '--circle'),
bordered ? classPrefix + '--border' + ' ' + classPrefix + '--border--' + borderSize : '',
isIncludePx ? '' : 't-size-' + (size || 'medium').slice(0, 1),
];
return classNames.join(' ');
},
getAvatarSizePx: function (size = 'medium') {
var pxIndex = size.indexOf('px');
if (pxIndex > -1) {
return 'width:' + size + ';height:' + size + ';font-size:' + ((size.slice(0, pxIndex) / 8) * 3 + 2) + 'px;';
}
},
getAvatarStyles: function (isShow, zIndex, customStyle) {
var displayStyle = isShow ? '' : 'display: none;';
var zIndexStyle = zIndex ? 'z-index:' + zIndex + ';' : '';
return displayStyle + zIndexStyle + customStyle;
},
};