File tree Expand file tree Collapse file tree 1 file changed +36
-5
lines changed
Expand file tree Collapse file tree 1 file changed +36
-5
lines changed Original file line number Diff line number Diff line change 77 </div >
88 </div >
99 <div class =" tabs" >
10- <input type =" radio" id =" todayTab" name =" tab-control" checked />
11- <input type =" radio" id =" allTimeTab" name =" tab-control" />
12- <input type =" radio" id =" byDaysTab" name =" tab-control" />
10+ <input
11+ type =" radio"
12+ id =" todayTab"
13+ name =" tab-control"
14+ checked
15+ v-on:change =" selectTab(TypeOfList.Today)"
16+ />
17+ <input
18+ type =" radio"
19+ id =" allTimeTab"
20+ name =" tab-control"
21+ v-on:change =" selectTab(TypeOfList.All)"
22+ />
23+ <input
24+ type =" radio"
25+ id =" byDaysTab"
26+ name =" tab-control"
27+ v-on:change =" selectTab(TypeOfList.ByDays)"
28+ />
1329 <ul >
1430 <li title =" Today" >
1531 <label for =" todayTab" role =" button" ><span >Today</span ></label >
2541 <div class =" slider" ><div class =" indicator" ></div ></div >
2642 <div class =" content" >
2743 <section >
28- <TabList :type =" TypeOfList.Today" :showAllStats =" false" />
44+ <TabList
45+ v-if =" activeTab == TypeOfList.Today"
46+ :type =" TypeOfList.Today"
47+ :showAllStats =" false"
48+ />
2949 </section >
3050 <section >
31- <TabList :type =" TypeOfList.All" :showAllStats =" true" />
51+ <TabList v-if = " activeTab == TypeOfList.All " :type =" TypeOfList.All" :showAllStats =" true" />
3252 </section >
3353 <section >
3454 <h2 >Shipping</h2 >
3858</template >
3959
4060<script lang="ts" setup>
61+ import { onMounted , ref } from ' vue' ;
4162import Browser from ' webextension-polyfill' ;
4263import TabList from ' ../components/TabList.vue' ;
4364import { TypeOfList } from ' ../utils/enums' ;
@@ -48,6 +69,16 @@ async function openSettings() {
4869 active: true ,
4970 });
5071}
72+
73+ const activeTab = ref <TypeOfList >();
74+
75+ onMounted (() => {
76+ activeTab .value = TypeOfList .Today ;
77+ });
78+
79+ function selectTab(type : TypeOfList ) {
80+ activeTab .value = type ;
81+ }
5182 </script >
5283
5384<style scoped>
You can’t perform that action at this time.
0 commit comments