1
0
Fork 0

After table style, before redux

This commit is contained in:
Joe Wroten 2017-05-07 19:55:34 -04:00
parent b679575e0f
commit fec38cfbb2
5 changed files with 62 additions and 26 deletions

View file

@ -62,6 +62,7 @@
"webpack": "^2.2.1",
"webpack-dev-middleware": "^1.8.4",
"webpack-hot-middleware": "^2.17.0",
"webpack-merge": "^4.0.0"
"webpack-merge": "^4.0.0",
"whatwg-fetch": "^2.0.3"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

View file

@ -6,26 +6,51 @@
</q-toolbar-title>
</div>
<!--
Replace following "div" with
"<router-view class="layout-view">" component
if using subRoutes
-->
<div class="layout-view">
<spell-list></spell-list>
<spell-list :spells="store.data"></spell-list>
</div>
</q-layout>
</template>
<script>
import { Loading } from 'quasar'
import Vue from 'vue'
import SpellList from './Spelllist'
import 'whatwg-fetch'
let temporaryData = {
loaded: true,
data: [
{
title: 'example 1',
description: 'foo'
}, {
title: 'example 2',
description: 'bar'
}
]
}
Vue.component('spell-list', SpellList)
export default {
data () {
return {}
return {
store: {
loaded: false,
data: []
}
}
},
mounted () {
if (this.store.loaded === false) {
Loading.show()
}
setTimeout(() => {
this.store = temporaryData
Loading.hide()
}, 2000)
}
}
</script>

View file

@ -1,7 +1,14 @@
<template>
<q-collapsible :label="spell.title" group="spells">
<tr>
<td colspan="3">
<q-collapsible
:label="spell.title"
group="spells"
>
{{spell.description}}
</q-collapsible>
</td>
</tr>
</template>
<script>

View file

@ -1,5 +1,18 @@
<template>
<table class="list">
<table class="spell-list q-table highlight compact striped-even">
<thead>
<tr>
<th class="text-left">
<big>Name</big>
</th>
<th class="text-left">
<big>School</big>
</th>
<th class="text-right">
<big>Level</big>
</th>
</tr>
</thead>
<tr
is="spell-item"
v-for="spell in spells"
@ -16,23 +29,13 @@ import SpellItem from './Spellitem'
Vue.component('spell-item', SpellItem)
export default {
data () {
return {
spells: [
{
title: 'example 1',
description: 'foo'
}, {
title: 'example 2',
description: 'bar'
}
props: [
'spells'
]
}
}
}
</script>
<style scoped lang="stylus">
.list
.spell-list
width: 100%
</style>