12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- <view class="{{classPrefix}} {{prefix}}-class {{classPrefix}}--{{align}}">
- <!-- icon -->
- <view
- class="{{classPrefix}}__icon-{{align}} {{prefix}}-class-icon"
- data-target="icon"
- bind:tap="onChange"
- >
- <block wx:if="{{icon.length > 0}}">
- <view class="{{classPrefix}}__icon">
- <image src="{{active ? icon[0] : icon[1]}}" class="{{classPrefix}}__icon-image" webp />
- </view>
- </block>
- <block wx:else>
- <t-icon
- color="{{active && !disabled ? color : ''}}"
- name="{{active ? (halfChecked ? 'minus-circle-filled' : 'check-circle-filled') : 'circle'}}"
- class="{{classPrefix}}__btn {{active ? prefix + '-is-checked' : ''}} {{disabled ? prefix + '-is-disabled' : ''}}"
- />
- </block>
- </view>
- <!-- 文本内容 -->
- <view
- class="{{classPrefix}}__content {{disabled ? prefix + '-is-disabled' : ''}}"
- data-target="text"
- bind:tap="onChange"
- >
- <!-- title -->
- <view
- class="{{classPrefix}}__title {{prefix}}-class-label"
- style="-webkit-line-clamp:{{maxLabelRow}}"
- >
- {{label}}
- <slot name="label" />
- </view>
- <!-- content -->
- <view
- class="{{classPrefix}}__description {{prefix}}-class-content "
- style="-webkit-line-clamp:{{maxContentRow}}"
- >
- {{content}}
- <slot />
- <slot name="content" />
- </view>
- </view>
- <!-- 内置下边框 -->
- <view
- class="{{classPrefix}}__border {{classPrefix}}__border--{{align}} {{prefix}}-class-border"
- />
- </view>
|