云链智安app
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

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>