feat: dd aria-* to Spin

pull/5820/head
tangjinzhou 2022-05-21 17:21:53 +08:00
parent 76573fc252
commit 21f9a1178a
3 changed files with 10 additions and 4 deletions

View File

@ -139,7 +139,13 @@ export default defineComponent({
};
const spinElement = (
<div {...divProps} style={style} class={spinClassName}>
<div
{...divProps}
style={style}
class={spinClassName}
aria-live="polite"
aria-busy={sSpinning}
>
{this.renderIndicator(prefixCls)}
{tip ? <div class={`${prefixCls}-text`}>{tip}</div> : null}
</div>

View File

@ -18,7 +18,7 @@ When part of the page is waiting for asynchronous data or during a rendering pro
| delay | specifies a delay in milliseconds for loading state (prevent flush) | number (milliseconds) | - | |
| indicator | vue node of the spinning indicator | vNode \|slot | - | |
| size | size of Spin, options: `small`, `default` and `large` | string | `default` | |
| spinning | whether Spin is spinning | boolean | true | |
| spinning | whether Spin is visible | boolean | true | |
| tip | customize description content when Spin has children | string \| slot | - | slot 3.0 |
| wrapperClassName | className of wrapper when Spin has children | string | - | |

View File

@ -162,7 +162,7 @@
}
&-spin {
transform: rotate(45deg);
transform: rotate(0deg);
animation: antRotate 1.2s infinite linear;
}
}
@ -211,7 +211,7 @@
@keyframes antRotate {
to {
transform: rotate(405deg);
transform: rotate(360deg);
}
}