Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
study
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Damon
study
Commits
74c975be
Commit
74c975be
authored
Aug 03, 2021
by
Facius
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 学练记录跳转的位置
parent
ac9b0001
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
48 additions
and
24 deletions
+48
-24
selectCategory.vue
src/pages/learn/selectCategory.vue
+48
-24
No files found.
src/pages/learn/selectCategory.vue
View file @
74c975be
...
@@ -9,11 +9,12 @@
...
@@ -9,11 +9,12 @@
title-bold
title-bold
></u-navbar>
></u-navbar>
<!-- 标签列表 -->
<!-- 标签列表 -->
<scroll-view
<
!--
<
scroll-view
class=
"select-category-content"
class=
"select-category-content"
scroll-y
scroll-y
:scroll-into-view=
"scrollId"
:scroll-into-view=
"scrollId"
>
>
-->
<view
class=
"select-category-content"
>
<view
v-for=
"(items, key) in labels"
:key=
"key"
class=
"label-list"
>
<view
v-for=
"(items, key) in labels"
:key=
"key"
class=
"label-list"
>
<view
<view
v-for=
"(list, index) in items"
v-for=
"(list, index) in items"
...
@@ -26,36 +27,43 @@
...
@@ -26,36 +27,43 @@
: 0,
: 0,
}"
}"
>
>
<view
class=
"label-title"
:id=
"key + index"
>
<scroll-view
<!-- 品类title -->
scroll-y
<view>
{{
:scroll-into-view=
"scrollId"
key
==
secondKey
?
labels
[
firstKey
][
0
][
index
].
label
:
'非煤矿类'
class=
"select-category-content + key"
}}
</view>
>
</view>
<view
class=
"label-title"
:id=
"key + index"
>
<view
class=
"label-content"
>
<!-- 品类title -->
<view
v-for=
"(label, ind) in list"
:key=
"ind"
class=
"label-item"
>
<view>
{{
<!-- 选中为蓝底,非选中状态为白底 -->
key
==
secondKey
?
labels
[
firstKey
][
0
][
index
].
label
:
'非煤矿类'
<view
}}
</view>
:class=
"[
</view>
'label-normal',
<view
class=
"label-content"
>
{
<view
v-for=
"(label, ind) in list"
:key=
"ind"
class=
"label-item"
>
selected: label.id == selected[key].id,
<!-- 选中为蓝底,非选中状态为白底 -->
wide: key == secondKey,
<view
},
:class=
"[
]"
'label-normal',
@click="handleClick(key, index, ind, label)"
{
>
selected: label.id == selected[key].id,
<text
class=
"label-text"
>
{{
label
.
label
}}
</text>
wide: key == secondKey,
},
]"
@click="handleClick(key, index, ind, label)"
>
<text
class=
"label-text"
>
{{
label
.
label
}}
</text>
</view>
</view>
</view>
</view>
</view>
</view>
</
scroll-
view>
</view>
</view>
</view>
</view>
<!-- 标签加载中 -->
<!-- 标签加载中 -->
<view
class=
"tag-loading-view"
v-if=
"tapLoading"
>
<view
class=
"tag-loading-view"
v-if=
"tapLoading"
>
<u-loading
mode=
"flower"
></u-loading>
<u-loading
mode=
"flower"
></u-loading>
</view>
</view>
</scroll-view>
<!--
</scroll-view>
-->
</view>
</view>
</view>
</
template
>
</
template
>
...
@@ -164,6 +172,22 @@ export default {
...
@@ -164,6 +172,22 @@ export default {
for
(
var
item
of
res
)
{
for
(
var
item
of
res
)
{
if
(
item
.
parentId
==
data
.
id
)
{
if
(
item
.
parentId
==
data
.
id
)
{
this
.
labels
[
key2
][
i
].
push
(
item
)
this
.
labels
[
key2
][
i
].
push
(
item
)
this
.
labels
[
key2
][
i
].
push
(
item
)
this
.
labels
[
key2
][
i
].
push
(
item
)
this
.
labels
[
key2
][
i
].
push
(
item
)
this
.
labels
[
key2
][
i
].
push
(
item
)
this
.
labels
[
key2
][
i
].
push
(
item
)
this
.
labels
[
key2
][
i
].
push
(
item
)
this
.
labels
[
key2
][
i
].
push
(
item
)
this
.
labels
[
key2
][
i
].
push
(
item
)
this
.
labels
[
key2
][
i
].
push
(
item
)
this
.
labels
[
key2
][
i
].
push
(
item
)
this
.
labels
[
key2
][
i
].
push
(
item
)
this
.
labels
[
key2
][
i
].
push
(
item
)
this
.
labels
[
key2
][
i
].
push
(
item
)
this
.
labels
[
key2
][
i
].
push
(
item
)
this
.
labels
[
key2
][
i
].
push
(
item
)
this
.
labels
[
key2
][
i
].
push
(
item
)
}
}
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment