From 0d6fdd2bd627dad93ac17498549433167072451d Mon Sep 17 00:00:00 2001 From: baiyaaaaa Date: Tue, 23 Aug 2016 14:03:45 +0800 Subject: [PATCH] component side-nav --- examples/app.vue | 168 ++++++++++++------------------- examples/components/header.vue | 2 +- examples/components/side-nav.vue | 52 ++++++++++ examples/entry.js | 4 + examples/pages/component.vue | 38 ++++++- 5 files changed, 160 insertions(+), 104 deletions(-) create mode 100644 examples/components/side-nav.vue diff --git a/examples/app.vue b/examples/app.vue index bd917ebd..cbc1076b 100644 --- a/examples/app.vue +++ b/examples/app.vue @@ -270,115 +270,81 @@ diff --git a/examples/components/header.vue b/examples/components/header.vue index 4bafda16..8466396d 100644 --- a/examples/components/header.vue +++ b/examples/components/header.vue @@ -3,12 +3,12 @@ height: 80px; background-color: #20a0ff; color: #fff; - position: fixed; top: 0; left: 0; width: 100%; z-index: 1000; line-height: @height; + margin-bottom: 48px; .container { height: 100%; diff --git a/examples/components/side-nav.vue b/examples/components/side-nav.vue new file mode 100644 index 00000000..760711df --- /dev/null +++ b/examples/components/side-nav.vue @@ -0,0 +1,52 @@ + + + diff --git a/examples/entry.js b/examples/entry.js index 292ff3f1..ae8c0ff4 100644 --- a/examples/entry.js +++ b/examples/entry.js @@ -6,10 +6,14 @@ import Element from 'main/index.js'; import 'packages/theme-default/src/index.css'; import demoBlock from './components/demo-block.vue'; +import SideNav from './components/side-nav'; + Vue.use(Element); Vue.use(VueRouter); Vue.component('demo-block', demoBlock); +Vue.component('side-nav', SideNav); + const router = new VueRouter({ base: __dirname, routes: configRouter diff --git a/examples/pages/component.vue b/examples/pages/component.vue index ba32c22c..449be196 100644 --- a/examples/pages/component.vue +++ b/examples/pages/component.vue @@ -1,3 +1,37 @@ \ No newline at end of file +
+ + + + +
+ +
+
+
+ +