From 79288d43dd7616be2a7b3a9a087049a71acf6b81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A2=81=E7=81=8F?= Date: Fri, 3 Mar 2017 15:19:21 +0800 Subject: [PATCH] support Poptip & clickoutside support Poptip & clickoutside --- .eslintignore | 1 + README.md | 2 +- src/components/base/popper.js | 2 +- src/components/poptip/poptip.vue | 48 ++++++++++++++++-------------- src/components/tooltip/tooltip.vue | 1 + src/directives/clickoutside.js | 20 +++++++------ src/index.js | 4 +-- test/app.vue | 1 + test/main.js | 4 +++ test/routers/card.vue | 2 +- test/routers/poptip.vue | 36 ++++++++++++++-------- 11 files changed, 72 insertions(+), 49 deletions(-) create mode 100644 .eslintignore diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 00000000..dbdcd6b5 --- /dev/null +++ b/.eslintignore @@ -0,0 +1 @@ +src/directives \ No newline at end of file diff --git a/README.md b/README.md index 1804c88f..806bedd9 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ - [x] Timeline - [x] Tag - [x] Tooltip -- [ ] Poptip +- [x] Poptip - [x] Carousel - [x] Tree - [ ] Menu diff --git a/src/components/base/popper.js b/src/components/base/popper.js index 8373e1d3..8084ae12 100644 --- a/src/components/base/popper.js +++ b/src/components/base/popper.js @@ -40,7 +40,7 @@ export default { data () { return { visible: this.value - } + }; }, watch: { value: { diff --git a/src/components/poptip/poptip.vue b/src/components/poptip/poptip.vue index 9d333853..509003e5 100644 --- a/src/components/poptip/poptip.vue +++ b/src/components/poptip/poptip.vue @@ -6,33 +6,35 @@ v-clickoutside="handleClose">
-
-
-
-
-
- -
{{ title }}
+ +
+
+
+
+
+ +
{{ title }}
+
+
+ {{ cancelText }} + {{ okText }} +
-
- {{ cancelText }} - {{ okText }} -
-
-
-
{{ title }}
-
-
{{ content }}
+
+
{{ title }}
+
+
{{ content }}
+
-
+