mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-09-07 08:19:46 +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';
|
import { VantComponent } from '../common/component';
|
||||||
|
|
||||||
VantComponent({
|
VantComponent({
|
||||||
|
classes: ['avatar-class', 'title-class', 'row-class'],
|
||||||
props: {
|
props: {
|
||||||
row: {
|
row: {
|
||||||
type: Number,
|
type: Number,
|
||||||
|
@ -6,20 +6,20 @@
|
|||||||
>
|
>
|
||||||
<view
|
<view
|
||||||
wx:if="{{ avatar }}"
|
wx:if="{{ avatar }}"
|
||||||
class="{{ utils.bem('skeleton__avatar', [avatarShape])}}"
|
class="avatar-class {{ utils.bem('skeleton__avatar', [avatarShape])}}"
|
||||||
style="{{ 'width:' + avatarSize + ';height:' + avatarSize }}"
|
style="{{ 'width:' + avatarSize + ';height:' + avatarSize }}"
|
||||||
/>
|
/>
|
||||||
<view class="{{ utils.bem('skeleton__content')}}">
|
<view class="{{ utils.bem('skeleton__content')}}">
|
||||||
<view
|
<view
|
||||||
wx:if="{{ title }}"
|
wx:if="{{ title }}"
|
||||||
class="{{ utils.bem('skeleton__title') }}"
|
class="title-class {{ utils.bem('skeleton__title') }}"
|
||||||
style="{{ 'width:' + titleWidth }}"
|
style="{{ 'width:' + titleWidth }}"
|
||||||
/>
|
/>
|
||||||
<view
|
<view
|
||||||
wx:for="{{ row }}"
|
wx:for="{{ row }}"
|
||||||
wx:key="index"
|
wx:key="index"
|
||||||
wx:for-index="index"
|
wx:for-index="index"
|
||||||
class="{{ utils.bem('skeleton__row') }}"
|
class="row-class {{ utils.bem('skeleton__row') }}"
|
||||||
style="{{ 'width:' + (isArray ? rowWidth[index] : rowWidth) }}"
|
style="{{ 'width:' + (isArray ? rowWidth[index] : rowWidth) }}"
|
||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user