云链智安app
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

CustomNavBar.vue 421B

123456789101112131415161718192021
  1. <!-- components/CustomNavBar.vue -->
  2. <template>
  3. <view class="custom-navbar">
  4. <text>{{ localizedTitle }}</text>
  5. </view>
  6. </template>
  7. <script>
  8. import { computed } from 'vue'
  9. import { useI18n } from 'vue-i18n'
  10. export default {
  11. props: ['pageKey'],
  12. setup(props) {
  13. const { t } = useI18n()
  14. const localizedTitle = computed(() => t(`pages.${props.pageKey}`))
  15. return { localizedTitle }
  16. }
  17. }
  18. </script>