Commit 1d83a8aaf8a11c3a88ab5861c5b757e2fde99fd3
1 parent
5d2d2d6f
fixed #1612
Showing
2 changed files
with
16 additions
and
1 deletions
Show diff stats
examples/routers/poptip.vue
@@ -8,6 +8,13 @@ | @@ -8,6 +8,13 @@ | ||
8 | @on-cancel="cancel"> | 8 | @on-cancel="cancel"> |
9 | <Button>删除</Button> | 9 | <Button>删除</Button> |
10 | </Poptip> | 10 | </Poptip> |
11 | + <Poptip | ||
12 | + confirm | ||
13 | + title="您确认删除这条内容吗?" | ||
14 | + @on-ok="ok" | ||
15 | + @on-cancel="cancel"> | ||
16 | + <Button>删除</Button> | ||
17 | + </Poptip> | ||
11 | </div> | 18 | </div> |
12 | </template> | 19 | </template> |
13 | <script> | 20 | <script> |
src/components/poptip/poptip.vue
@@ -14,7 +14,7 @@ | @@ -14,7 +14,7 @@ | ||
14 | </div> | 14 | </div> |
15 | <transition name="fade"> | 15 | <transition name="fade"> |
16 | <div | 16 | <div |
17 | - :class="[prefixCls + '-popper']" | 17 | + :class="popperClasses" |
18 | :style="styles" | 18 | :style="styles" |
19 | ref="popper" | 19 | ref="popper" |
20 | v-show="visible" | 20 | v-show="visible" |
@@ -114,6 +114,14 @@ | @@ -114,6 +114,14 @@ | ||
114 | } | 114 | } |
115 | ]; | 115 | ]; |
116 | }, | 116 | }, |
117 | + popperClasses () { | ||
118 | + return [ | ||
119 | + `${prefixCls}-popper`, | ||
120 | + { | ||
121 | + [`${prefixCls}-confirm`]: this.transfer && this.confirm | ||
122 | + } | ||
123 | + ]; | ||
124 | + }, | ||
117 | styles () { | 125 | styles () { |
118 | let style = {}; | 126 | let style = {}; |
119 | 127 |