123456789101112131415161718192021222324252627282930313233343536373839 |
- <view class="{{classPrefix}} {{prefix}}-class {{classPrefix}}--{{align}}">
- <!-- 图标 -->
- <view
- class="{{classPrefix}}__icon {{classPrefix}}__icon--{{align}} {{prefix}}-class-icon"
- data-target="icon"
- bind:tap="handleTap"
- >
- <view wx:if="{{customIcon}}" class="{{classPrefix}}__image">
- <image src="{{active ? iconVal[0] : iconVal[1]}}" class="{{classPrefix}}-icon__image" webp />
- </view>
- <t-icon
- wx:elif="{{active && iconVal[0] || !active && iconVal[1]}}"
- color="{{active && !disabled ? color : ''}}"
- name="{{active ? iconVal[0] : iconVal[1]}}"
- class="{{classPrefix}}__btn {{disabled ? classPrefix + '-is-disabled' : ''}} {{active ? classPrefix + '-is-checked' : ''}}"
- />
- </view>
- <!-- 文本内容 -->
- <view
- class="{{classPrefix}}__content {{disabled ? classPrefix + '__content--disabled' : ''}}"
- data-target="text"
- bind:tap="handleTap"
- >
- <!-- 主文本 -->
- <view class="{{classPrefix}}__title {{prefix}}-class-label" style="-webkit-line-clamp:{{maxLabelRow}}">
- {{label}}
- <slot />
- </view>
- <!-- content -->
- <view class="{{classPrefix}}__description {{prefix}}-class-content " style="-webkit-line-clamp:{{maxContentRow}}">
- {{content}}
- </view>
- </view>
- <!-- 预制下边框 -->
- <view
- wx:if="{{!borderless}}"
- class="{{classPrefix}}__border {{classPrefix}}__border--{{align}} {{prefix}}-class-border"
- ></view>
- </view>
|