navigator.vue 937 B

123456789101112131415161718192021222324252627282930313233
  1. <template>
  2. <view>
  3. <page-head :title="title"></page-head>
  4. <view class="uni-padding-wrap uni-common-mt">
  5. <view class="uni-btn-v">
  6. <navigator url="navigate/navigate?title=navigate" hover-class="navigator-hover">
  7. <button type="default">跳转到新页面</button>
  8. </navigator>
  9. <navigator url="redirect/redirect?title=redirect" open-type="redirect" hover-class="other-navigator-hover">
  10. <button type="default">在当前页打开</button>
  11. </navigator>
  12. <navigator v-if="!hasLeftWin" url="/pages/tabBar/extUI/extUI" open-type="switchTab" hover-class="other-navigator-hover">
  13. <button type="default">跳转tab页面</button>
  14. </navigator>
  15. </view>
  16. </view>
  17. </view>
  18. </template>
  19. <script>
  20. import { mapState } from 'vuex'
  21. export default {
  22. data() {
  23. return {
  24. title: 'navigator'
  25. }
  26. },
  27. computed: {
  28. ...mapState({
  29. hasLeftWin: state => !state.noMatchLeftWindow
  30. })
  31. },
  32. }
  33. </script>