first commit

This commit is contained in:
lingxiao865
2026-02-10 08:05:03 +08:00
commit c5af079d8c
1094 changed files with 97530 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
export const isEmptyObj = function (obj) {
return JSON.stringify(obj) === '{}';
};
const changeNumToStr = function (arr) {
return arr.map(item => (typeof item === 'number' ? `${item}rpx` : item));
};
export const getMessageStyles = function (zIndex, offset, wrapTop) {
const arr = changeNumToStr(offset || [0, 0]);
const left = arr[1] || 0;
const right = arr[1] || 0;
const zIndexStyle = zIndex ? `z-index:${zIndex};` : '';
let styleOffset = '';
styleOffset += `top:${wrapTop}px;`;
styleOffset += `left:${left};`;
styleOffset += `right:${right};`;
return zIndexStyle + styleOffset;
};