提交
This commit is contained in:
34
甲情_甲意/miniprogram/node_modules/antd-mini/less/Loading/index.axml
generated
vendored
Normal file
34
甲情_甲意/miniprogram/node_modules/antd-mini/less/Loading/index.axml
generated
vendored
Normal file
@ -0,0 +1,34 @@
|
||||
<import-sjs
|
||||
from="./index.sjs"
|
||||
name="helper"
|
||||
></import-sjs>
|
||||
<view
|
||||
class="ant-loading {{type === 'spin' ? 'ant-loading-spin' : 'ant-loading-mini'}} {{helper.getClass(size)}} {{className ? className : ''}}"
|
||||
style="{{style}}"
|
||||
>
|
||||
<view
|
||||
a:if="{{type === 'spin'}}"
|
||||
class="ant-loading-spin-icon"
|
||||
style="background-image: url('data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20viewBox%3D%2224%2024%2048%2048%22%3E%3CanimateTransform%20attributeName%3D%22transform%22%20type%3D%22rotate%22%20repeatCount%3D%22indefinite%22%20from%3D%220%22%20to%3D%22360%22%20dur%3D%221400ms%22%3E%3C%2FanimateTransform%3E%3Ccircle%20cx%3D%2248%22%20cy%3D%2248%22%20r%3D%2220%22%20fill%3D%22none%22%20stroke%3D%22%23{{helper.getLoadingColor(color || '#fff')}}%22%20stroke-width%3D%222%22%20transform%3D%22translate%5C\(0%2C0%5C\)%22%3E%3Canimate%20attributeName%3D%22stroke-dasharray%22%20values%3D%221px%2C%20200px%3B100px%2C%20200px%3B100px%2C%20200px%22%20dur%3D%221400ms%22%20repeatCount%3D%22indefinite%22%3E%3C%2Fanimate%3E%3Canimate%20attributeName%3D%22stroke-dashoffset%22%20values%3D%220px%3B-15px%3B-125px%22%20dur%3D%221400ms%22%20repeatCount%3D%22indefinite%22%3E%3C%2Fanimate%3E%3C%2Fcircle%3E%3C%2Fsvg%3E');"
|
||||
></view>
|
||||
<block a:else>
|
||||
<view
|
||||
class="ant-loading-mini-item ant-loading-mini-item__1"
|
||||
style="{{color ? 'background-color: ' + color + ';' : ''}}"
|
||||
>
|
||||
.
|
||||
</view>
|
||||
<view
|
||||
class="ant-loading-mini-item ant-loading-mini-item__2"
|
||||
style="{{color ? 'background-color: ' + color + ';' : ''}}"
|
||||
>
|
||||
.
|
||||
</view>
|
||||
<view
|
||||
class="ant-loading-mini-item ant-loading-mini-item__3"
|
||||
style="{{color ? 'background-color: ' + color + ';' : ''}}"
|
||||
>
|
||||
.
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
1
甲情_甲意/miniprogram/node_modules/antd-mini/less/Loading/index.d.ts
generated
vendored
Normal file
1
甲情_甲意/miniprogram/node_modules/antd-mini/less/Loading/index.d.ts
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
import '../_util/assert-component2';
|
||||
5
甲情_甲意/miniprogram/node_modules/antd-mini/less/Loading/index.js
generated
vendored
Normal file
5
甲情_甲意/miniprogram/node_modules/antd-mini/less/Loading/index.js
generated
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
import { LoadingDefaultProps } from './props';
|
||||
import '../_util/assert-component2';
|
||||
Component({
|
||||
props: LoadingDefaultProps,
|
||||
});
|
||||
3
甲情_甲意/miniprogram/node_modules/antd-mini/less/Loading/index.json
generated
vendored
Normal file
3
甲情_甲意/miniprogram/node_modules/antd-mini/less/Loading/index.json
generated
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"component": true
|
||||
}
|
||||
99
甲情_甲意/miniprogram/node_modules/antd-mini/less/Loading/index.less
generated
vendored
Normal file
99
甲情_甲意/miniprogram/node_modules/antd-mini/less/Loading/index.less
generated
vendored
Normal file
@ -0,0 +1,99 @@
|
||||
@import (reference) './variable.less';
|
||||
|
||||
@loadingPrefix: ant-loading;
|
||||
|
||||
.@{loadingPrefix} {
|
||||
&-small {
|
||||
width: @loading-icon-size-small;
|
||||
height: @loading-icon-size-small;
|
||||
}
|
||||
|
||||
&-medium {
|
||||
width: @loading-icon-size-medium;
|
||||
height: @loading-icon-size-medium;
|
||||
}
|
||||
|
||||
&-large {
|
||||
width: @loading-icon-size-large;
|
||||
height: @loading-icon-size-large;
|
||||
}
|
||||
|
||||
&-x-large {
|
||||
width: @loading-icon-size-x-large;
|
||||
height: @loading-icon-size-x-large;
|
||||
}
|
||||
|
||||
&-spin {
|
||||
display: inline-flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
&-icon {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
}
|
||||
|
||||
&-mini {
|
||||
display: inline-flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
min-width: 66 * @rpx;
|
||||
min-height: 66 * @rpx;
|
||||
|
||||
&-item {
|
||||
flex: 0 0 8 * @rpx;
|
||||
min-width: 8 * @rpx;
|
||||
min-height: 8 * @rpx;
|
||||
max-width: 8 * @rpx;
|
||||
max-height: 8 * @rpx;
|
||||
overflow: hidden;
|
||||
margin-right: @h-spacing-standard;
|
||||
font-size: 0;
|
||||
border-radius: @corner-radius-sm / 2;
|
||||
background-color: @COLOR_TEXT_ASSIST;
|
||||
animation: ant-loading-animation 1s 0s infinite linear;
|
||||
|
||||
&__1 {
|
||||
animation-delay: 0s;
|
||||
}
|
||||
|
||||
&__2 {
|
||||
animation-delay: 150ms;
|
||||
}
|
||||
|
||||
&__3 {
|
||||
margin-right: 0;
|
||||
animation-delay: 300ms;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes ant-loading-animation {
|
||||
0% {
|
||||
transform: translate3d(0, 0, 0);
|
||||
}
|
||||
|
||||
12% {
|
||||
transform: translate3d(0, -150%, 0);
|
||||
}
|
||||
|
||||
40% {
|
||||
transform: translate3d(0, 110%, 0);
|
||||
}
|
||||
|
||||
55% {
|
||||
transform: translate3d(0, -10%, 0);
|
||||
}
|
||||
|
||||
60% {
|
||||
transform: translate3d(0, 0, 0);
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: translate3d(0, 0, 0);
|
||||
}
|
||||
}
|
||||
16
甲情_甲意/miniprogram/node_modules/antd-mini/less/Loading/index.sjs
generated
vendored
Normal file
16
甲情_甲意/miniprogram/node_modules/antd-mini/less/Loading/index.sjs
generated
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
function getLoadingColor(color) {
|
||||
if (typeof color === 'string' && color[0] === '#') {
|
||||
return color.slice(1);
|
||||
}
|
||||
}
|
||||
function getClass(size) {
|
||||
var list = ['small', 'medium', 'large', 'x-large'];
|
||||
if (list.indexOf(size) >= 0) {
|
||||
return "ant-loading-".concat(size);
|
||||
}
|
||||
return 'ant-loading-medium';
|
||||
}
|
||||
export default {
|
||||
getLoadingColor: getLoadingColor,
|
||||
getClass: getClass
|
||||
};
|
||||
18
甲情_甲意/miniprogram/node_modules/antd-mini/less/Loading/props.d.ts
generated
vendored
Normal file
18
甲情_甲意/miniprogram/node_modules/antd-mini/less/Loading/props.d.ts
generated
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
import { IBaseProps } from '../_util/base';
|
||||
/**
|
||||
* @description 加载,用于提示局部或页面在加载中。
|
||||
*/
|
||||
export interface ILoadingProps extends IBaseProps {
|
||||
/**
|
||||
* @description 加载时的颜色,当 type 为 'spin' 时,只支持十六进制颜色码,如'#fff'
|
||||
* @default '#fff'
|
||||
*/
|
||||
color?: string;
|
||||
/**
|
||||
* @description 加载图标尺寸,当 type 为 'spin' 时生效
|
||||
* @default medium
|
||||
*/
|
||||
size?: 'small' | 'medium' | 'large' | 'x-large';
|
||||
type?: 'spin' | 'mini';
|
||||
}
|
||||
export declare const LoadingDefaultProps: Partial<ILoadingProps>;
|
||||
5
甲情_甲意/miniprogram/node_modules/antd-mini/less/Loading/props.js
generated
vendored
Normal file
5
甲情_甲意/miniprogram/node_modules/antd-mini/less/Loading/props.js
generated
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
export var LoadingDefaultProps = {
|
||||
size: 'medium',
|
||||
color: '#fff',
|
||||
type: 'spin',
|
||||
};
|
||||
15
甲情_甲意/miniprogram/node_modules/antd-mini/less/Loading/variable.less
generated
vendored
Normal file
15
甲情_甲意/miniprogram/node_modules/antd-mini/less/Loading/variable.less
generated
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
@import (reference) '../style/themes/index.less';
|
||||
|
||||
// loading 尺寸
|
||||
@loading-icon-size-x-large: 140 * @rpx;
|
||||
@loading-icon-size-large: 140 * 0.75 * @rpx;
|
||||
@loading-icon-size-medium: 140 * 0.5 * @rpx;
|
||||
@loading-icon-size-small: 140 * 0.25 * @rpx;
|
||||
// 辅助文字尺寸
|
||||
@loading-text-size: @font-size-weak;
|
||||
// 辅助文字颜色
|
||||
@loading-text-color: @color-ironblack-1;
|
||||
// 深色颜色
|
||||
@loading-icon-dark-color: #999;
|
||||
// 浅色颜色
|
||||
@loading-icon-light-color: rgba(255, 255, 255, 0.6);
|
||||
Reference in New Issue
Block a user