classcard-ui 0.2.580 → 0.2.584
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/classcard-ui.common.js +59 -87
- package/dist/classcard-ui.common.js.map +1 -1
- package/dist/classcard-ui.umd.js +59 -87
- package/dist/classcard-ui.umd.js.map +1 -1
- package/dist/classcard-ui.umd.min.js +1 -1
- package/dist/classcard-ui.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/components/CTabs/CTabs.vue +10 -30
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
3
|
<slot></slot>
|
|
4
|
-
<div class="lg:hidden">
|
|
4
|
+
<!-- <div class="lg:hidden">
|
|
5
5
|
<label for="tabs" class="sr-only">Select a tab</label>
|
|
6
6
|
<select
|
|
7
7
|
v-model="activeTab"
|
|
@@ -14,21 +14,16 @@
|
|
|
14
14
|
</option>
|
|
15
15
|
</select>
|
|
16
16
|
<div>
|
|
17
|
-
<slot :name="
|
|
17
|
+
<slot :name="`tab-panel-${this.activeTab}`"></slot>
|
|
18
18
|
</div>
|
|
19
|
-
</div>
|
|
19
|
+
</div> -->
|
|
20
20
|
<div class="hidden lg:block">
|
|
21
21
|
<div class="border-b border-gray-200">
|
|
22
|
-
<nav :class="classes" class="-mb-px flex" aria-label="Tabs">
|
|
22
|
+
<!-- <nav :class="classes" class="-mb-px flex" aria-label="Tabs">
|
|
23
23
|
<a
|
|
24
24
|
v-for="tab in tabs"
|
|
25
25
|
:key="tab.text"
|
|
26
26
|
@click="switchTab(tab.name)"
|
|
27
|
-
:class="
|
|
28
|
-
activeTab == tab.name
|
|
29
|
-
? 'border-indigo-600 text-indigo-700 hover:text-indigo-800'
|
|
30
|
-
: 'border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700'
|
|
31
|
-
"
|
|
32
27
|
class="group inline-flex cursor-pointer items-center whitespace-nowrap border-b-2 py-4 px-1 text-sm font-medium"
|
|
33
28
|
>
|
|
34
29
|
<c-icon
|
|
@@ -36,23 +31,13 @@
|
|
|
36
31
|
:name="tab.icon"
|
|
37
32
|
class="-ml-0.5 mr-2 h-5 w-5"
|
|
38
33
|
type="solid"
|
|
39
|
-
:class="
|
|
40
|
-
activeTab == tab.name
|
|
41
|
-
? 'text-indigo-700 group-hover:text-indigo-800'
|
|
42
|
-
: 'text-gray-400 group-hover:text-gray-500 '
|
|
43
|
-
"
|
|
44
34
|
></c-icon>
|
|
45
35
|
<span
|
|
46
|
-
:class="
|
|
47
|
-
activeTab == tab.name
|
|
48
|
-
? 'text-indigo-700'
|
|
49
|
-
: 'text-gray-500 hover:text-gray-700'
|
|
50
|
-
"
|
|
51
36
|
>
|
|
52
37
|
<slot :name="tabHeadSlotName(tab.text)"></slot>{{ tab.text }}
|
|
53
38
|
</span>
|
|
54
39
|
</a>
|
|
55
|
-
</nav>
|
|
40
|
+
</nav> -->
|
|
56
41
|
</div>
|
|
57
42
|
{{activeTab}}
|
|
58
43
|
<div v-for="(tab, index) in tabs" :key="index">
|
|
@@ -66,10 +51,10 @@
|
|
|
66
51
|
</template>
|
|
67
52
|
|
|
68
53
|
<script>
|
|
69
|
-
import CIcon from "../CIcon/CIcon.vue";
|
|
54
|
+
// import CIcon from "../CIcon/CIcon.vue";
|
|
70
55
|
export default {
|
|
71
56
|
name: "CTabs",
|
|
72
|
-
components: { CIcon },
|
|
57
|
+
// components: { CIcon },
|
|
73
58
|
props: {
|
|
74
59
|
tabs: {
|
|
75
60
|
type: Array,
|
|
@@ -87,11 +72,6 @@ export default {
|
|
|
87
72
|
activeTab: this.initialTab,
|
|
88
73
|
};
|
|
89
74
|
},
|
|
90
|
-
computed: {
|
|
91
|
-
tabPanelSlotName() {
|
|
92
|
-
return `tab-panel-${this.activeTab}`;
|
|
93
|
-
},
|
|
94
|
-
},
|
|
95
75
|
methods: {
|
|
96
76
|
switchTab(tabText) {
|
|
97
77
|
console.log(tabText);
|
|
@@ -101,9 +81,9 @@ export default {
|
|
|
101
81
|
var selectedOption = this.tabs[index];
|
|
102
82
|
this.activeTab = selectedOption.name;
|
|
103
83
|
},
|
|
104
|
-
tabHeadSlotName(tabName) {
|
|
105
|
-
|
|
106
|
-
},
|
|
84
|
+
// tabHeadSlotName(tabName) {
|
|
85
|
+
// return `tab-head-${tabName}`;
|
|
86
|
+
// },
|
|
107
87
|
},
|
|
108
88
|
watch: {
|
|
109
89
|
initialTab() {
|