From e3fc35ca5d3053b8bf835e52fd5ba0eb7fae792e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A2=81=E7=81=8F?= Date: Mon, 4 Jun 2018 17:43:23 +0800 Subject: [PATCH] add Avatar --- src/code/avatar.js | 26 +++++++++++ src/router.js | 7 +++ src/views/components/avatar.vue | 77 +++++++++++++++++++++++++++++++++ 3 files changed, 110 insertions(+) create mode 100644 src/code/avatar.js create mode 100644 src/views/components/avatar.vue diff --git a/src/code/avatar.js b/src/code/avatar.js new file mode 100644 index 0000000..c6122cf --- /dev/null +++ b/src/code/avatar.js @@ -0,0 +1,26 @@ +let code = {}; + +code.import = ` +"usingComponents": { + "i-avatar": "../../dist/avatar/index" +} +`; +code.usage = ` + + + + +A +A +A + + + + + + + + +`; + +export default code; \ No newline at end of file diff --git a/src/router.js b/src/router.js index 3528390..eac65dd 100755 --- a/src/router.js +++ b/src/router.js @@ -184,6 +184,13 @@ const routers = [ }, component: (resolve) => require(['./views/components/progress.vue'], resolve) }, + { + path: '/components/avatar', + meta: { + title: '头像 Avatar' + }, + component: (resolve) => require(['./views/components/avatar.vue'], resolve) + }, { path: '*', redirect: '/' diff --git a/src/views/components/avatar.vue b/src/views/components/avatar.vue new file mode 100644 index 0000000..5314a81 --- /dev/null +++ b/src/views/components/avatar.vue @@ -0,0 +1,77 @@ + + \ No newline at end of file