demo5.vue 856 B

1234567891011121314151617181920212223
  1. <template>
  2. <div>
  3. <m-radio-group v-model="tabPosition" style="margin-bottom: 30px;">
  4. <m-radio-button label="top"></m-radio-button>
  5. <m-radio-button label="right"></m-radio-button>
  6. <m-radio-button label="bottom"></m-radio-button>
  7. <m-radio-button label="left"></m-radio-button>
  8. </m-radio-group>
  9. <m-tabs v-model="activeName" :tab-position="tabPosition" style="height: 200px;">
  10. <m-tab-pane label="选项一" name="first">内容一</m-tab-pane>
  11. <m-tab-pane label="选项二" name="second">内容二</m-tab-pane>
  12. <m-tab-pane label="选项三" name="third">内容三</m-tab-pane>
  13. <m-tab-pane label="选项四" name="fourth">内容四</m-tab-pane>
  14. </m-tabs>
  15. </div>
  16. </template>
  17. <script setup>
  18. import { ref } from 'vue-demi';
  19. const tabPosition = ref('top')
  20. const activeName = ref('first')
  21. </script>