cloudroam
2025-08-12 8dd9360a0e4cfd22ea9e261bec3821eff3f57fe8
sub-pages/hot-city/index.vue
@@ -16,7 +16,7 @@
    </view>
    <!-- 标签切换部分 -->
    <up-tabs :list="tabList" @click="click">
    <up-tabs   :key="currentTab" :list="tabList" @click="click"  :current="currentTabIndex">
      <template #right>
        <view style="padding-left: 4px;" @tap="() => showToast('插槽被点击')">
          <up-icon name="list" size="40rpx" bold></up-icon>
@@ -158,7 +158,9 @@
  }
  return cities
})
const currentTabIndex = computed(() => {
  return tabList.value.findIndex(tab => tab.value === currentTab.value)
})
// 标签点击事件
// const click = (item: { name: string; value: string }) => {
//   currentTab.value = item.value
@@ -315,6 +317,26 @@
    $message.showToast("获取洲数据失败")
  }
}
defineExpose({
  onShareAppMessage() {
    return {
      title: '影视地标推荐',
      path: '/pages/home/home',
      imageUrl: '', // 可以设置默认分享图片
      desc: '发现全球影视拍摄地,探索电影背后的故事'
    }
  },
  // 分享到朋友圈
  onShareTimeline() {
    return {
      title: '影视地标推荐',
      query: '',
      imageUrl: '', // 可以设置默认分享图片
      desc: '发现全球影视拍摄地,探索电影背后的故事'
    }
  }
})
</script>
<style scoped>