123456789101112131415161718192021222324252627 |
- <template>
- <template v-if="!translationVal">
- {{ translationValue }}
- </template>
- <template v-else>
- <ww-open-data :type="translationTypes" :openid="translationValue"></ww-open-data>
- </template>
- </template>
- <script lang="ts" setup>
- import { ref, reactive, onMounted, inject, watchEffect, computed } from 'vue';
- import { useStore } from '@/store/index'
- import { storeToRefs } from 'pinia';
- interface Props {
- translationTypes: translationType;
- translationValue: string;
- }
- const props = defineProps<Props>();
- const { userInfo } = storeToRefs(useStore());
- const translationVal = ref(false);
- onMounted(() => {
- translationVal.value = userInfo.value.userNameNeedTranslate == 0 ? false : true;
- })
- </script>
|