<template>
|
<ProTabs v-model="channlesType" name="user-home-tabs" class="user-home-tabs" flexTitle fullHeight>
|
<ProTabPane
|
:title="item.name"
|
:pane-key="item.channlesNum"
|
v-for="item in userChannles"
|
:key="item.channlesNum"
|
>
|
<ShareQrcodeView :channles-num="item.channlesNum" />
|
</ProTabPane>
|
</ProTabs>
|
</template>
|
|
<script setup lang="ts">
|
import { ShareQrcodeView } from '@life-payment/components';
|
import { useUser } from '@/hooks';
|
|
defineOptions({
|
name: 'InnerPage',
|
});
|
|
const { virtualUserInfo } = useUser();
|
|
const userChannles = computed(() => virtualUserInfo.value.channlesNum ?? []);
|
|
const channlesType = ref(userChannles.value[0]?.channlesNum ?? '');
|
|
watch(userChannles, (val) => {
|
channlesType.value = val?.[0]?.channlesNum ?? '';
|
});
|
</script>
|