@opentiny/vue-tooltip
Advanced tools
Comparing version 2.6.1 to 2.6.6
@@ -234,48 +234,54 @@ import { renderless, api } from "@opentiny/vue-renderless/tooltip/vue"; | ||
get: function get() { | ||
return createComponent({ | ||
el: document.createElement("div"), | ||
component: { | ||
render: function render2() { | ||
var content = getContent(_this); | ||
var propsData = { | ||
attrs: { | ||
name: _this.transition | ||
}, | ||
on: { | ||
"after-leave": _this.doDestroy | ||
} | ||
}; | ||
var typeClass = "is-" + (_this.type || _this.effect); | ||
var _mouseenter = function mouseenter() { | ||
return _this.setExpectedState(true); | ||
}; | ||
var _mouseleave = function mouseleave() { | ||
_this.setExpectedState(false); | ||
_this.debounceClose(); | ||
}; | ||
return h("transition", propsData, [h("div", { | ||
"ref": "popper", | ||
"attrs": { | ||
"id": _this.state.tooltipId, | ||
"appendToBody": _this.appendToBody, | ||
"role": "tooltip", | ||
"aria-hidden": _this.disabled || !_this.state.showPopper ? "true" : "false" | ||
}, | ||
"directives": [{ | ||
name: "show", | ||
value: !_this.disabled && _this.state.showPopper && content | ||
}], | ||
"class": ["tiny-tooltip", "tiny-tooltip__popper", typeClass, _this.popperClass], | ||
"on": { | ||
"mouseenter": function mouseenter() { | ||
return _mouseenter(); | ||
return ( | ||
// 使用适配器里的createComponent创建一个新的vue的vnode节点为一个新组件,挂载到el下面去 | ||
createComponent({ | ||
el: document.createElement("div"), | ||
component: { | ||
render: function render2() { | ||
var content = getContent(_this); | ||
var propsData = { | ||
attrs: { | ||
name: _this.transition | ||
}, | ||
"mouseleave": function mouseleave() { | ||
return _mouseleave(); | ||
on: { | ||
"after-leave": _this.doDestroy | ||
} | ||
} | ||
}, [content])]); | ||
}; | ||
var typeClass = "is-" + (_this.type || _this.effect); | ||
var _mouseenter = function mouseenter() { | ||
return _this.setExpectedState(true); | ||
}; | ||
var _mouseleave = function mouseleave() { | ||
_this.setExpectedState(false); | ||
_this.debounceClose(); | ||
}; | ||
_this.$nextTick(function() { | ||
return _this.updatePopper(); | ||
}); | ||
return h("transition", propsData, [h("div", { | ||
"ref": "popper", | ||
"attrs": { | ||
"id": _this.state.tooltipId, | ||
"appendToBody": _this.appendToBody, | ||
"role": "tooltip", | ||
"aria-hidden": _this.disabled || !_this.state.showPopper ? "true" : "false" | ||
}, | ||
"directives": [{ | ||
name: "show", | ||
value: !_this.disabled && _this.state.showPopper && content | ||
}], | ||
"class": ["tiny-tooltip", "tiny-tooltip__popper", typeClass, _this.popperClass], | ||
"on": { | ||
"mouseenter": function mouseenter() { | ||
return _mouseenter(); | ||
}, | ||
"mouseleave": function mouseleave() { | ||
return _mouseleave(); | ||
} | ||
} | ||
}, [content])]); | ||
} | ||
} | ||
} | ||
}); | ||
}) | ||
); | ||
} | ||
@@ -282,0 +288,0 @@ } |
{ | ||
"name": "@opentiny/vue-tooltip", | ||
"version": "2.6.1", | ||
"version": "2.6.6", | ||
"description": "", | ||
"main": "./lib/index.js", | ||
"dependencies": { | ||
"@opentiny/vue-renderless": "~3.6.1", | ||
"@opentiny/vue-common": "~2.6.1" | ||
"@opentiny/vue-renderless": "~3.6.6", | ||
"@opentiny/vue-common": "~2.6.6" | ||
}, | ||
@@ -10,0 +10,0 @@ "license": "MIT", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
12745
377