This commit is contained in:
Ling53666
2025-08-18 09:11:51 +08:00
commit 02554225da
2516 changed files with 133155 additions and 0 deletions

View File

@ -0,0 +1,10 @@
<import-sjs
from="./index.sjs"
name="utils"
></import-sjs>
<view
a:if="{{loading}}"
style="{{style}}"
class="ant-skeleton-avatar ant-skeleton-avatar-{{shape}} {{animate ? 'ant-skeleton-avatar-animate' : ''}} {{utils.getClass(size)}} {{className || ''}}"
></view>
<slot a:else></slot>

View File

@ -0,0 +1 @@
export {};

View File

@ -0,0 +1,3 @@
import { Component } from '../../_util/simply';
import { SkeletonAvatarDefaultProps } from './props';
Component(SkeletonAvatarDefaultProps);

View File

@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}

View File

@ -0,0 +1,33 @@
@import (reference) '../variable.less';
@import (reference) '../../Avatar/variable.less';
.@{skeletonPrefix}-avatar {
&-animate {
.skeleton-animation();
}
width: @avatar-size;
height: @avatar-size;
border-radius: @default-radius;
background: @skeleton-fill;
display: inline-block;
&-circle {
border-radius: 50%;
}
&-x-small {
width: @avatar-size-x-small;
height: @avatar-size-x-small;
}
&-small {
width: @avatar-size-small;
height: @avatar-size-small;
}
&-medium {
width: @avatar-size-medium;
height: @avatar-size-medium;
}
&-large {
width: @avatar-size-large;
height: @avatar-size-large;
}
}

View File

@ -0,0 +1,10 @@
function getClass(size) {
var list = ['x-small', 'small', 'medium', 'large'];
if (list.indexOf(size) >= 0) {
return "ant-skeleton-avatar-".concat(size);
}
return 'ant-skeleton-avatar-medium';
}
export default {
getClass: getClass
};

View File

@ -0,0 +1,6 @@
import { ISkeletonBaseProps } from '../props';
export interface SkeletonAvatarProps extends ISkeletonBaseProps {
shape: 'circle' | 'square';
size: 'x-small' | 'small' | 'medium' | 'large';
}
export declare const SkeletonAvatarDefaultProps: Partial<SkeletonAvatarProps>;

View File

@ -0,0 +1,3 @@
import { __assign } from "tslib";
import { SkeletonDefaultBaseProps } from '../props';
export var SkeletonAvatarDefaultProps = __assign(__assign({}, SkeletonDefaultBaseProps), { shape: 'square', size: 'medium' });