From 6259471f4c353587a730ae945ea2bbb1a9541539 Mon Sep 17 00:00:00 2001 From: 梁灏 Date: Thu, 9 Mar 2017 18:31:47 +0800 Subject: [PATCH] support Modal --- CHANGE.md | 4 +++- README.md | 2 +- examples/app.vue | 1 + examples/main.js | 4 ++++ examples/routers/modal.vue | 94 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/components/loading-bar/loading-bar.vue | 2 +- src/components/modal/confirm.js | 16 ++++++++-------- src/components/modal/modal.vue | 63 ++++++++++++++++++++++++++++++++++++++------------------------- src/index.js | 6 +++--- 9 files changed, 153 insertions(+), 39 deletions(-) create mode 100644 examples/routers/modal.vue diff --git a/CHANGE.md b/CHANGE.md index ae7a4b1..d71c88c 100644 --- a/CHANGE.md +++ b/CHANGE.md @@ -48,4 +48,6 @@ class 改为 className ### DatePicker 使用 v-model ### LoadingBar -部分 prop 移至 data \ No newline at end of file +部分 prop 移至 data +### Modal +visible 改为 value,使用 v-model,style 改为 styles,$Modal 的关闭有改动,建议后面在纯 html 模式下测试 \ No newline at end of file diff --git a/README.md b/README.md index bdf4cbd..db181d4 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ - [x] Card - [ ] Message - [ ] Notice -- [ ] Modal +- [x] Modal - [x] Progress - [x] Badge - [x] Collapse diff --git a/examples/app.vue b/examples/app.vue index 9e9afeb..aee4fbe 100644 --- a/examples/app.vue +++ b/examples/app.vue @@ -51,6 +51,7 @@ li + li { border-left: solid 1px #bbb; padding-left: 10px; margin-left: 10px; }
  • Form
  • Table
  • LoadingBar
  • +
  • Modal
  • diff --git a/examples/main.js b/examples/main.js index 9018545..1971bf5 100644 --- a/examples/main.js +++ b/examples/main.js @@ -168,6 +168,10 @@ const router = new VueRouter({ { path: '/loading-bar', component: require('./routers/loading-bar.vue') + }, + { + path: '/modal', + component: require('./routers/modal.vue') } ] }); diff --git a/examples/routers/modal.vue b/examples/routers/modal.vue new file mode 100644 index 0000000..caef87d --- /dev/null +++ b/examples/routers/modal.vue @@ -0,0 +1,94 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/components/loading-bar/loading-bar.vue b/src/components/loading-bar/loading-bar.vue index cb62cbf..931e101 100644 --- a/src/components/loading-bar/loading-bar.vue +++ b/src/components/loading-bar/loading-bar.vue @@ -6,7 +6,7 @@