import { h } from '@ui-arch/frame'; import type { SpinnerProps } from './types.js'; /*** 加载指示器:纯 CSS 旋转动画,size 控制直径 ***/ export function spinner(props: SpinnerProps = {}): HTMLElement { const size = `${props.size ?? 18}px`; const el = h('span', { class: 'ua-spinner', role: 'status', 'aria-label': '加载中' }); // 读屏播报加载状态 el.style.width = size; el.style.height = size; return el; }