demo6.vue 835 B

1234567891011121314151617181920212223242526
  1. <template>
  2. <div>
  3. <m-checkbox v-model="checked1" border>备选项1</m-checkbox>
  4. <m-checkbox v-model="checked2" border>备选项2</m-checkbox>
  5. </div>
  6. <div style="margin-top: 20px">
  7. <m-checkbox-group v-model="checkboxGroup1">
  8. <m-checkbox label="备选项1" border></m-checkbox>
  9. <m-checkbox label="备选项2" border disabled></m-checkbox>
  10. </m-checkbox-group>
  11. </div>
  12. <div style="margin-top: 20px">
  13. <m-checkbox-group v-model="checkboxGroup2" disabled>
  14. <m-checkbox label="备选项1" border></m-checkbox>
  15. <m-checkbox label="备选项2" border></m-checkbox>
  16. </m-checkbox-group>
  17. </div>
  18. </template>
  19. <script setup>
  20. import { ref } from 'vue-demi'
  21. const checked1 = ref(true)
  22. const checked2 = ref(false)
  23. const checkboxGroup1 = ref(['备选项1'])
  24. const checkboxGroup2 = ref([])
  25. </script>