⏪ (home) revert ready prop
This commit is contained in:
@@ -18,7 +18,7 @@
|
|||||||
/>
|
/>
|
||||||
</section>
|
</section>
|
||||||
<div class="global-time">{{ time }}</div>
|
<div class="global-time">{{ time }}</div>
|
||||||
<div class="actions" v-if="ready">
|
<div class="actions">
|
||||||
<button v-show="timeState === 'stopped'" @click="start">commencer</button>
|
<button v-show="timeState === 'stopped'" @click="start">commencer</button>
|
||||||
<button v-show="timeState === 'started'" @click="clear">arrêter</button>
|
<button v-show="timeState === 'started'" @click="clear">arrêter</button>
|
||||||
</div>
|
</div>
|
||||||
@@ -27,12 +27,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import {
|
import { defineComponent, onUnmounted } from '@vue/composition-api'
|
||||||
defineComponent,
|
|
||||||
onUnmounted,
|
|
||||||
ref,
|
|
||||||
onMounted
|
|
||||||
} from '@vue/composition-api'
|
|
||||||
import { useTimer } from '@/hooks/useTimer'
|
import { useTimer } from '@/hooks/useTimer'
|
||||||
import DevSession from '@/components/DevSession.vue'
|
import DevSession from '@/components/DevSession.vue'
|
||||||
import ChilledMusic from '@/components/ChilledMusic.vue'
|
import ChilledMusic from '@/components/ChilledMusic.vue'
|
||||||
@@ -46,8 +41,6 @@ export default defineComponent({
|
|||||||
IntervalInput
|
IntervalInput
|
||||||
},
|
},
|
||||||
setup() {
|
setup() {
|
||||||
const ready = ref(false)
|
|
||||||
|
|
||||||
const {
|
const {
|
||||||
interval,
|
interval,
|
||||||
start,
|
start,
|
||||||
@@ -60,10 +53,6 @@ export default defineComponent({
|
|||||||
|
|
||||||
onUnmounted(clear)
|
onUnmounted(clear)
|
||||||
|
|
||||||
onMounted(() => {
|
|
||||||
ready.value = true
|
|
||||||
})
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
interval,
|
interval,
|
||||||
start,
|
start,
|
||||||
@@ -71,8 +60,7 @@ export default defineComponent({
|
|||||||
timeState,
|
timeState,
|
||||||
time,
|
time,
|
||||||
session,
|
session,
|
||||||
isProgrammer1Turn,
|
isProgrammer1Turn
|
||||||
ready
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user