From 59a3b893b73d441a064eccc8e1698b8899d0c985 Mon Sep 17 00:00:00 2001 From: 梁灏 Date: Wed, 20 Jun 2018 15:17:54 +0800 Subject: [PATCH] add Cell component for init --- examples/app.vue | 1 + examples/main.js | 4 ++++ examples/routers/cell.vue | 14 ++++++++++++++ src/components/cell-group/index.js | 2 ++ src/components/cell/cell-group.vue | 11 +++++++++++ src/components/cell/cell.vue | 11 +++++++++++ src/components/cell/index.js | 5 +++++ src/index.js | 3 +++ src/styles/components/cell.less | 5 +++++ src/styles/components/index.less | 1 + 10 files changed, 57 insertions(+), 0 deletions(-) create mode 100644 examples/routers/cell.vue create mode 100644 src/components/cell-group/index.js create mode 100644 src/components/cell/cell-group.vue create mode 100644 src/components/cell/cell.vue create mode 100644 src/components/cell/index.js create mode 100644 src/styles/components/cell.less diff --git a/examples/app.vue b/examples/app.vue index 5f4c330..4585a6e 100644 --- a/examples/app.vue +++ b/examples/app.vue @@ -66,6 +66,7 @@ nav {
  • Scroll
  • Divider
  • Time
  • +
  • Cell
  • diff --git a/examples/main.js b/examples/main.js index a9d8b26..15aea70 100644 --- a/examples/main.js +++ b/examples/main.js @@ -218,6 +218,10 @@ const router = new VueRouter({ { path: '/time', component: (resolve) => require(['./routers/time.vue'], resolve) + }, + { + path: '/cell', + component: (resolve) => require(['./routers/cell.vue'], resolve) } ] }); diff --git a/examples/routers/cell.vue b/examples/routers/cell.vue new file mode 100644 index 0000000..fb8956f --- /dev/null +++ b/examples/routers/cell.vue @@ -0,0 +1,14 @@ + + diff --git a/src/components/cell-group/index.js b/src/components/cell-group/index.js new file mode 100644 index 0000000..f17d12e --- /dev/null +++ b/src/components/cell-group/index.js @@ -0,0 +1,2 @@ +import CellGroup from '../cell/cell-group.vue'; +export default CellGroup; \ No newline at end of file diff --git a/src/components/cell/cell-group.vue b/src/components/cell/cell-group.vue new file mode 100644 index 0000000..7cc468d --- /dev/null +++ b/src/components/cell/cell-group.vue @@ -0,0 +1,11 @@ + + \ No newline at end of file diff --git a/src/components/cell/cell.vue b/src/components/cell/cell.vue new file mode 100644 index 0000000..7cc468d --- /dev/null +++ b/src/components/cell/cell.vue @@ -0,0 +1,11 @@ + + \ No newline at end of file diff --git a/src/components/cell/index.js b/src/components/cell/index.js new file mode 100644 index 0000000..2b504c2 --- /dev/null +++ b/src/components/cell/index.js @@ -0,0 +1,5 @@ +import Cell from './cell.vue'; +import CellGroup from './cell-group.vue'; + +Cell.Group = CellGroup; +export default Cell; \ No newline at end of file diff --git a/src/index.js b/src/index.js index c8dd358..af25aa1 100644 --- a/src/index.js +++ b/src/index.js @@ -11,6 +11,7 @@ import Button from './components/button'; import Card from './components/card'; import Carousel from './components/carousel'; import Cascader from './components/cascader'; +import Cell from './components/cell'; import Checkbox from './components/checkbox'; import Circle from './components/circle'; import Collapse from './components/collapse'; @@ -74,6 +75,8 @@ const components = { Carousel, CarouselItem: Carousel.Item, Cascader, + Cell, + CellGroup: Cell.Group, Checkbox, CheckboxGroup: Checkbox.Group, Col, diff --git a/src/styles/components/cell.less b/src/styles/components/cell.less new file mode 100644 index 0000000..9edbbf9 --- /dev/null +++ b/src/styles/components/cell.less @@ -0,0 +1,5 @@ +@cell-prefix-cls: ~"@{css-prefix}cell"; + +.@{cell-prefix-cls} { + +} \ No newline at end of file diff --git a/src/styles/components/index.less b/src/styles/components/index.less index 7944f68..290a1e7 100644 --- a/src/styles/components/index.less +++ b/src/styles/components/index.less @@ -48,3 +48,4 @@ @import "divider"; @import "anchor"; @import "time"; +@import "cell"; \ No newline at end of file -- libgit2 0.21.4