Commit 1d83a8aaf8a11c3a88ab5861c5b757e2fde99fd3

Authored by 梁灏
1 parent 5d2d2d6f

fixed #1612

examples/routers/poptip.vue
... ... @@ -8,6 +8,13 @@
8 8 @on-cancel="cancel">
9 9 <Button>删除</Button>
10 10 </Poptip>
  11 + <Poptip
  12 + confirm
  13 + title="您确认删除这条内容吗?"
  14 + @on-ok="ok"
  15 + @on-cancel="cancel">
  16 + <Button>删除</Button>
  17 + </Poptip>
11 18 </div>
12 19 </template>
13 20 <script>
... ...
src/components/poptip/poptip.vue
... ... @@ -14,7 +14,7 @@
14 14 </div>
15 15 <transition name="fade">
16 16 <div
17   - :class="[prefixCls + '-popper']"
  17 + :class="popperClasses"
18 18 :style="styles"
19 19 ref="popper"
20 20 v-show="visible"
... ... @@ -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 125 styles () {
118 126 let style = {};
119 127  
... ...