From 62d9f7473157edaaf9d44c9b6081740cbe547248 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A2=81=E7=81=8F?= Date: Mon, 4 Jun 2018 14:53:09 +0800 Subject: [PATCH] add Steps --- src/code/steps.js | 144 +++++++++++++++++++++++++++++++++ src/router.js | 7 ++ src/views/components/steps.vue | 122 ++++++++++++++++++++++++++++ 3 files changed, 273 insertions(+) create mode 100644 src/code/steps.js create mode 100644 src/views/components/steps.vue diff --git a/src/code/steps.js b/src/code/steps.js new file mode 100644 index 0000000..24d2d94 --- /dev/null +++ b/src/code/steps.js @@ -0,0 +1,144 @@ +let code = {}; + +code.import = ` +"usingComponents": { + "i-steps": "../../dist/steps/index", + "i-step": "../../dist/step/index" +} +`; +code.usage = ` +基本用法 + + + + + 已完成 + + + 这里是该步骤的描述信息 + + + + + 进行中 + + + 这里是该步骤的描述信息 + + + + + 错误 + + + 这里是该步骤的描述信息 + + + + +使用 icon 图标 + + + + + 已完成 + + + 这里是该步骤的描述信息 + + + + + 进行中 + + + 这里是该步骤的描述信息 + + + + + 错误 + + + 这里是该步骤的描述信息 + + + + +步骤进度 + + + + + 已完成 + + + 这里是该步骤的描述信息 + + + + + 进行中 + + + 这里是该步骤的描述信息 + + + + + 错误 + + + 这里是该步骤的描述信息 + + + +下一步 + +垂直方向 + + + + + 已完成 + + + 这里是该步骤的描述信息 + + + + + 进行中 + + + 这里是该步骤的描述信息 + + + + + 错误 + + + 这里是该步骤的描述信息 + + + +`; + +code.js = ` +Page({ + data : { + current : 2, + verticalCurrent : 2 + }, + handleClick () { + const addCurrent = this.data.current + 1; + const current = addCurrent > 2 ? 0 : addCurrent; + this.setData({ + 'current' : current + }) + } +}); +`; + +export default code; \ No newline at end of file diff --git a/src/router.js b/src/router.js index 2a9093d..4bc4596 100755 --- a/src/router.js +++ b/src/router.js @@ -107,6 +107,13 @@ const routers = [ }, component: (resolve) => require(['./views/components/page.vue'], resolve) }, + { + path: '/components/steps', + meta: { + title: '步骤条 Steps' + }, + component: (resolve) => require(['./views/components/steps.vue'], resolve) + }, { path: '*', redirect: '/' diff --git a/src/views/components/steps.vue b/src/views/components/steps.vue new file mode 100644 index 0000000..7cf92d5 --- /dev/null +++ b/src/views/components/steps.vue @@ -0,0 +1,122 @@ + + \ No newline at end of file