index.vue 549 B

123456789101112131415161718192021222324252627
  1. <template>
  2. <div class="btn-list">
  3. <a-button :class="item.className"
  4. v-for="item in btnList"
  5. :key="item.lable"
  6. @click="item.callback">
  7. {{item.lable}}
  8. </a-button>
  9. </div>
  10. </template>
  11. <script lang="ts">
  12. import { defineComponent, PropType } from 'vue';
  13. import { BtnList } from './interface';
  14. export default defineComponent({
  15. props: {
  16. btnList: {
  17. default: [],
  18. type: Array as PropType<BtnList[]>,
  19. },
  20. },
  21. });
  22. </script>
  23. <style lang="scss">
  24. </style>