riku
2024-08-13 1a0e4972f80278bfa9e53283374b745b6c968341
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<wxs src="../common/utils.wxs" module="_" />
<import src="../common/template/icon.wxml" />
 
<view
  class="{{className}} class {{prefix}}-class"
  style="{{_._style([tagStyle, style, customStyle])}}"
  bind:tap="handleClick"
>
  <view aria-hidden="{{true}}" class="{{classPrefix}}__icon">
    <template wx:if="{{_icon}}" is="icon" data="{{ tClass: prefix + '-icon', ..._icon }}" />
    <slot name="icon" />
  </view>
  <view class="{{classPrefix}}__text">
    <slot />
  </view>
  <t-icon
    wx:if="{{ closable }}"
    class="{{classPrefix}}__icon-close"
    t-class="{{prefix}}-icon"
    catch:tap="handleClose"
    name="close"
    aria-role="button"
    aria-label="关闭"
  />
</view>