index.vue 1.6KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <template>
  2. <uni-shadow-root class="vant-goods-action-button-index"><van-button square :id="id" size="large" :lang="lang" :type="type" :loading="loading" :disabled="disabled" :open-type="openType" custom-class="custom-class" :business-id="businessId" :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. {{ text }}
  4. </van-button></uni-shadow-root>
  5. </template>
  6. <script>
  7. import VanButton from '../button/index.vue'
  8. global['__wxVueOptions'] = {components:{'van-button': VanButton}}
  9. global['__wxRoute'] = 'vant/goods-action-button/index'
  10. import { VantComponent } from '../common/component';
  11. import { link } from '../mixins/link';
  12. import { button } from '../mixins/button';
  13. import { openType } from '../mixins/open-type';
  14. VantComponent({
  15. mixins: [link, button, openType],
  16. props: {
  17. text: String,
  18. loading: Boolean,
  19. disabled: Boolean,
  20. type: {
  21. type: String,
  22. value: 'danger'
  23. }
  24. },
  25. methods: {
  26. onClick(event) {
  27. this.$emit('click', event.detail);
  28. this.jumpLink();
  29. }
  30. }
  31. });
  32. export default global['__wxComponents']['vant/goods-action-button/index']
  33. </script>
  34. <style platform="mp-weixin">
  35. @import '../common/index.css';.vant-goods-action-button-index{-webkit-flex:1;flex:1}
  36. </style>