Skip to content

加载中 xLoading


在线预览
在线模拟尺寸:

介绍

加载中占位符,场景用到页面加载前。请在标签内写上你的文本, 如果不写,默认显示“加载中...”

平台兼容

H5andriodIOS小程序UTSUNIAPP-X SDKversion
☑️☑️☑️☑️4.44+1.1.9

文件路径

ts

@/uni_modules/tmx-ui/components/x-loading/x-loading.uvue

使用

ts

<x-loading></x-loading>

Props 属性

名称说明类型默认值
color图标颜色string"#8b8b8b"
textColor文字颜色string"#8b8b8b"
textSize文字大小string"12"
iconSize图标大小string"21"
vertical是否垂直,默认是水平booleantrue
icon图标string"loader-line"
hideText隐藏加载文本插槽booleanfalse
label加载中的文本,加载中...string""

Events 事件

名称参数说明

Slots 插槽

名称说明数据
default请在插槽内写上你的文本, 如果不写,默认显示“加载中...”-

Ref 方法

名称参数返回值说明

示例文件路径

json

/pages/fankui/loading

示例源码

uvue
vue
<template>
	<!-- #ifdef MP-WEIXIN -->
	<page-meta :page-style="`background-color:${xThemeConfigBgColor}`">
		<navigation-bar :background-color="xThemeConfigNavBgColor" :front-color="xThemeConfigNavFontColor"></navigation-bar>
	</page-meta>
	<!-- #endif -->
	<view>

		<x-sheet>
			<x-text font-size="18" class=" text-weight-b mb-8">加载 Loading</x-text>
			<x-text color="#999999" >
				可在需要占位加载中使用。
			</x-text>
		</x-sheet>
		<x-sheet>
			<x-loading></x-loading>
		</x-sheet>
		<x-sheet>
			<x-text font-size="18" class=" text-weight-b ">水平</x-text>
		</x-sheet>
		<x-sheet>
			<x-loading :vertical="false"></x-loading>
		</x-sheet>
		<x-sheet>
			<x-text font-size="18" class=" text-weight-b ">更改图标及颜色</x-text>
		</x-sheet>
		<x-sheet>
			<x-loading icon="refresh-line" color="primary"></x-loading>
		</x-sheet>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				
			};
		}
	}
</script>

<style lang="scss">

</style>
最近更新