Files
2026-02-07 23:14:57 +08:00

116 lines
2.1 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
Component({
options: {
multipleSlots: true,
styleIsolation: 'apply-shared'
},
properties: {
//card margin值
margin: {
type: String,
value: '0 32rpx'
},
//是否通栏为true时margin-leftmargin-right失效
full: {
type: Boolean,
value: false
},
//card 背景色
background: {
type: String,
value: '#fff'
},
//card 圆角showBorder为false时生效
radius: {
type: String,
value: '16rpx'
},
//阴影
shadow: {
type: String,
value: '0 2rpx 4rpx 0 rgba(2, 4, 38, 0.05)'
},
//是否显示card 边框为true时box-shadow失效
showBorder: {
type: Boolean,
value: false
},
headerBackground: {
type: String,
value: '#fff'
},
//是否需要header底部线条
headerLine: {
type: Boolean,
value: true
},
//是否需要内容与footer之间线条
footerLine: {
type: Boolean,
value: false
},
//header padding值
padding: {
type: String,
value: '20rpx 20rpx'
},
//头像,图标图片地址
src: {
type: String,
value: ''
},
//图片宽度单位rpx
width: {
type: Number,
optionalTypes: [String],
value: 64
},
//图片高度单位rpx
height: {
type: Number,
optionalTypes: [String],
value: 64
},
//图片圆角
imageRadius: {
type: String,
value: '8rpx'
},
title: {
type: String,
value: ''
},
size: {
type: Number,
optionalTypes: [String],
value: 30
},
color: {
type: String,
value: '#7F7F7F'
},
tag: {
type: String,
value: ''
},
tagSize: {
type: Number,
optionalTypes: [String],
value: 24
},
tagColor: {
type: String,
value: '#b2b2b2'
},
index: {
type: Number,
value: 0
}
},
methods: {
handleClick() {
this.triggerEvent('click', {
index: this.data.index
})
}
}
})