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 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 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 14 \ No newline at end of file
... ...
src/index.js
... ... @@ -40,6 +40,7 @@ import Timeline from &#39;./components/timeline&#39;;
40 40 import TimePicker from './components/time-picker';
41 41 import Tooltip from './components/tooltip';
42 42 import Transfer from './components/transfer';
  43 +import Tree from './components/tree';
43 44 import Upload from './components/upload';
44 45 import { Row, Col } from './components/layout';
45 46 import { Select, Option, OptionGroup } from './components/select';
... ... @@ -105,6 +106,7 @@ const iview = {
105 106 TimePicker,
106 107 Tooltip,
107 108 Transfer,
  109 + Tree,
108 110 Upload
109 111 };
110 112  
... ...
src/styles/components/index.less
... ... @@ -37,4 +37,5 @@
37 37 @import "form";
38 38 @import "carousel";
39 39 @import "rate";
40   -@import "upload";
41 40 \ No newline at end of file
  41 +@import "upload";
  42 +@import "tree";
42 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 6 \ No newline at end of file
... ...
test/app.vue
... ... @@ -50,6 +50,7 @@ li + li {
50 50 <li><a v-link="'/carousel'">Carousel</a></li>
51 51 <li><a v-link="'/rate'">Rate</a></li>
52 52 <li><a v-link="'/upload'">Upload</a></li>
  53 + <li><a v-link="'/tree'">Tree</a></li>
53 54 </ul>
54 55 </nav>
55 56 <router-view></router-view>
... ...
test/main.js
... ... @@ -150,6 +150,11 @@ router.map({
150 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 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 14 \ No newline at end of file
... ...