diff options
| author | taehoon <th.dev91@gmail.com> | 2019-08-09 23:48:08 -0400 |
|---|---|---|
| committer | taehoon <th.dev91@gmail.com> | 2019-08-15 13:25:38 -0400 |
| commit | df3e80b7c3fc91cbd62764be467d1dfe28b4b299 (patch) | |
| tree | 266b9addd6c988322da35a291cb6d9dbf5c6b00e /src/components/search | |
| parent | cd14566a34013e65b603a71208d058871e992956 (diff) | |
use key prop instead of dataset to identify active tab
Diffstat (limited to 'src/components/search')
| -rw-r--r-- | src/components/search/search.js | 4 | ||||
| -rw-r--r-- | src/components/search/search.vue | 9 |
2 files changed, 5 insertions, 8 deletions
diff --git a/src/components/search/search.js b/src/components/search/search.js index 37940f34..8e903052 100644 --- a/src/components/search/search.js +++ b/src/components/search/search.js @@ -75,8 +75,8 @@ const Search = { const length = this[tabName].length return length === 0 ? '' : ` (${length})` }, - onResultTabSwitch (dataset) { - this.currenResultTab = dataset.filter + onResultTabSwitch (key) { + this.currenResultTab = key }, getActiveTab () { if (this.visibleStatuses.length > 0) { diff --git a/src/components/search/search.vue b/src/components/search/search.vue index 4350e672..eb20973b 100644 --- a/src/components/search/search.vue +++ b/src/components/search/search.vue @@ -34,18 +34,15 @@ :custom-active="currenResultTab" > <span - data-tab-dummy - data-filter="statuses" + key="statuses" :label="$t('user_card.statuses') + resultCount('visibleStatuses')" /> <span - data-tab-dummy - data-filter="people" + key="people" :label="$t('search.people') + resultCount('users')" /> <span - data-tab-dummy - data-filter="hashtags" + key="hashtags" :label="$t('search.hashtags') + resultCount('hashtags')" /> </tab-switcher> |
