diff --git a/examples/routers/tooltip.vue b/examples/routers/tooltip.vue
index 19ea27d7..791ff635 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 d4b0c71e..22b3bfb1 100644
--- a/src/components/poptip/poptip.vue
+++ b/src/components/poptip/poptip.vue
@@ -38,7 +38,7 @@
@@ -100,6 +100,10 @@
},
popperClass: {
type: String
+ },
+ wordWrap: {
+ type: Boolean,
+ default: false
}
},
data () {
@@ -149,6 +153,14 @@
} else {
return this.cancelText;
}
+ },
+ contentClasses () {
+ return [
+ `${prefixCls}-body-content`,
+ {
+ [`${prefixCls}-body-content-word-wrap`]: this.wordWrap
+ }
+ ];
}
},
methods: {
diff --git a/src/styles/components/poptip.less b/src/styles/components/poptip.less
index 68a5154d..8ff28d1b 100644
--- a/src/styles/components/poptip.less
+++ b/src/styles/components/poptip.less
@@ -43,6 +43,11 @@
&-content{
overflow: auto;
+ &-word-wrap{
+ white-space: pre-wrap;
+ text-align: justify;
+ }
+
&-inner{
color: @text-color;
}