From dced59c65cef2ea0f8edabd3c5629b59dd9dfa9f Mon Sep 17 00:00:00 2001 From: Kaworus <36876417+Kaworus@users.noreply.github.com> Date: Tue, 9 Mar 2021 15:52:18 +0800 Subject: [PATCH] feat: add prop tab-size for card (#3762) * feat: add param tab-size for card * feat: add param tab-size for card --- components/card/Card.jsx | 4 +++- examples/App.vue | 43 ++++++++++++++++++++++++++++++---------- 2 files changed, 35 insertions(+), 12 deletions(-) diff --git a/components/card/Card.jsx b/components/card/Card.jsx index 40d4f92759..93ab713e7c 100644 --- a/components/card/Card.jsx +++ b/components/card/Card.jsx @@ -29,6 +29,7 @@ export default { size: PropTypes.oneOf(['default', 'small']), actions: PropTypes.any, tabList: PropTypes.array, + tabProps: PropTypes.object, tabBarExtraContent: PropTypes.any, activeTabKey: PropTypes.string, defaultActiveTabKey: PropTypes.string, @@ -73,6 +74,7 @@ export default { size = 'default', type, tabList, + tabProps = {}, hoverable, activeTabKey, defaultActiveTabKey, @@ -145,7 +147,7 @@ export default { const hasActiveTabKey = activeTabKey !== undefined; const tabsProps = { props: { - size: 'large', + ...tabProps, [hasActiveTabKey ? 'activeKey' : 'defaultActiveKey']: hasActiveTabKey ? activeTabKey : defaultActiveTabKey, diff --git a/examples/App.vue b/examples/App.vue index c661e87477..93ab247cba 100644 --- a/examples/App.vue +++ b/examples/App.vue @@ -1,16 +1,37 @@