demo5.vue 456 B

1234567891011121314151617181920
  1. <template>
  2. <m-date-picker v-model="value1" placeholder="请选择日期" confirm @on-confirm="onConfirm"></m-date-picker>
  3. <m-date-picker class="date" v-model="value2" type="daterange" placeholder="请选择日期" confirm></m-date-picker>
  4. </template>
  5. <script setup>
  6. import { ref } from 'vue-demi';
  7. const value1 = ref()
  8. const value2 = ref([])
  9. const onConfirm = (val) => {
  10. console.log(val);
  11. }
  12. </script>
  13. <style>
  14. .date{
  15. margin-left: 50px;
  16. }
  17. </style>