loading graphql project contents
This commit is contained in:
@@ -41,14 +41,20 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapInstanceState } from '@urbn/vuex-helpers'
|
||||
// import { mapState, mapGetters } from 'vuex'
|
||||
|
||||
import * as THREE from 'three'
|
||||
import mixins from 'components/mixins'
|
||||
import { mapState, mapGetters } from 'vuex'
|
||||
|
||||
// We'll determine our module based on the moduleName prop on this component
|
||||
// https://www.npmjs.com/package/@urbn/vuex-helpers
|
||||
const getModuleName = cmp => `project:${cmp.prtId}`
|
||||
|
||||
export default {
|
||||
name: 'ContentBlock',
|
||||
mixins: [mixins],
|
||||
props: { prtPosition: Object, prtSize: Object, prtIndex: Number, type: String, data: Object },
|
||||
props: { prtId: Number, prtIndex: Number, type: String, data: Object },
|
||||
data: () => ({
|
||||
// block3d: null,
|
||||
project: null,
|
||||
@@ -86,11 +92,15 @@ export default {
|
||||
face: null
|
||||
}),
|
||||
computed: {
|
||||
...mapState({
|
||||
projects: state => state.Projects.projects
|
||||
}),
|
||||
...mapGetters({
|
||||
getGridPos: 'Projects/getGridPos'
|
||||
// ...mapState({
|
||||
// projects: state => state.Projects.projects
|
||||
// }),
|
||||
// ...mapGetters({
|
||||
// getGridPos: 'Projects/getGridPos'
|
||||
// }),
|
||||
...mapInstanceState(getModuleName, {
|
||||
size: state => state.size,
|
||||
position: state => state.position
|
||||
}),
|
||||
color () {
|
||||
let color = 0x000000
|
||||
|
||||
Reference in New Issue
Block a user