云链智安app
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

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>