<wxs module="ripple" src="../../wxs/ripple.wxs"></wxs>
<view
  wx:if="{{component === 'view'}}"
  class="mui mui-button-base mui-ripple-base disabled-{{disabled}} {{mClass}}"
  bindtouchstart="{{ripple.touchstart}}"
  bindtouchend="{{ripple.touchend}}"
  bindtouchcancel="{{ripple.touchend}}"
  bindtap="{{ripple.tap}}"
  bindlongpress="{{ripple.longpress}}"
  disabled="{{disabled}}"
  style="{{mStyle}}"
>
  <slot />
  <!-- <mui-ripple-container class="_mui-ripple-container"></mui-ripple-container> -->
  <view
    class="mui-ripple-container"
    style="height:{{_rpcStyle.height}}px;width:{{_rpcStyle.width}}px;border-radius:{{_rpcStyle.borderRadius}}"
  >
    <view
      wx:for="{{_rippleList}}"
      wx:key="key"
      data-key="{{item.key}}"
      bindanimationend="_RippleAnimationEnd"
      class="mui-ripple {{item.rippleClass}}"
      style="width:{{_rpcStyle.radius}}px;height:{{_rpcStyle.radius}}px;top:{{item.y}}px;left:{{item.x}}px;{{rippleColor ? 'background-color:' + rippleColor : ''}}"
    />
  </view>
</view>
<button
  wx:elif="{{component === 'button'}}"
  appParameter="{{openType === 'launchApp' ? appParameter : ''}}"
  class="mui mui-button-base mui-ripple-base disabled-{{disabled}} {{mClass}}"
  bindtouchstart="{{ripple.touchstart}}"
  bindtouchend="{{ripple.touchend}}"
  bindtouchcancel="{{ripple.touchend}}"
  bindtap="{{ripple.tap}}"
  bindlongpress="{{ripple.longpress}}"
  bind:getphonenumber="{{openType === 'getPhoneNumber' ? '_openTypeEvent' : '' }}"
  bind:getuserinfo="{{openType === 'getUserInfo' ? '_openTypeEvent' : '' }}"
  bind:opensetting="{{openType === 'openSetting' ? '_openTypeEvent' : '' }}"
  bind:contact="{{openType === 'contact' ? '_openTypeEvent' : '' }}"
  bind:launchapp="{{openType === 'launchApp' ? '_openTypeEvent' : '' }}"
  disabled="{{disabled}}"
  formType="{{formType}}"
  hoverClass="{{hoverClass}}"
  hoverStopPropagation="{{hoverStopPropagation}}"
  hoverStartTime="{{hoverStartTime}}"
  hoverStayTime="{{hoverStayTime}}"
  lang="{{lang}}"
  openType="{{openType}}"
  sessionFrom="{{openType === 'contact' ? sessionFrom : ''}}"
  sendMessageTitle="{{openType === 'contact' ? sendMessageTitle : ''}}"
  sendMessagePath="{{openType === 'contact' ? sendMessagePath : ''}}"
  sendMessageImg="{{openType === 'contact' ? sendMessageImg : ''}}"
  showMessageCard="{{openType === 'contact' ? showMessageCard : ''}}"
  style="{{mStyle}}"
  size="mini"
>
  <slot />
  <!-- <mui-ripple-container class="_mui-ripple-container"></mui-ripple-container> -->
  <view
    class="mui-ripple-container"
    style="height:{{_rpcStyle.height}}px;width:{{_rpcStyle.width}}px;border-radius:{{_rpcStyle.borderRadius}};"
  >
    <view
      wx:for="{{_rippleList}}"
      wx:key="key"
      data-key="{{item.key}}"
      bindanimationend="_RippleAnimationEnd"
      class="mui-ripple {{item.rippleClass}}"
      style="width:{{_rpcStyle.radius}}px;height:{{_rpcStyle.radius}}px;top:{{item.y}}px;left:{{item.x}}px;{{rippleColor ? 'background-color:' + rippleColor : ''}}"
    />
  </view>
</button>