Skip to content
This repository was archived by the owner on May 11, 2021. It is now read-only.

Commit 464c512

Browse files
committed
修改
1 parent cdffb4e commit 464c512

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/components/parts-add-to-list/parts-add-to-list.vue

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
</div>
2424

2525
<div class="search-result-wrapper" v-show="queryKey">
26-
<PartsResult :query="queryKey" :showArtist="false"/>
26+
<PartsResult ref="searchList" :query="queryKey" :showArtist="false"/>
2727
</div>
2828

2929
</div>
@@ -47,7 +47,7 @@ export default {
4747
4848
methods: {
4949
toggleSwitchIndex (index) {
50-
this.switchIndex = (index++) % 2
50+
this.switchIndex = index
5151
},
5252
5353
getQueryKey (query) {
@@ -56,6 +56,13 @@ export default {
5656
5757
showComponent () {
5858
this.hasShowComponent = true
59+
setTimeout(() => {
60+
if (this.switchIndex === 0) {
61+
// TODO:
62+
} else {
63+
this.$refs.searchList.refresh()
64+
}
65+
}, 20)
5966
},
6067
6168
hideComponent () {

0 commit comments

Comments
 (0)