f51371bbe0
- remove from created / mounted - initialize component services in data - use immediate watcher where appropriate - deep watch for route changes
29 lines
No EOL
459 B
Vue
29 lines
No EOL
459 B
Vue
<template>
|
|
<div class="content has-text-centered">
|
|
<ShowTasks
|
|
:end-date="endDate"
|
|
:start-date="startDate"
|
|
/>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import ShowTasks from './ShowTasks'
|
|
|
|
function getNextWeekDate() {
|
|
return new Date((new Date()).getTime() + 7 * 24 * 60 * 60 * 1000)
|
|
}
|
|
|
|
export default {
|
|
name: 'ShowTasksInRange',
|
|
components: {
|
|
ShowTasks,
|
|
},
|
|
data() {
|
|
return {
|
|
startDate: new Date(),
|
|
endDate: getNextWeekDate(),
|
|
}
|
|
},
|
|
}
|
|
</script> |