refactor: update to new project structure

This commit is contained in:
chenghx
2018-09-11 11:45:32 +08:00
parent 263f3064a7
commit f8483833f1
48 changed files with 205 additions and 246 deletions

View File

@@ -1,38 +0,0 @@
<template>
<div style="display: flex">
<task-card class="task-card" title="ToDo" group="task">
<task-item :key="index" v-for="(item, index) in todoList" :content="item" />
</task-card>
<task-card class="task-card" title="In Progress" group="task">
<task-item :key="index" v-for="(item, index) in inproList" :content="item" />
</task-card>
<task-card class="task-card" title="Done" group="task">
<task-item :key="index" v-for="(item, index) in doneList" :content="item" />
</task-card>
</div>
</template>
<script>
import TaskCard from './TaskCard'
import TaskItem from './TaskItem'
const todoList = ['任务一', '任务二', '任务三', '任务四', '任务五', '任务六']
const inproList = ['任务七', '任务八', '任务九', '任务十', '任务十一', '任务十二']
const doneList = ['任务十三', '任务十四', '任务十五', '任务十六', '任务十七', '任务十八']
export default {
name: 'Index',
components: {TaskItem, TaskCard},
data () {
return {
todoList,
inproList,
doneList
}
}
}
</script>
<style lang="less" scoped>
.task-card{
margin: 0 48px;
}
</style>

View File

@@ -1,5 +1,5 @@
<template>
<div class="task-card">
<div class="task-group">
<div class="task-head">
<h3 class="title"><span v-if="count">{{count}}</span>{{title}}</h3>
<div class="actions" style="float: right">
@@ -30,7 +30,7 @@ const dragOptions = {
}
export default {
name: 'TaskCard',
name: 'TaskGroup',
components: {AIcon, Draggable},
props: ['title', 'group'],
data () {
@@ -47,7 +47,7 @@ export default {
</script>
<style lang="less">
.task-card{
.task-group{
width: 33.33%;
padding: 8px 8px;
background-color: #e1e4e8;