From a980832f848bc54410e262249bcc2f1a9830c2f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A2=81=E7=81=8F?= Date: Fri, 22 Jun 2018 15:37:23 +0800 Subject: [PATCH] Poptip add padding prop --- examples/routers/tooltip.vue | 2 +- src/components/poptip/poptip.vue | 13 +++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/examples/routers/tooltip.vue b/examples/routers/tooltip.vue index 791ff635..70fba7f2 100644 --- a/examples/routers/tooltip.vue +++ b/examples/routers/tooltip.vue @@ -7,7 +7,7 @@ - + diff --git a/src/components/poptip/poptip.vue b/src/components/poptip/poptip.vue index 22b3bfb1..687de8d2 100644 --- a/src/components/poptip/poptip.vue +++ b/src/components/poptip/poptip.vue @@ -36,8 +36,8 @@
-
{{ title }}
-
+
{{ title }}
+
{{ content }}
@@ -104,6 +104,10 @@ wordWrap: { type: Boolean, default: false + }, + // default by css: 8px 16px + padding: { + type: String } }, data () { @@ -161,6 +165,11 @@ [`${prefixCls}-body-content-word-wrap`]: this.wordWrap } ]; + }, + contentPaddingStyle () { + const styles = {}; + if (!!this.padding) styles['padding'] = this.padding; + return styles; } }, methods: {