layout-button-group.vue 634 B

123456789101112131415161718192021222324252627
  1. <template>
  2. <view class="button-group" :class="['button-group-'+size]">
  3. <view
  4. class="button button-class center"
  5. :class="[buttonGroupData[item].main?'button-main':'',
  6. buttonGroupData[item].fail?'button-fail':''
  7. ]"
  8. v-for="(item,index) in buttonGroup"
  9. :key="index"
  10. @click.stop="pressButton(item)"
  11. >{{buttonGroupData[item].title}}</view>
  12. </view>
  13. </template>
  14. <script>
  15. import mixins from './mixins/index';
  16. import props from './props';
  17. export default {
  18. name: "layout-button-group",
  19. mixins,
  20. props
  21. }
  22. </script>
  23. <style scoped lang="scss" src="./style.scss">
  24. </style>