Skip to content

容器 xSheet


在线预览
在线模拟尺寸:

介绍

可方便快速的更改属性以塑造符合你的设计风格。背景,圆角,间隙等统一风格可全局配置。 主要是用来统一页面风格,间距等可统一设置,提高设计的一致性。

平台兼容

HarmonyH5andriodIOS小程序UTSUNIAPP-X SDKversion
☑️☑️☑️☑️4.76+1.1.18

文件路径

ts

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

使用

ts

<x-sheet></x-sheet>

Props 属性

名称说明类型默认值
color``
string'white'
darkColor``
string''
followTheme``
booleanfalse
hoverColor``
string''
url``
string''
linearGradient``
Array[] as string[]
round``
Array[] as string[]
border``
Array[] as string[]
shadow``
Array[] as string[]
borderColor``
Array[] as string[]
darkBorderColor``
Array[] as string[]
borderStyle``
string'solid'
margin``
Array[] as string[]
padding``
Array[] as string[]
isLink``
booleanfalse
loading``
booleanfalse
height``
string'auto'
width``
string'auto'

Events 事件

名称参数说明
click--

Slots 插槽

名称说明数据
default默认插槽-

Ref 方法

名称参数返回值说明

示例文件路径

json

/pages/chongyong/sheet

示例源码

uvue
vue
<template>
	<!-- #ifdef APP -->
	<scroll-view style="flex:1">
	<!-- #endif -->
	<!-- #ifdef MP-WEIXIN -->
	<page-meta :page-style="`background-color:${xThemeConfigBgColor}`">
		<navigation-bar :background-color="xThemeConfigNavBgColor" :front-color="xThemeConfigNavFontColor"></navigation-bar>
	</page-meta>
	<!-- #endif -->
		<x-sheet >
			<x-text font-size="18" class=" text-weight-b mb-8">容器 Sheet</x-text>
			<x-text color="#999999" class="line-8">属性比较多,可快速的用来布局,减轻你的布局压力,让效率提升。实验证明:一个普通的小程序20个页面。使用容器+我的组件布局。2天内完成布局,2天对接完成后端。</x-text>
			<x-text color="error" class="line-8">并且背景,圆角,间隙允许全局动态/统一配置,布局后的页面可根据后期设计要求,一键修改所有设计风格。绝对布局利器。</x-text>
		</x-sheet>
		<x-sheet :round="['12','2']" color="primary">
			<x-text color="white">更改圆角</x-text>
		</x-sheet>
		<x-sheet :round="['12','2']" :border="['2','2']" :border-color="['red','primary']">
			<x-text font-size="18" class=" text-weight-b">边线</x-text>
		</x-sheet>
		
		<x-sheet :round="['12','2']" :linearGradient="['left','#ff667f','#fdb247']">
			<x-text color="white">渐变</x-text>
		</x-sheet>

		<x-sheet :loading="true">
			<x-text font-size="18" class=" text-weight-b mb-24">还允许让内容处于加载中</x-text>
			<x-sheet :margin="['0']" :linearGradient="['left','#ff667f','#fdb247']">
				<x-text color="white" >渐变</x-text>
			</x-sheet>
			<x-sheet :margin="['0','12','0','0']" color="primary">
				<x-text color="white" class=" text-weight-b ">更改圆角</x-text>
			</x-sheet>
		</x-sheet>
		
		<view style="height: 50px;"></view>
		
	<!-- #ifdef APP -->
	</scroll-view>
	<!-- #endif -->
</template>

<script setup lang="ts">
	
</script>

<style lang="scss">

</style>
最近更新