From 89f2ba8bad4a53027457bf3eeca94e749be5a7ac Mon Sep 17 00:00:00 2001 From: 梁灏 Date: Mon, 6 Feb 2017 11:24:03 +0800 Subject: [PATCH] init Tree component --- src/components/tree/index.js | 2 ++ src/components/tree/tree-node.vue | 13 +++++++++++++ src/components/tree/tree.vue | 13 +++++++++++++ src/index.js | 2 ++ src/styles/components/index.less | 3 ++- src/styles/components/tree.less | 5 +++++ test/app.vue | 1 + test/main.js | 5 +++++ test/routers/tree.vue | 13 +++++++++++++ 9 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 src/components/tree/index.js create mode 100644 src/components/tree/tree-node.vue create mode 100644 src/components/tree/tree.vue create mode 100644 src/styles/components/tree.less create mode 100644 test/routers/tree.vue diff --git a/src/components/tree/index.js b/src/components/tree/index.js new file mode 100644 index 0000000..d1a1ccb --- /dev/null +++ b/src/components/tree/index.js @@ -0,0 +1,2 @@ +import Tree from './tree.vue'; +export default Tree; \ No newline at end of file diff --git a/src/components/tree/tree-node.vue b/src/components/tree/tree-node.vue new file mode 100644 index 0000000..5bc4676 --- /dev/null +++ b/src/components/tree/tree-node.vue @@ -0,0 +1,13 @@ + + \ No newline at end of file diff --git a/src/components/tree/tree.vue b/src/components/tree/tree.vue new file mode 100644 index 0000000..5bc4676 --- /dev/null +++ b/src/components/tree/tree.vue @@ -0,0 +1,13 @@ + + \ No newline at end of file diff --git a/src/index.js b/src/index.js index ace1b36..afac97e 100644 --- a/src/index.js +++ b/src/index.js @@ -40,6 +40,7 @@ import Timeline from './components/timeline'; import TimePicker from './components/time-picker'; import Tooltip from './components/tooltip'; import Transfer from './components/transfer'; +import Tree from './components/tree'; import Upload from './components/upload'; import { Row, Col } from './components/layout'; import { Select, Option, OptionGroup } from './components/select'; @@ -105,6 +106,7 @@ const iview = { TimePicker, Tooltip, Transfer, + Tree, Upload }; diff --git a/src/styles/components/index.less b/src/styles/components/index.less index 854c90d..880f375 100644 --- a/src/styles/components/index.less +++ b/src/styles/components/index.less @@ -37,4 +37,5 @@ @import "form"; @import "carousel"; @import "rate"; -@import "upload"; \ No newline at end of file +@import "upload"; +@import "tree"; \ No newline at end of file diff --git a/src/styles/components/tree.less b/src/styles/components/tree.less new file mode 100644 index 0000000..99927cb --- /dev/null +++ b/src/styles/components/tree.less @@ -0,0 +1,5 @@ +@tree-prefix-cls: ~"@{css-prefix}tree"; + +.@{tree-prefix-cls} { + +} \ No newline at end of file diff --git a/test/app.vue b/test/app.vue index b805e40..40eab3f 100644 --- a/test/app.vue +++ b/test/app.vue @@ -50,6 +50,7 @@ li + li {
  • Carousel
  • Rate
  • Upload
  • +
  • Tree
  • diff --git a/test/main.js b/test/main.js index 8d5937f..ec30230 100644 --- a/test/main.js +++ b/test/main.js @@ -150,6 +150,11 @@ router.map({ require(['./routers/upload.vue'], resolve); } }, + '/tree': { + component: function (resolve) { + require(['./routers/tree.vue'], resolve); + } + }, }); router.beforeEach(function () { diff --git a/test/routers/tree.vue b/test/routers/tree.vue new file mode 100644 index 0000000..5bc4676 --- /dev/null +++ b/test/routers/tree.vue @@ -0,0 +1,13 @@ + + \ No newline at end of file -- libgit2 0.21.4