<template>
    <view :class="'custom-class van-loading ' + (vertical ? 'van-loading--vertical' : '')">
        <view :class="'van-loading__spinner van-loading__spinner--' + type" :style="'color: ' + color + '; width: ' + utils.addUnit(size) + '; height: ' + utils.addUnit(size)">
            <view v-if="type === 'spinner'" class="van-loading__dot" v-for="(item, index) in array12" :key="index"></view>
        </view>
        <view class="van-loading__text" :style="'font-size: ' + utils.addUnit(textSize) + ';'">
            <slot />
        </view>
    </view>
</template>
<script module="utils" lang="wxs" src="@/node_modules/@vant/weapp/dist/wxs/utils.wxs"></script>
<script>
import { VantComponent } from '../common/component';
export default {
    data() {
        return {
            array12: Array.from({
                length: 12
            })
        };
    },
    props: {
        color: String,
        vertical: Boolean,
        type: {
            type: String,
            default: 'circular'
        },
        size: String,
        textSize: String
    }
};
</script>
<style>
@import './index.css';
</style>
