Commit 8e7ac21077def48f51bb6f213a52af9c68e6bce0

Authored by Aresn
1 parent 8b73f45b

fixed #1222

examples/components/table.vue
... ... @@ -96,6 +96,9 @@
96 96 }
97 97 ]
98 98 }
  99 + },
  100 + mounted () {
  101 + console.log(1)
99 102 }
100 103 }
101 104 </script>
... ...
examples/components/test.vue
... ... @@ -7,10 +7,10 @@
7 7 row: Object
8 8 },
9 9 mounted () {
10   - console.log(1);
  10 +// console.log(1);
11 11 },
12 12 beforeDestroy () {
13   - console.log(2);
  13 +// console.log(2);
14 14 }
15 15 }
16 16 </script>
17 17 \ No newline at end of file
... ...
examples/routers/poptip.vue
1 1 <template>
2 2 <div>
  3 + <Poptip trigger="hover" title="提示标题" content="提示内容">
  4 + <Button>hover 激活</Button>
  5 + </Poptip>
  6 + <Poptip title="提示标题" content="提示内容">
  7 + <Button>click 激活</Button>
  8 + </Poptip>
  9 + <Poptip trigger="focus" title="提示标题" content="提示内容">
  10 + <Button>focus 激活</Button>
  11 + </Poptip>
3 12 <Poptip trigger="focus" title="提示标题" content="提示内容">
4 13 <i-input placeholder="输入框的 focus"></i-input>
5 14 </Poptip>
... ...
src/components/poptip/poptip.vue
... ... @@ -194,14 +194,14 @@
194 194 mounted () {
195 195 if (!this.confirm) {
196 196 // this.showTitle = this.$refs.title.innerHTML != `<div class="${prefixCls}-title-inner"></div>`;
197   - this.showTitle = this.$slots.title !== undefined;
  197 + this.showTitle = (this.$slots.title !== undefined) || this.title;
198 198 }
199 199 // if trigger and children is input or textarea,listen focus & blur event
200 200 if (this.trigger === 'focus') {
201   - this.isInput = true;
202 201 this.$nextTick(() => {
203 202 const $children = this.getInputChildren();
204 203 if ($children) {
  204 + this.isInput = true;
205 205 $children.addEventListener('focus', this.handleFocus, false);
206 206 $children.addEventListener('blur', this.handleBlur, false);
207 207 }
... ...