fixed #1222
This commit is contained in:
parent
8b73f45bf7
commit
8e7ac21077
4 changed files with 16 additions and 4 deletions
|
@ -96,6 +96,9 @@
|
|||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
console.log(1)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -7,10 +7,10 @@
|
|||
row: Object
|
||||
},
|
||||
mounted () {
|
||||
console.log(1);
|
||||
// console.log(1);
|
||||
},
|
||||
beforeDestroy () {
|
||||
console.log(2);
|
||||
// console.log(2);
|
||||
}
|
||||
}
|
||||
</script>
|
|
@ -1,5 +1,14 @@
|
|||
<template>
|
||||
<div>
|
||||
<Poptip trigger="hover" title="提示标题" content="提示内容">
|
||||
<Button>hover 激活</Button>
|
||||
</Poptip>
|
||||
<Poptip title="提示标题" content="提示内容">
|
||||
<Button>click 激活</Button>
|
||||
</Poptip>
|
||||
<Poptip trigger="focus" title="提示标题" content="提示内容">
|
||||
<Button>focus 激活</Button>
|
||||
</Poptip>
|
||||
<Poptip trigger="focus" title="提示标题" content="提示内容">
|
||||
<i-input placeholder="输入框的 focus"></i-input>
|
||||
</Poptip>
|
||||
|
|
|
@ -194,14 +194,14 @@
|
|||
mounted () {
|
||||
if (!this.confirm) {
|
||||
// this.showTitle = this.$refs.title.innerHTML != `<div class="${prefixCls}-title-inner"></div>`;
|
||||
this.showTitle = this.$slots.title !== undefined;
|
||||
this.showTitle = (this.$slots.title !== undefined) || this.title;
|
||||
}
|
||||
// if trigger and children is input or textarea,listen focus & blur event
|
||||
if (this.trigger === 'focus') {
|
||||
this.isInput = true;
|
||||
this.$nextTick(() => {
|
||||
const $children = this.getInputChildren();
|
||||
if ($children) {
|
||||
this.isInput = true;
|
||||
$children.addEventListener('focus', this.handleFocus, false);
|
||||
$children.addEventListener('blur', this.handleBlur, false);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue