Skip to content
目录

加载状态 loading

基本使用

js
import loading from "@/static/example/yy.svg"
const { showLoading, hideLoading } = useStore("globalUI")

showLoading({ title: "加载中...", image: undefined })
setTimeout(() => {
  hideLoading()
}, 3000)

不显示 title

js
import loading from "@/static/example/yy.svg"
const { showLoading, hideLoading } = useStore("globalUI")

showLoading({ title: undefined, image: undefined })
setTimeout(() => {
  hideLoading()
}, 3000)

自定义 GIF

js
import loading from "@/static/example/yy.svg"
const { showLoading, hideLoading } = useStore("globalUI")

showLoading({ title: "加载中...", image: loading })
setTimeout(() => {
  hideLoading()
}, 3000)

props

参数列表:

参数名类型默认值描述
titlestringundefined标题
imagestringundefined图像

©2022 By 绝配移动端组件库