data-index.vue 890 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <template>
  2. <div id="data-index">
  3. <data-slot>
  4. <component :is="model"></component>
  5. </data-slot>
  6. </div>
  7. </template>
  8. <script>
  9. import dataSlot from './data-slot.vue';
  10. import { mapState, createNamespacedHelpers } from 'vuex';
  11. export default {
  12. name: 'data-index',
  13. props: {},
  14. components: {
  15. dataSlot,
  16. modelexpert: () => import('../expert/index.vue'),
  17. modelproduct: () => import('../product/index.vue'),
  18. modelnews: () => import('../news/index.vue'),
  19. },
  20. data: function() {
  21. return {};
  22. },
  23. created() {},
  24. methods: {},
  25. computed: {
  26. ...mapState(['user']),
  27. model() {
  28. return `model${this.$route.query.viewType}`;
  29. },
  30. },
  31. metaInfo() {
  32. return { title: this.$route.meta.title };
  33. },
  34. watch: {
  35. test: {
  36. deep: true,
  37. immediate: true,
  38. handler(val) {},
  39. },
  40. },
  41. };
  42. </script>
  43. <style lang="less" scoped></style>