index.vue 620 B

123456789101112131415161718192021222324252627282930313233343536
  1. <template>
  2. <view class="container">
  3. <view class="intro">详情</view>
  4. <text class="intro">详见:详情</text>
  5. </view>
  6. </template>
  7. <script>
  8. import { mapActions, mapState } from 'vuex'
  9. export default {
  10. onLoad: function (option) { //option为object类型,会序列化上个页面传递的参数
  11. this.id = option.id;
  12. this.type = option.type;
  13. },
  14. computed: {
  15. ...mapState(['details'])
  16. },
  17. data() {
  18. return {
  19. id: '',
  20. type: null,
  21. }
  22. },
  23. methods: {
  24. }
  25. }
  26. </script>
  27. <style>
  28. .container {
  29. padding: 20px;
  30. font-size: 14px;
  31. line-height: 24px;
  32. }
  33. </style>