Commit 89f2ba8bad4a53027457bf3eeca94e749be5a7ac

Authored by 梁灏
1 parent ff16f096

init Tree component

init Tree component
src/components/tree/index.js 0 → 100644
  1 +import Tree from './tree.vue';
  2 +export default Tree;
0 \ No newline at end of file 3 \ No newline at end of file
src/components/tree/tree-node.vue 0 → 100644
  1 +<template>
  2 +
  3 +</template>
  4 +<script>
  5 + export default {
  6 + props: {},
  7 + data () {
  8 + return {};
  9 + },
  10 + computed: {},
  11 + methods: {}
  12 + };
  13 +</script>
0 \ No newline at end of file 14 \ No newline at end of file
src/components/tree/tree.vue 0 → 100644
  1 +<template>
  2 +
  3 +</template>
  4 +<script>
  5 + export default {
  6 + props: {},
  7 + data () {
  8 + return {};
  9 + },
  10 + computed: {},
  11 + methods: {}
  12 + };
  13 +</script>
0 \ No newline at end of file 14 \ No newline at end of file
@@ -40,6 +40,7 @@ import Timeline from &#39;./components/timeline&#39;; @@ -40,6 +40,7 @@ import Timeline from &#39;./components/timeline&#39;;
40 import TimePicker from './components/time-picker'; 40 import TimePicker from './components/time-picker';
41 import Tooltip from './components/tooltip'; 41 import Tooltip from './components/tooltip';
42 import Transfer from './components/transfer'; 42 import Transfer from './components/transfer';
  43 +import Tree from './components/tree';
43 import Upload from './components/upload'; 44 import Upload from './components/upload';
44 import { Row, Col } from './components/layout'; 45 import { Row, Col } from './components/layout';
45 import { Select, Option, OptionGroup } from './components/select'; 46 import { Select, Option, OptionGroup } from './components/select';
@@ -105,6 +106,7 @@ const iview = { @@ -105,6 +106,7 @@ const iview = {
105 TimePicker, 106 TimePicker,
106 Tooltip, 107 Tooltip,
107 Transfer, 108 Transfer,
  109 + Tree,
108 Upload 110 Upload
109 }; 111 };
110 112
src/styles/components/index.less
@@ -37,4 +37,5 @@ @@ -37,4 +37,5 @@
37 @import "form"; 37 @import "form";
38 @import "carousel"; 38 @import "carousel";
39 @import "rate"; 39 @import "rate";
40 -@import "upload";  
41 \ No newline at end of file 40 \ No newline at end of file
  41 +@import "upload";
  42 +@import "tree";
42 \ No newline at end of file 43 \ No newline at end of file
src/styles/components/tree.less 0 → 100644
  1 +@tree-prefix-cls: ~"@{css-prefix}tree";
  2 +
  3 +.@{tree-prefix-cls} {
  4 +
  5 +}
0 \ No newline at end of file 6 \ No newline at end of file
@@ -50,6 +50,7 @@ li + li { @@ -50,6 +50,7 @@ li + li {
50 <li><a v-link="'/carousel'">Carousel</a></li> 50 <li><a v-link="'/carousel'">Carousel</a></li>
51 <li><a v-link="'/rate'">Rate</a></li> 51 <li><a v-link="'/rate'">Rate</a></li>
52 <li><a v-link="'/upload'">Upload</a></li> 52 <li><a v-link="'/upload'">Upload</a></li>
  53 + <li><a v-link="'/tree'">Tree</a></li>
53 </ul> 54 </ul>
54 </nav> 55 </nav>
55 <router-view></router-view> 56 <router-view></router-view>
@@ -150,6 +150,11 @@ router.map({ @@ -150,6 +150,11 @@ router.map({
150 require(['./routers/upload.vue'], resolve); 150 require(['./routers/upload.vue'], resolve);
151 } 151 }
152 }, 152 },
  153 + '/tree': {
  154 + component: function (resolve) {
  155 + require(['./routers/tree.vue'], resolve);
  156 + }
  157 + },
153 }); 158 });
154 159
155 router.beforeEach(function () { 160 router.beforeEach(function () {
test/routers/tree.vue 0 → 100644
  1 +<template>
  2 +
  3 +</template>
  4 +<script>
  5 + export default {
  6 + props: {},
  7 + data () {
  8 + return {};
  9 + },
  10 + computed: {},
  11 + methods: {}
  12 + };
  13 +</script>
0 \ No newline at end of file 14 \ No newline at end of file