From 59f1d5b4db267e699a1e2dad7d0bcd2a9ab34e6a Mon Sep 17 00:00:00 2001 From: wanlei Date: Mon, 6 Nov 2017 12:13:36 +0800 Subject: [PATCH] update: [tooltip] more API supported --- components/tooltip/demo/index.vue | 40 ++++++++++-- components/tooltip/tooltip.vue | 102 +++++++++++++++++++++++------- 2 files changed, 113 insertions(+), 29 deletions(-) diff --git a/components/tooltip/demo/index.vue b/components/tooltip/demo/index.vue index a1e0451d3..178db3bff 100644 --- a/components/tooltip/demo/index.vue +++ b/components/tooltip/demo/index.vue @@ -2,19 +2,37 @@
-

This is just a test, put your cursor here

+ :title="showText" + :autoAdjustOverflow="autoAdjustOverflow" + > +

撞到边缘翻转位置 & 点击更新

- {{showText}} + {{autoAdjustOverflow ? '启用' : '关闭'}}自动调整中
+

切换arrowPointAtCenter模式

+ {{arrowPointAtCenter}}
- {{td}} + + {{td}} +
+
+

+ + arrowPointAtCenter arrowPointAtCenter arrowPointAtCenter + +

+
@@ -33,7 +51,9 @@ ['left', '', '', '', 'right'], ['leftBottom', '', '', '', 'rightBottom'], ['', 'bottomLeft', 'bottom', 'bottomRight', ''], - ] + ], + arrowPointAtCenter: false, + autoAdjustOverflow: true, } }, methods: { @@ -43,6 +63,12 @@ } else { this.showText += ' ' } + }, + change() { + this.arrowPointAtCenter = !this.arrowPointAtCenter + }, + reverse() { + this.autoAdjustOverflow = !this.autoAdjustOverflow } }, components: { @@ -52,6 +78,10 @@ }