浏览代码

feat (objective) : create objective component

master
Adrien 4 年前
父节点
当前提交
c70504d09a
共有 3 个文件被更改,包括 39 次插入4 次删除
  1. +2
    -2
      src/App.vue
  2. +4
    -2
      src/components/Battleground.vue
  3. +33
    -0
      src/components/Battleground/Objective.vue

+ 2
- 2
src/App.vue 查看文件

@@ -29,8 +29,8 @@ export default {
body
margin: 0

#app
font-family: 'Avenir', Helvetica, Arial, sans-serif
html
font-family: Avenir, Helvetica, Arial, sans-serif
-webkit-font-smoothing: antialiased
-moz-osx-font-smoothing: grayscale
color: $blizzard-font-color


+ 4
- 2
src/components/Battleground.vue 查看文件

@@ -1,7 +1,7 @@
<template>
<div class="battleground" v-if="battleground">
<div>Welcome to {{ battleground.name }}</div>
<Timer initialTime="90"></Timer>
<Objective></Objective>
<router-link to="/battlegrounds">Back to selector</router-link>

</div>
@@ -10,6 +10,7 @@
<script>
import BATTLEGROUNDS from '../gameInfos/maps'
import Timer from '@/components/Battleground/Timer'
import Objective from '@/components/Battleground/Objective'
export default {
name: 'Battleground',
data () {
@@ -27,7 +28,8 @@
}
},
components: {
Timer
Timer,
Objective
}
}
</script>


+ 33
- 0
src/components/Battleground/Objective.vue 查看文件

@@ -0,0 +1,33 @@
<template>

<div class="objective" :click="onClick">
<div>Here is the picture</div>

<div>Here is the objective name</div>

<div><Timer ref="timer" initialTime="90" /></div>
</div>
</template>

<script>
import Timer from '@/components/Battleground/Timer'
export default {
name: 'Objective',
data () {
return {
name: '',
initialSpawnTime: 90,
respawnTime: 120
}
},
methods: {
},
components: {
Timer
}
}
</script>

<style scoped>

</style>

正在加载...
取消
保存