bug826-应用详情-功能介绍

This commit is contained in:
851673013@qq.com 2022-08-08 09:44:26 +08:00
parent cf53e51913
commit 06e9ade25d
1 changed files with 17 additions and 6 deletions

View File

@ -10,7 +10,7 @@
<div <div
v-for="(itemSonTitle, indexSonTitle) in dataFrom.attrValue" v-for="(itemSonTitle, indexSonTitle) in dataFrom.attrValue"
:key="itemSonTitle.name" :key="itemSonTitle.name"
@click="tabSwitch(itemSonTitle.name)" @click="tabSwitch(itemSonTitle.name, indexSonTitle)"
class="tab-son" class="tab-son"
:class=" :class="
tabIndexClass(indexSonTitle, dataFrom.name, dataFrom.attrValue) tabIndexClass(indexSonTitle, dataFrom.name, dataFrom.attrValue)
@ -21,7 +21,8 @@
<div <div
class="tab-top" class="tab-top"
:class=" :class="
tabInitialize() == itemSonTitle.name ? 'tab-top-down' : '' (tabInitialize() == itemSonTitle.name ? 'tab-top-down' : '') &&
dataIndex == indexSonTitle
" "
> >
{{ itemSonTitle.name }} {{ itemSonTitle.name }}
@ -29,12 +30,20 @@
</a-tooltip> </a-tooltip>
<div <div
class="tab-bottom" class="tab-bottom"
v-if="tabInitialize() == itemSonTitle.name" v-if="
tabInitialize() == itemSonTitle.name && dataIndex == indexSonTitle
"
></div> ></div>
</div> </div>
</div> </div>
<template v-for="itemSonTitle in dataFrom.attrValue" :key="itemSonTitle"> <template
<div class="content" v-if="tabindex == itemSonTitle.name"> v-for="(itemSonTitle, indexSonTitle) in dataFrom.attrValue"
:key="itemSonTitle"
>
<div
class="content"
v-if="tabindex == itemSonTitle.name && dataIndex == indexSonTitle"
>
<div class="content-left"> <div class="content-left">
<div class="content-left-scene" v-if="!itemSonTitle.img"></div> <div class="content-left-scene" v-if="!itemSonTitle.img"></div>
<a-image <a-image
@ -60,6 +69,7 @@
import DetalsTitle from '@/views/detailsAll/components/DetalsTitle' import DetalsTitle from '@/views/detailsAll/components/DetalsTitle'
import { ref, defineProps, watch } from 'vue' import { ref, defineProps, watch } from 'vue'
const flag = ref(true) const flag = ref(true)
let dataIndex = ref(0)
let dataFrom = ref([]) let dataFrom = ref([])
// tab // tab
let tabindex = ref('场景说明一') let tabindex = ref('场景说明一')
@ -105,8 +115,9 @@
return tabindex.value return tabindex.value
} }
//tab //tab
function tabSwitch(name) { function tabSwitch(name, index) {
tabindex.value = name tabindex.value = name
dataIndex.value = index
return tabindex.value return tabindex.value
} }
</script> </script>