// Utils import { createNamespace, addUnit } from '../utils'; const [createComponent, bem] = createNamespace('loading'); const SpinIcon = []; for (let i = 0; i < 12; i++) { SpinIcon.push(); } const CircularIcon = ( ); export default createComponent({ props: { color: String, size: [Number, String], vertical: Boolean, textSize: [Number, String], type: { type: String, default: 'circular', }, }, methods: { genLoadingText() { if (this.$slots.default) { const style = this.textSize && { fontSize: addUnit(this.textSize), }; return ( {this.$slots.default()} ); } }, }, render() { const { color, size, type, vertical } = this; const style = { color }; if (size) { const iconSize = addUnit(size); style.width = iconSize; style.height = iconSize; } return (