From 871ed4d810e70da81e299059117b5382028765c1 Mon Sep 17 00:00:00 2001 From: 梁灏 Date: Mon, 5 Dec 2016 18:04:30 +0800 Subject: [PATCH] init Tabs component --- src/components/tabs/index.js | 5 +++++ src/components/tabs/pane.vue | 13 +++++++++++++ src/components/tabs/tabs.vue | 13 +++++++++++++ src/index.js | 3 +++ src/styles/components/index.less | 3 ++- src/styles/components/tabs.less | 1 + test/routers/dropdown.vue | 125 +++++++++++++++++++++++------------------------------------------------------------------------------------------------------ 7 files changed, 60 insertions(+), 103 deletions(-) create mode 100644 src/components/tabs/index.js create mode 100644 src/components/tabs/pane.vue create mode 100644 src/components/tabs/tabs.vue create mode 100644 src/styles/components/tabs.less diff --git a/src/components/tabs/index.js b/src/components/tabs/index.js new file mode 100644 index 0000000..5623ee9 --- /dev/null +++ b/src/components/tabs/index.js @@ -0,0 +1,5 @@ +import Tabs from './tabs.vue'; +import Pane from './pane.vue'; + +Tabs.Pane = Pane; +export default Tabs; \ No newline at end of file diff --git a/src/components/tabs/pane.vue b/src/components/tabs/pane.vue new file mode 100644 index 0000000..f67cf44 --- /dev/null +++ b/src/components/tabs/pane.vue @@ -0,0 +1,13 @@ + + \ No newline at end of file diff --git a/src/components/tabs/tabs.vue b/src/components/tabs/tabs.vue new file mode 100644 index 0000000..f67cf44 --- /dev/null +++ b/src/components/tabs/tabs.vue @@ -0,0 +1,13 @@ + + \ No newline at end of file diff --git a/src/index.js b/src/index.js index 1d76e17..2036c81 100644 --- a/src/index.js +++ b/src/index.js @@ -29,6 +29,7 @@ import Spin from './components/spin'; import Steps from './components/steps'; import Switch from './components/switch'; import Table from './components/table'; +import Tabs from './components/tabs'; import Tag from './components/tag'; import Timeline from './components/timeline'; import Tooltip from './components/tooltip'; @@ -78,6 +79,8 @@ const iview = { Steps, Switch, iTable: Table, + Tabs: Tabs, + TabPane: Tabs.Pane, Tag, Timeline, TimelineItem: Timeline.Item, diff --git a/src/styles/components/index.less b/src/styles/components/index.less index d22c9be..754c372 100644 --- a/src/styles/components/index.less +++ b/src/styles/components/index.less @@ -29,4 +29,5 @@ @import "cascader"; @import "transfer"; @import "table"; -@import "dropdown"; \ No newline at end of file +@import "dropdown"; +@import "tabs"; \ No newline at end of file diff --git a/src/styles/components/tabs.less b/src/styles/components/tabs.less new file mode 100644 index 0000000..c5b0489 --- /dev/null +++ b/src/styles/components/tabs.less @@ -0,0 +1 @@ +@tabs-prefix-cls: ~"@{css-prefix}tabs"; \ No newline at end of file diff --git a/test/routers/dropdown.vue b/test/routers/dropdown.vue index be3cf61..66e25d5 100644 --- a/test/routers/dropdown.vue +++ b/test/routers/dropdown.vue @@ -1,106 +1,27 @@ +