Showing
2 changed files
with
11 additions
and
8 deletions
| ... | @@ -22,6 +22,7 @@ declare module 'vue' { | ... | @@ -22,6 +22,7 @@ declare module 'vue' { |
| 22 | ElRow: typeof import('element-ui/lib/row')['default'] | 22 | ElRow: typeof import('element-ui/lib/row')['default'] |
| 23 | ElTabPane: typeof import('element-ui/lib/tab-pane')['default'] | 23 | ElTabPane: typeof import('element-ui/lib/tab-pane')['default'] |
| 24 | ElTabs: typeof import('element-ui/lib/tabs')['default'] | 24 | ElTabs: typeof import('element-ui/lib/tabs')['default'] |
| 25 | + ElTooltip: typeof import('element-ui/lib/tooltip')['default'] | ||
| 25 | HagerBox: typeof import('./src/components/common/hagerBox.vue')['default'] | 26 | HagerBox: typeof import('./src/components/common/hagerBox.vue')['default'] |
| 26 | HagerCarousel: typeof import('./src/components/hagerCarousel.vue')['default'] | 27 | HagerCarousel: typeof import('./src/components/hagerCarousel.vue')['default'] |
| 27 | HagerFooter: typeof import('./src/components/common/hagerFooter.vue')['default'] | 28 | HagerFooter: typeof import('./src/components/common/hagerFooter.vue')['default'] | ... | ... |
| 1 | <!-- | 1 | <!-- |
| 2 | * @Date: 2024-09-29 14:26:41 | 2 | * @Date: 2024-09-29 14:26:41 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2024-10-23 18:29:36 | 4 | + * @LastEditTime: 2024-10-23 18:45:31 |
| 5 | * @FilePath: /hager/src/views/product/detail.vue | 5 | * @FilePath: /hager/src/views/product/detail.vue |
| 6 | * @Description: 文件描述 | 6 | * @Description: 文件描述 |
| 7 | --> | 7 | --> |
| ... | @@ -56,10 +56,10 @@ | ... | @@ -56,10 +56,10 @@ |
| 56 | <el-row :gutter="0"> | 56 | <el-row :gutter="0"> |
| 57 | <el-col :span="is_xs ? 24 : 19"> | 57 | <el-col :span="is_xs ? 24 : 19"> |
| 58 | <div :class="['control-left', is_xs ? 'xs' : '']"> | 58 | <div :class="['control-left', is_xs ? 'xs' : '']"> |
| 59 | - <div v-if="product_sample" :class="['button', is_xs ? 'xs' : '', is_active === 0 ? 'active' : '']" @click="onClick(0, product_sample)">产品样本</div> | 59 | + <div v-if="product_sample" :class="['button', is_xs ? 'xs' : '', is_active === product_sample.id ? 'active' : '']" @click="onClick(product_sample)">产品样本</div> |
| 60 | - <div v-if="technical_parameter" :class="['button', is_xs ? 'xs' : '', is_active === 1 ? 'active' : '']" @click="onClick(1, technical_parameter)">技术参数</div> | 60 | + <div v-if="technical_parameter" :class="['button', is_xs ? 'xs' : '', is_active === technical_parameter.id ? 'active' : '']" @click="onClick(technical_parameter)">技术参数</div> |
| 61 | - <div v-if="product_manual" :class="['button', is_xs ? 'xs' : '', is_active === 2 ? 'active' : '']" @click="onClick(2, product_manual)">产品说明书</div> | 61 | + <div v-if="product_manual" :class="['button', is_xs ? 'xs' : '', is_active === product_manual.id ? 'active' : '']" @click="onClick(product_manual)">产品说明书</div> |
| 62 | - <div v-if="installation_tutorial" :class="['button', is_xs ? 'xs' : '', is_active === 3 ? 'active' : '']" @click="onClick(3, installation_tutorial)">安装教程</div> | 62 | + <div v-if="installation_tutorial" :class="['button', is_xs ? 'xs' : '', is_active === installation_tutorial.id ? 'active' : '']" @click="onClick(installation_tutorial)">安装教程</div> |
| 63 | </div> | 63 | </div> |
| 64 | </el-col> | 64 | </el-col> |
| 65 | <el-col v-if="!is_xs" :span="5"> | 65 | <el-col v-if="!is_xs" :span="5"> |
| ... | @@ -126,7 +126,7 @@ export default { | ... | @@ -126,7 +126,7 @@ export default { |
| 126 | mixins: [mixin.init], | 126 | mixins: [mixin.init], |
| 127 | data () { | 127 | data () { |
| 128 | return { | 128 | return { |
| 129 | - is_active: 0, | 129 | + is_active: '', |
| 130 | download_list: [], | 130 | download_list: [], |
| 131 | images: [], | 131 | images: [], |
| 132 | info: {}, | 132 | info: {}, |
| ... | @@ -177,13 +177,15 @@ export default { | ... | @@ -177,13 +177,15 @@ export default { |
| 177 | const element = arr[index]; | 177 | const element = arr[index]; |
| 178 | if (element) { | 178 | if (element) { |
| 179 | this.download_list = element; | 179 | this.download_list = element; |
| 180 | + console.warn(this.download_list); | ||
| 181 | + this.is_active = this.download_list.id; | ||
| 180 | return; | 182 | return; |
| 181 | } | 183 | } |
| 182 | } | 184 | } |
| 183 | } | 185 | } |
| 184 | }, | 186 | }, |
| 185 | - onClick (n , item) { | 187 | + onClick (item) { |
| 186 | - this.is_active = n; | 188 | + this.is_active = item.id; |
| 187 | this.download_list = item; | 189 | this.download_list = item; |
| 188 | this.download_list.forEach(item => item.checked = false); | 190 | this.download_list.forEach(item => item.checked = false); |
| 189 | }, | 191 | }, | ... | ... |
-
Please register or login to post a comment