Skip to content

Instantly share code, notes, and snippets.

@BerezhniyDmitro
Created July 20, 2018 18:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BerezhniyDmitro/72217a52216415998b8f8ef29c50a407 to your computer and use it in GitHub Desktop.
Save BerezhniyDmitro/72217a52216415998b8f8ef29c50a407 to your computer and use it in GitHub Desktop.
<template>
<div id="service-page">
{{ currentServicePageState.main }}
<ServicePageForm
:dataForm="currentServicePageState"
:initialSeoPageData="initialSeoPageData"
@back="backButtonClick"
></ServicePageForm>
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import * as types from '../../../store/types';
import ServicePageForm from '../page/ServicePageForm'
export default {
name: 'service-page',
components: {ServicePageForm},
data() {
return {
dialog: false,
titleModal: '',
}
},
computed: {
...mapGetters({
initialSeoPageData: [types.GET_DEFAULT_SEO_PAGE_DATA],
currentServicePageState: [types.GET_PAGE_SERVICES]
}),
},
mounted: function () {
this.$store.dispatch(types.LOAD_DEFAULT_SEO_PAGE_DATA);
//TODO если айдишка не пустая в URL сделать запрос на получение страницы
this.$store.dispatch(types.LOAD_PAGE_SERVICES);
},
methods: {
backButtonClick: function () {
console.log(123);
}
}
}
</script>
<style lang="sass">
#service-page
padding: 0 22px
.tabs__bar
background-color: #337ab7
.tabs__item
color: #ffffff
</style>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment