After table style, before redux
This commit is contained in:
		
							parent
							
								
									b679575e0f
								
							
						
					
					
						commit
						fec38cfbb2
					
				
					 5 changed files with 62 additions and 26 deletions
				
			
		| 
						 | 
					@ -62,6 +62,7 @@
 | 
				
			||||||
    "webpack": "^2.2.1",
 | 
					    "webpack": "^2.2.1",
 | 
				
			||||||
    "webpack-dev-middleware": "^1.8.4",
 | 
					    "webpack-dev-middleware": "^1.8.4",
 | 
				
			||||||
    "webpack-hot-middleware": "^2.17.0",
 | 
					    "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  | 
| 
						 | 
					@ -6,26 +6,51 @@
 | 
				
			||||||
      </q-toolbar-title>
 | 
					      </q-toolbar-title>
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <!--
 | 
					 | 
				
			||||||
      Replace following "div" with
 | 
					 | 
				
			||||||
      "<router-view class="layout-view">" component
 | 
					 | 
				
			||||||
      if using subRoutes
 | 
					 | 
				
			||||||
    -->
 | 
					 | 
				
			||||||
    <div class="layout-view">
 | 
					    <div class="layout-view">
 | 
				
			||||||
      <spell-list></spell-list>
 | 
					      <spell-list :spells="store.data"></spell-list>
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
  </q-layout>
 | 
					  </q-layout>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<script>
 | 
					<script>
 | 
				
			||||||
 | 
					import { Loading } from 'quasar'
 | 
				
			||||||
import Vue from 'vue'
 | 
					import Vue from 'vue'
 | 
				
			||||||
import SpellList from './Spelllist'
 | 
					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)
 | 
					Vue.component('spell-list', SpellList)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
  data () {
 | 
					  data () {
 | 
				
			||||||
    return {}
 | 
					    return {
 | 
				
			||||||
 | 
					      store: {
 | 
				
			||||||
 | 
					        loaded: false,
 | 
				
			||||||
 | 
					        data: []
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  mounted () {
 | 
				
			||||||
 | 
					    if (this.store.loaded === false) {
 | 
				
			||||||
 | 
					      Loading.show()
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    setTimeout(() => {
 | 
				
			||||||
 | 
					      this.store = temporaryData
 | 
				
			||||||
 | 
					      Loading.hide()
 | 
				
			||||||
 | 
					    }, 2000)
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,7 +1,14 @@
 | 
				
			||||||
<template>
 | 
					<template>
 | 
				
			||||||
  <q-collapsible :label="spell.title" group="spells">
 | 
					  <tr>
 | 
				
			||||||
 | 
					    <td colspan="3">
 | 
				
			||||||
 | 
					      <q-collapsible
 | 
				
			||||||
 | 
					        :label="spell.title"
 | 
				
			||||||
 | 
					        group="spells"
 | 
				
			||||||
 | 
					      >
 | 
				
			||||||
        {{spell.description}}
 | 
					        {{spell.description}}
 | 
				
			||||||
      </q-collapsible>
 | 
					      </q-collapsible>
 | 
				
			||||||
 | 
					    </td>
 | 
				
			||||||
 | 
					  </tr>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<script>
 | 
					<script>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,5 +1,18 @@
 | 
				
			||||||
<template>
 | 
					<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
 | 
					    <tr
 | 
				
			||||||
      is="spell-item"
 | 
					      is="spell-item"
 | 
				
			||||||
      v-for="spell in spells"
 | 
					      v-for="spell in spells"
 | 
				
			||||||
| 
						 | 
					@ -16,23 +29,13 @@ import SpellItem from './Spellitem'
 | 
				
			||||||
Vue.component('spell-item', SpellItem)
 | 
					Vue.component('spell-item', SpellItem)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
  data () {
 | 
					  props: [
 | 
				
			||||||
    return {
 | 
					    'spells'
 | 
				
			||||||
      spells: [
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
          title: 'example 1',
 | 
					 | 
				
			||||||
          description: 'foo'
 | 
					 | 
				
			||||||
        }, {
 | 
					 | 
				
			||||||
          title: 'example 2',
 | 
					 | 
				
			||||||
          description: 'bar'
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
  ]
 | 
					  ]
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<style scoped lang="stylus">
 | 
					<style scoped lang="stylus">
 | 
				
			||||||
  .list
 | 
					  .spell-list
 | 
				
			||||||
    width: 100%
 | 
					    width: 100%
 | 
				
			||||||
</style>
 | 
					</style>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue