UNPKG

nimble-ui

Version:
42 lines (38 loc) 1.01 kB
import { PopupBase } from './PopupBase'; class PopupService extends PopupBase { name = 'Popup'; // 名称 constructor(Vue, options) { super(Vue, options); this._setSPopup(Vue); } /** * 安装 * @param {Vue} Vue Vue * @param {Object} options 初始化参数 */ install(Vue, options) { let _that = this; super.install(Vue, options); let _getParent = function() { if (this !== _that) { return (this._getParent !== _that.getParent) && _that._getParent(); } }; super._getParent = _getParent; // super._getParent = () => { // return (super._getParent !== _that._getParent) && _that._getParent(); // }; } } /** * 实例化Popup * @param {vue} vue vue * @param {Object} options 参数 * @returns {PopupService} */ export default function popupFactory(vue, options) { return new PopupService(vue, options); } export { PopupService };