File tree 2 files changed +35
-12
lines changed
2 files changed +35
-12
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ export default {
29
29
size : PropTypes . oneOf ( [ 'default' , 'small' ] ) ,
30
30
actions : PropTypes . any ,
31
31
tabList : PropTypes . array ,
32
+ tabProps : PropTypes . object ,
32
33
tabBarExtraContent : PropTypes . any ,
33
34
activeTabKey : PropTypes . string ,
34
35
defaultActiveTabKey : PropTypes . string ,
@@ -73,6 +74,7 @@ export default {
73
74
size = 'default' ,
74
75
type,
75
76
tabList,
77
+ tabProps = { } ,
76
78
hoverable,
77
79
activeTabKey,
78
80
defaultActiveTabKey,
@@ -145,7 +147,7 @@ export default {
145
147
const hasActiveTabKey = activeTabKey !== undefined ;
146
148
const tabsProps = {
147
149
props : {
148
- size : 'large' ,
150
+ ... tabProps ,
149
151
[ hasActiveTabKey ? 'activeKey' : 'defaultActiveKey' ] : hasActiveTabKey
150
152
? activeTabKey
151
153
: defaultActiveTabKey ,
Original file line number Diff line number Diff line change 1
1
<template >
2
2
<div >
3
- <a-collapse :accordion =" true" default-active-key =" 2" :bordered =" false" >
4
- <a-collapse-panel key =" 1" header =" This is panel header 1" >
5
- <p >{{ text }}</p >
6
- </a-collapse-panel >
7
- <a-collapse-panel key =" 2" header =" This is panel header 2" :disabled =" false" >
8
- <p >{{ text }}</p >
9
- </a-collapse-panel >
10
- <a-collapse-panel key =" 3" header =" This is panel header 3" >
11
- <p >{{ text }}</p >
12
- </a-collapse-panel >
13
- </a-collapse >
3
+ <a-card
4
+ title =" 测试"
5
+ :tab-props =" { size: 'small' }"
6
+ :tab-list =" [
7
+ { key: 'tab1', tab: 'tab1' },
8
+ { key: 'tab2', tab: 'tab2' },
9
+ ]"
10
+ />
11
+ <a-card
12
+ title =" 测试"
13
+ :tab-props =" { size: 'large' }"
14
+ :tab-list =" [
15
+ { key: 'tab1', tab: 'tab1' },
16
+ { key: 'tab2', tab: 'tab2' },
17
+ ]"
18
+ />
19
+ <a-card
20
+ title =" 测试"
21
+ :tab-props =" {}"
22
+ :tab-list =" [
23
+ { key: 'tab1', tab: 'tab1' },
24
+ { key: 'tab2', tab: 'tab2' },
25
+ ]"
26
+ />
27
+ <a-card
28
+ title =" 测试"
29
+ :tab-props =" { size: 'default' }"
30
+ :tab-list =" [
31
+ { key: 'tab1', tab: 'tab1' },
32
+ { key: 'tab2', tab: 'tab2' },
33
+ ]"
34
+ />
14
35
</div >
15
36
</template >
16
37
<script >
You can’t perform that action at this time.
0 commit comments