/*! For license information please see 7046.01a6a5db.js.LICENSE.txt */ (self.webpackChunk=self.webpackChunk||[]).push([["7046"],{90258:function(s,n,a){"use strict";a.r(n);var t=a("80681");let l=["innerHTML"];n.default={setup:()=>({html:""}),render:()=>((0,t.wg)(),(0,t.iD)("div",{class:"van-doc-markdown-body",innerHTML:'
Used to indicate the transition state during loading.
\nRegister component globally via app.use
, refer to Component Registration for more registration ways.
import { createApp } from 'vue';\nimport { Loading } from 'vant';\n\nconst app = createApp();\napp.use(Loading);\n
\n<van-loading />\n\n<van-loading type="spinner" />\n
\n<van-loading color="#1989fa" />\n\n<van-loading type="spinner" color="#1989fa" />\n
\n<van-loading size="24" />\n\n<van-loading type="spinner" size="24px" />\n
\n<van-loading size="24px">Loading...</van-loading>\n
\n<van-loading size="24px" vertical>Loading...</van-loading>\n
\nuse color
or text-color
to change text color.
<!-- the color of text and icon will be changed -->\n<van-loading color="#0094ff" />\n\n<!-- only change text color -->\n<van-loading text-color="#0094ff" />\n
\nUse icon
slot to custom icon.
<van-loading vertical>\n <template #icon>\n <van-icon name="star-o" size="30" />\n </template>\n Loading...\n</van-loading>\n
\nAttribute | \nDescription | \nType | \nDefault | \n
---|---|---|---|
color | \nLoading color | \nstring | \n#c9c9c9 | \n
type | \nCan be set to spinner | \nstring | \ncircular | \n
size | \nIcon size | \nnumber | string | \n30px | \n
text-size | \nText font size | \nnumber | string | \n14px | \n
text-color | \nText color | \nstring | \n#c9c9c9 | \n
vertical | \nWhether to arrange icons and text content vertically | \nboolean | \nfalse | \n
Name | \nDescription | \n
---|---|
default | \nLoading text | \n
icon | \nCustom loading icon | \n
The component exports the following type definitions:
\nimport type { LoadingType, LoadingProps } from 'vant';\n
\nThe component provides the following CSS variables, which can be used to customize styles. Please refer to ConfigProvider component.
\nName | \nDefault Value | \nDescription | \n
---|---|---|
--van-loading-text-color | \nvar(--van-text-color-2) | \n- | \n
--van-loading-text-font-size | \nvar(--van-font-size-md) | \n- | \n
--van-loading-spinner-color | \nvar(--van-gray-5) | \n- | \n
--van-loading-spinner-size | \n30px | \n- | \n
--van-loading-spinner-duration | \n0.8s | \n- | \n