城阳车管所项目
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.

2 lines
93 KiB

!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("vue")):"function"==typeof define&&define.amd?define("VueAMap",["vue"],e):"object"==typeof exports?exports.VueAMap=e(require("vue")):t.VueAMap=e(t.Vue)}(window,(function(t){return function(t){var e={};function n(o){if(e[o])return e[o].exports;var r=e[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(o,r,function(e){return t[e]}.bind(null,r));return o},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="./",n(n.s=18)}([function(t,e,n){"use strict";var o=n(3),r=n.n(o),i=n(7),a=n(6);e.a={inject:{parentInstance:{default:null}},props:{visible:{type:Boolean,default:!0},zIndex:{type:Number},extraOptions:{type:Object}},data:function(){return{unwatchFns:[],handlers:{visible:function(t){this.show&&this.hide&&(!1===t?this.hide():this.show())},zIndex:function(t){this.setzIndex&&this.setzIndex(t)}},needInitComponents:[],isDestroy:!1}},mounted:function(){this.parentInstance&&(this.parentInstance.$amapComponent?this.register():this.parentInstance.addChildComponent(this))},beforeDestroy:function(){this.$amapComponent&&(this.unregisterEvents(),this.unwatchFns.forEach((function(t){return t()})),this.unwatchFns=[],this.destroyComponent(),this.$amapComponent=null,this.$parentComponent=null,this.isDestroy=!0)},methods:{addChildComponent:function(t){this.needInitComponents.push(t)},createChildren:function(){for(;this.needInitComponents.length>0;)this.needInitComponents[0].register(),this.needInitComponents.splice(0,1)},getHandlerFun:function(t){return this.handlers&&this.handlers[t]?this.handlers[t]:this.$amapComponent["set"+r()(t)]},convertProps:function(){var t=this,e={},n=this.$options.propsData,o=void 0===n?{}:n,r=this.propsRedirect;return this.extraOptions&&Object.assign(e,this.extraOptions),Object.keys(o).reduce((function(n,i){var a=i,p=t.convertSignalProp(a,o[a]);return void 0===p||(r&&r[i]&&(a=r[a]),e[a]=p),n}),e)},convertSignalProp:function(t,e){if(this.converters&&this.converters[t])return this.converters[t].call(this,e);var n=i.a[t];return n?n(e):e},registerEvents:function(){var t=this,e=this.$listeners;Object.keys(e).forEach((function(n){a.a.addListener(t.$amapComponent,n,e[n])}))},unregisterEvents:function(){var t=this,e=this.$listeners;Object.keys(e).forEach((function(n){a.a.removeListener(t.$amapComponent,n,e[n])}))},setPropWatchers:function(){var t=this,e=this.propsRedirect,n=this.$options.propsData,o=void 0===n?{}:n;Object.keys(o).forEach((function(n){var r=n;e&&e[n]&&(r=e[n]);var i=t.getHandlerFun(r);if(i){var a={deep:!1};"[object Object]"===Object.prototype.toString.call(o[n])&&(a.deep=!0);var p=t.$watch(n,(function(e){i.call(t.$amapComponent,t.convertSignalProp(n,e))}),a);t.unwatchFns.push(p)}}))},initProps:function(){var t=this;["editable","visible","zooms"].forEach((function(e){if(void 0!==t[e]){var n=t.getHandlerFun(e);n&&n.call(t.$amapComponent,t.convertSignalProp(e,t[e]))}}))},printReactiveProp:function(){var t=this;Object.keys(this._props).forEach((function(e){t.$amapComponent["set"+r()(e)]&&console.log(e)}))},register:function(){var t=this;this.parentInstance&&!this.$parentComponent&&(this.$parentComponent=this.parentInstance.$amapComponent);var e=this.__initComponent&&this.__initComponent(this.convertProps());e&&e.then?e.then((function(e){return t.registerRest(e)})):this.registerRest(e)},registerRest:function(t){var e=this;!this.$amapComponent&&t&&(this.$amapC
//# sourceMappingURL=index.js.map