chore: array fill (#8263)

This commit is contained in:
neverland
2021-03-04 14:04:47 +08:00
committed by GitHub
parent 12be46fad8
commit 3fd2972b7c
6 changed files with 19 additions and 36 deletions

View File

@@ -3,10 +3,7 @@ import { createNamespace, addUnit, getSizeStyle } from '../utils';
const [createComponent, bem] = createNamespace('loading');
const SpinIcon: JSX.Element[] = [];
for (let i = 0; i < 12; i++) {
SpinIcon.push(<i />);
}
const SpinIcon: JSX.Element[] = Array(12).fill(<i />);
const CircularIcon = (
<svg class={bem('circular')} viewBox="25 25 50 50">