t-footer
Footer 页脚
组件介绍
页脚组件,用于显示页面底部的辅助信息、导航链接或版权声明,支持固定在页面底部,且可以包含多个可点击的导航项。
平台兼容
| Harmony | H5 | Android | iOS | 小程序 | UTS |
|---|---|---|---|---|---|
| ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
基础用法
vue
<template>
<!-- 基本页脚 -->
<t-footer :text="['Copyright © 2024 TUI Plus', 'All rights reserved']"></t-footer>
<!-- 带导航链接的页脚 -->
<t-footer
:navigate="[
{ text: '关于我们' },
{ text: '隐私政策' },
{ text: '用户协议' },
{ text: '联系我们' }
]"
:text="['Copyright © 2024 TUI Plus', 'All rights reserved']"
></t-footer>
<!-- 固定在底部的页脚 -->
<t-footer
:isFixed="true"
:text="['Copyright © 2024 TUI Plus']"
></t-footer>
</template>Props
| 属性名 | 类型 | 默认值 | 说明 | 可选值 |
|---|---|---|---|---|
| size | String | "medium" | 组件尺寸 | large, medium, small, mini |
| type | String | "primary" | 组件类型 | info, primary, error, warning, success |
| disabled | Boolean | false | 组件是否禁用 | true, false |
| hover | Boolean | false | 是否有点击效果 | true, false |
| path | String | "" | 点击组件后跳转的页面路径 | - |
| effect | String | "normal" | 组件显示主题 | normal, dark, light, plain |
| text | Array | ["Copyright © 2024"] | 显示的内容 | - |
| navigate | Array | [] | 导航配置 | - |
| textClass | String | "" | 内容样式 | - |
| isFixed | Boolean | false | 是否固定定位 | true, false |
Events
| 事件名 | 说明 | 回调参数 |
|---|---|---|
| click | 点击时触发 | - |
| transitionend | 动画结束时触发 | - |
| initFinished | 组件初始化完成触发 | 组件的节点信息 |
| touchstart | 触摸开始时触发 | 触摸事件对象 |
| touchend | 触摸结束时触发 | 触摸事件对象 |
| touchmove | 触摸移动时触发 | 触摸事件对象 |
| touchcancel | 触摸取消时触发 | 触摸事件对象 |
Slots
| 插槽名 | 说明 |
|---|---|
| default | 自定义内容插槽,用于替换默认的页脚内容 |