mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-06 03:58:05 +08:00
feat(Skeleton): add new external class row-class & avatar-class & title-class (#2612)
fix #2580
This commit is contained in:
parent
a59ea40115
commit
d798f4d87f
@ -1,6 +1,7 @@
|
||||
import { VantComponent } from '../common/component';
|
||||
|
||||
VantComponent({
|
||||
classes: ['avatar-class', 'title-class', 'row-class'],
|
||||
props: {
|
||||
row: {
|
||||
type: Number,
|
||||
|
@ -6,20 +6,20 @@
|
||||
>
|
||||
<view
|
||||
wx:if="{{ avatar }}"
|
||||
class="{{ utils.bem('skeleton__avatar', [avatarShape])}}"
|
||||
class="avatar-class {{ utils.bem('skeleton__avatar', [avatarShape])}}"
|
||||
style="{{ 'width:' + avatarSize + ';height:' + avatarSize }}"
|
||||
/>
|
||||
<view class="{{ utils.bem('skeleton__content')}}">
|
||||
<view
|
||||
wx:if="{{ title }}"
|
||||
class="{{ utils.bem('skeleton__title') }}"
|
||||
class="title-class {{ utils.bem('skeleton__title') }}"
|
||||
style="{{ 'width:' + titleWidth }}"
|
||||
/>
|
||||
<view
|
||||
wx:for="{{ row }}"
|
||||
wx:key="index"
|
||||
wx:for-index="index"
|
||||
class="{{ utils.bem('skeleton__row') }}"
|
||||
class="row-class {{ utils.bem('skeleton__row') }}"
|
||||
style="{{ 'width:' + (isArray ? rowWidth[index] : rowWidth) }}"
|
||||
/>
|
||||
</view>
|
||||
|
Loading…
x
Reference in New Issue
Block a user