You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

32 lines
776 B

'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.antPortal = antPortal;
function antPortal(Vue) {
return Vue.directive('ant-portal', {
inserted: function inserted(el, binding) {
var value = binding.value;
var parentNode = typeof value === 'function' ? value(el) : value;
if (parentNode !== el.parentNode) {
parentNode.appendChild(el);
}
},
componentUpdated: function componentUpdated(el, binding) {
var value = binding.value;
var parentNode = typeof value === 'function' ? value(el) : value;
if (parentNode !== el.parentNode) {
parentNode.appendChild(el);
}
}
});
}
exports['default'] = {
install: function install(Vue) {
antPortal(Vue);
}
};