This repository has been archived on 2024-07-27. You can view files and clone it, but cannot push or open issues or pull requests.
keksAccountGUI/node_modulesOLD/vuetify/es5/components/VHover/VHover.js

80 lines
1.9 KiB
JavaScript
Raw Normal View History

2019-08-11 18:48:02 +00:00
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _delayable = _interopRequireDefault(require("../../mixins/delayable"));
var _toggleable = _interopRequireDefault(require("../../mixins/toggleable"));
var _mixins = _interopRequireDefault(require("../../util/mixins"));
var _console = require("../../util/console");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
// Mixins
// Utilities
var _default = (0, _mixins.default)(_delayable.default, _toggleable.default
/* @vue/component */
).extend({
name: 'v-hover',
props: {
disabled: {
type: Boolean,
default: false
},
value: {
type: Boolean,
default: undefined
}
},
methods: {
onMouseEnter: function onMouseEnter() {
this.runDelay('open');
},
onMouseLeave: function onMouseLeave() {
this.runDelay('close');
}
},
render: function render() {
if (!this.$scopedSlots.default && this.value === undefined) {
(0, _console.consoleWarn)('v-hover is missing a default scopedSlot or bound value', this);
return null;
}
var element;
/* istanbul ignore else */
if (this.$scopedSlots.default) {
element = this.$scopedSlots.default({
hover: this.isActive
});
}
if (Array.isArray(element) && element.length === 1) {
element = element[0];
}
if (!element || Array.isArray(element) || !element.tag) {
(0, _console.consoleWarn)('v-hover should only contain a single element', this);
return element;
}
if (!this.disabled) {
element.data = element.data || {};
this._g(element.data, {
mouseenter: this.onMouseEnter,
mouseleave: this.onMouseLeave
});
}
return element;
}
});
exports.default = _default;
//# sourceMappingURL=VHover.js.map