Skip to content

Fab 浮动按钮钮

支持平台

安卓iosweb微信小程序支付宝小程序QQ小程序
xxx

示例

html
<template>
	<t-page title="悬浮按钮">
		<t-card class='m.30' title="Fab 悬浮按钮" sub-title="动态的展开和收起子菜单,支持多种展开方向,如垂直、水平以及圆形扩散,支持自由拖拽"></t-card>
		<t-fab type="p" menuSize="80" class="dl.300-dt.450" :rotateDeg="60" :value="true" direction='round'
			spacing="20">
			<template v-slot:menu>
				<t-icon name="close" class="c.#fff"></t-icon>
			</template>
			<t-fab-item>
				<t-icon name="weixin-fill" class="c.#fff"></t-icon>
			</t-fab-item>
			<t-fab-item>
				<t-icon name="home" c class="c.#fff"></t-icon>
			</t-fab-item>
			<t-fab-item>
				<t-icon name="server-fill" class="c.#fff"></t-icon>
			</t-fab-item>
			<t-fab-item>
				<t-icon name="apple-fill" class="c.#fff"></t-icon>
			</t-fab-item>
			<t-fab-item>
				<t-icon name="integral-fill" class="c.#fff"></t-icon>
			</t-fab-item>
			<t-fab-item>
				<t-icon name="account-fill" class="c.#fff"></t-icon>
			</t-fab-item>
		</t-fab>
		<t-fab type="p" menuSize="80" class="dl.300-dt.850" :rotateDeg="60" :value="true" direction='round'
			:startRtateDeg="160" spacing="20">
			<template v-slot:menu>
				<t-icon name="close" class="c.#fff"></t-icon>
			</template>
			<t-fab-item>
				<t-icon name="weixin-fill" class="c.#fff"></t-icon>
			</t-fab-item>
			<t-fab-item>
				<t-icon name="home" class="c.#fff"></t-icon>
			</t-fab-item>
			<t-fab-item>
				<t-icon name="server-fill" class="c.#fff"></t-icon>
			</t-fab-item>
		</t-fab>
		<t-fab type="error" class="dl.50-dt.160" :value="true" direction='column-bottom'>
			<template v-slot:menu>
				<t-icon name="close" class="c.#fff"></t-icon>
			</template>
			<t-fab-item>
				<t-icon name="weixin-fill" class="c.#fff"></t-icon>
			</t-fab-item>
			<t-fab-item>
				<t-icon name="home" class="c.#fff"></t-icon>
			</t-fab-item>
			<t-fab-item>
				<t-icon name="server-fill" class="c.#fff"></t-icon>
			</t-fab-item>
			<t-fab-item>
				<t-icon name="star-fill" class="c.#fff"></t-icon>
			</t-fab-item>
		</t-fab>
		<t-fab type="s" class="dr.50-db.50" :value="true" direction='column-top'>
			<template v-slot:menu>
				<t-icon name="close" class="c.#fff"></t-icon>
			</template>
			<t-fab-item>
				<t-icon name="weixin-fill" class="c.#fff"></t-icon>
			</t-fab-item>
			<t-fab-item>
				<t-icon name="home" class="c.#fff"></t-icon>
			</t-fab-item>
			<t-fab-item>
				<t-icon name="server-fill" class="c.#fff"></t-icon>
			</t-fab-item>
			<t-fab-item>
				<t-icon name="star-fill" class="c.#fff"></t-icon>
			</t-fab-item>
		</t-fab>
		<t-fab type="p" class="dl.50-db.50" :value="true" direction='row-right'>
			<template v-slot:menu>
				<t-icon name="close" class="c.#fff"></t-icon>
			</template>
			<t-fab-item>
				<t-icon name="weixin-fill" class="c.#fff"></t-icon>
			</t-fab-item>
			<t-fab-item>
				<t-icon name="home" class="c.#fff"></t-icon>
			</t-fab-item>
			<t-fab-item>
				<t-icon name="server-fill" class="c.#fff"></t-icon>
			</t-fab-item>
			<t-fab-item>
				<t-icon name="star-fill" class="c.#fff"></t-icon>
			</t-fab-item>
		</t-fab>
		<t-fab type="w" class="dr.50-dt.160" :value="true" direction='row-left'>
			<template v-slot:menu>
				<t-icon name="close" class="c.#fff"></t-icon>
			</template>
			<t-fab-item>
				<t-icon name="weixin-fill" class="c.#fff"></t-icon>
			</t-fab-item>
			<t-fab-item>
				<t-icon name="home" class="c.#fff"></t-icon>
			</t-fab-item>
			<t-fab-item>
				<t-icon name="server-fill" class="c.#fff"></t-icon>
			</t-fab-item>
			<t-fab-item>
				<t-icon name="star-fill" class="c.#fff"></t-icon>
			</t-fab-item>
		</t-fab>
	</t-page>
</template>

Props t-fab

名称描述类型默认值可选值
menuSize菜单尺寸String'80rpx'-
left距离左侧的距离String''-
right距离右侧的距离String''-
bottom距离底部的距离String''-
top距离顶部的距离String''-
value按钮的值Booleanfalsetrue, false
direction按钮展开的方向String'row-top''row-top', 'column-bottom', 'column-top', 'row-right', 'row-left', 'round'
spacing按钮之间的间距String'20rpx'-
zIndexz-index值Number100-
startRtateDeg起始旋转角度Number0-
rotateDeg旋转角度Number60-