Appearance
引入组件
局部引入
ts
// parent.vue
const FCell = defineAsyncComponent(() => import('@/components/formaui/f-cell/f-cell.vue'))基础用法
html
<f-cell @click="click">cell</f-cell>
<f-cell :is-hover="false">无点击效果</f-cell>
<f-cell font-bold>cell</f-cell>
<f-cell show-line>cell</f-cell>
<f-cell show-arrow>cell</f-cell>插槽
| 名称 | 说明 |
|---|---|
| default | 显示内容 |
属性
| 名称 | 类型 | 说明 | 默认值 |
|---|---|---|---|
type | string | 样式类型,可传入[row、column] | row |
iconType | number | 图标类型,可传入[0、1、2、3、4、5、6、7] | 0 |
icon | string | 自定义图标iconType=0时生效 | - |
text | string | 自定义文字 | 加载中 |
textColor | string | 自定义文字颜色 | type=row:#888888/type=column:#FFFFFF |
fontSize | string | 自定义文字大小 | 26rpx |
bgColor | string | 自定义背景颜色 | type=row:transparent/type=column:rgba(0, 0, 0, 0.6) |
borderRadius | string | 自定义圆角type=column时生效 | 16rpx |
isFixed | boolean | 是否固定在屏幕中心 | false |
isMask | boolean | 是否显示遮罩层isFixed=true时生效 | false |
maskColor | string | 自定义遮罩颜色 | rgba(0, 0, 0, 0.3) |
margin | string | 自定义外边距type=row时生效 | 0 |
padding | string | 自定义内边距type=row时生效 | 0 |
事件
| 事件名 | 说明 | 回调参数 |
|---|---|---|
click | 点击事件 | - |
