Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
hager
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2024-10-23 18:46:19 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
478a620d42077b16683f1a5e7bce7c84c0d1a99d
478a620d
1 parent
97d4e6a9
fix
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
8 deletions
components.d.ts
src/views/product/detail.vue
components.d.ts
View file @
478a620
...
...
@@ -22,6 +22,7 @@ declare module 'vue' {
ElRow
:
typeof
import
(
'element-ui/lib/row'
)[
'default'
]
ElTabPane
:
typeof
import
(
'element-ui/lib/tab-pane'
)[
'default'
]
ElTabs
:
typeof
import
(
'element-ui/lib/tabs'
)[
'default'
]
ElTooltip
:
typeof
import
(
'element-ui/lib/tooltip'
)[
'default'
]
HagerBox
:
typeof
import
(
'./src/components/common/hagerBox.vue'
)[
'default'
]
HagerCarousel
:
typeof
import
(
'./src/components/hagerCarousel.vue'
)[
'default'
]
HagerFooter
:
typeof
import
(
'./src/components/common/hagerFooter.vue'
)[
'default'
]
...
...
src/views/product/detail.vue
View file @
478a620
<!--
* @Date: 2024-09-29 14:26:41
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-10-23 18:
29:36
* @LastEditTime: 2024-10-23 18:
45:31
* @FilePath: /hager/src/views/product/detail.vue
* @Description: 文件描述
-->
...
...
@@ -56,10 +56,10 @@
<el-row :gutter="0">
<el-col :span="is_xs ? 24 : 19">
<div :class="['control-left', is_xs ? 'xs' : '']">
<div v-if="product_sample" :class="['button', is_xs ? 'xs' : '', is_active ===
0 ? 'active' : '']" @click="onClick(0,
product_sample)">产品样本</div>
<div v-if="technical_parameter" :class="['button', is_xs ? 'xs' : '', is_active ===
1 ? 'active' : '']" @click="onClick(1,
technical_parameter)">技术参数</div>
<div v-if="product_manual" :class="['button', is_xs ? 'xs' : '', is_active ===
2 ? 'active' : '']" @click="onClick(2,
product_manual)">产品说明书</div>
<div v-if="installation_tutorial" :class="['button', is_xs ? 'xs' : '', is_active ===
3 ? 'active' : '']" @click="onClick(3,
installation_tutorial)">安装教程</div>
<div v-if="product_sample" :class="['button', is_xs ? 'xs' : '', is_active ===
product_sample.id ? 'active' : '']" @click="onClick(
product_sample)">产品样本</div>
<div v-if="technical_parameter" :class="['button', is_xs ? 'xs' : '', is_active ===
technical_parameter.id ? 'active' : '']" @click="onClick(
technical_parameter)">技术参数</div>
<div v-if="product_manual" :class="['button', is_xs ? 'xs' : '', is_active ===
product_manual.id ? 'active' : '']" @click="onClick(
product_manual)">产品说明书</div>
<div v-if="installation_tutorial" :class="['button', is_xs ? 'xs' : '', is_active ===
installation_tutorial.id ? 'active' : '']" @click="onClick(
installation_tutorial)">安装教程</div>
</div>
</el-col>
<el-col v-if="!is_xs" :span="5">
...
...
@@ -126,7 +126,7 @@ export default {
mixins: [mixin.init],
data () {
return {
is_active:
0
,
is_active:
''
,
download_list: [],
images: [],
info: {},
...
...
@@ -177,13 +177,15 @@ export default {
const element = arr[index];
if (element) {
this.download_list = element;
console.warn(this.download_list);
this.is_active = this.download_list.id;
return;
}
}
}
},
onClick (
n ,
item) {
this.is_active =
n
;
onClick (item) {
this.is_active =
item.id
;
this.download_list = item;
this.download_list.forEach(item => item.checked = false);
},
...
...
Please
register
or
login
to post a comment