index.vue 2.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <template>
  2. <uni-shadow-root class="vant-goods-action-icon-index"><van-button square :id="id" size="large" :lang="lang" :loading="loading" :disabled="disabled" :open-type="openType" :business-id="businessId" custom-class="van-goods-action-icon" :session-from="sessionFrom" :app-parameter="appParameter" :send-message-img="sendMessageImg" :send-message-path="sendMessagePath" :show-message-card="showMessageCard" :send-message-title="sendMessageTitle" @click="onClick" @error="bindError" @contact="bindContact" @opensetting="bindOpenSetting" @getuserinfo="bindGetUserInfo" @getphonenumber="bindGetPhoneNumber" @launchapp="bindLaunchApp">
  3. <view class="van-goods-action-icon__content van-hairline--right">
  4. <van-icon size="20px" :name="icon" :info="info" class="van-goods-action-icon__icon" custom-class="icon-class"></van-icon>
  5. <text class="text-class">{{ text }}</text>
  6. </view>
  7. </van-button></uni-shadow-root>
  8. </template>
  9. <script>
  10. import VanIcon from '../icon/index.vue'
  11. import VanButton from '../button/index.vue'
  12. global['__wxVueOptions'] = {components:{'van-icon': VanIcon,'van-button': VanButton}}
  13. global['__wxRoute'] = 'vant/goods-action-icon/index'
  14. import { VantComponent } from '../common/component';
  15. import { link } from '../mixins/link';
  16. import { button } from '../mixins/button';
  17. import { openType } from '../mixins/open-type';
  18. VantComponent({
  19. classes: ['icon-class', 'text-class'],
  20. mixins: [link, button, openType],
  21. props: {
  22. text: String,
  23. info: String,
  24. icon: String,
  25. disabled: Boolean,
  26. loading: Boolean
  27. },
  28. methods: {
  29. onClick(event) {
  30. this.$emit('click', event.detail);
  31. this.jumpLink();
  32. }
  33. }
  34. });
  35. export default global['__wxComponents']['vant/goods-action-icon/index']
  36. </script>
  37. <style platform="mp-weixin">
  38. @import '../common/index.css';.van-goods-action-icon{width:50px!important;border:none!important}.van-goods-action-icon__content{display:-webkit-flex;display:flex;height:100%;font-size:10px;line-height:1;color:#7d7e80;-webkit-flex-direction:column;flex-direction:column;-webkit-justify-content:center;justify-content:center}.van-goods-action-icon__icon{margin-bottom:4px}
  39. </style>