Some Vue 3 Tricks to Know
- To access the computed feature that has a type, the
.value
property is used
<script setup lang="ts">
import { onMounted, ref, computed } from 'vue';
import { date } from 'quasar';
const selectedDate = ref<string | null>(null);
const todaysDate = computed<string>(() => {
return date.formatDate(Date.now(), 'YYYY/MM/DD');
});
selectedDate.value = todaysDate.value;
</script>