index.vue 782 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <template>
  2. <view class="content">
  3. <view class="header">
  4. <Icon name="icon-yuyan" size="48" color="#007AFF" @click="handleIconClick"></Icon>
  5. <text class="title">我的</text>
  6. </view>
  7. <!-- 引入底部导航栏 -->
  8. <tabbar />
  9. </view>
  10. </template>
  11. <script setup>
  12. import Icon from '@/components/icon/index.vue';
  13. import { onShow } from '@dcloudio/uni-app';
  14. import tabbar from '@/components/tabbar/index.vue'
  15. onShow(() => {
  16. // 触发tabbar更新
  17. uni.$emit('onShow');
  18. });
  19. const handleIconClick = () => {
  20. uni.showToast({
  21. title: '点击了图标',
  22. icon: 'none'
  23. });
  24. };
  25. </script>
  26. <style lang="scss" scoped>
  27. .content {
  28. background: #eeeeee;
  29. min-height: 100vh;
  30. }
  31. </style>