Files
supplier-dispatch-h5/node_modules/.cache/babel-loader/c7a486ca62a2df09b75c91c959364f4987bc411ad06d5839e7fa04c660493c86.json
2023-08-11 10:45:20 +08:00

1 line
3.6 KiB
JSON

{"ast":null,"code":"function getElement(selector) {\n if (typeof selector === 'string') {\n return document.querySelector(selector);\n }\n return selector();\n}\nexport function PortalMixin(_temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n ref = _ref.ref,\n afterPortal = _ref.afterPortal;\n return {\n props: {\n getContainer: [String, Function]\n },\n watch: {\n getContainer: 'portal'\n },\n mounted: function mounted() {\n if (this.getContainer) {\n this.portal();\n }\n },\n methods: {\n portal: function portal() {\n var getContainer = this.getContainer;\n var el = ref ? this.$refs[ref] : this.$el;\n var container;\n if (getContainer) {\n container = getElement(getContainer);\n } else if (this.$parent) {\n container = this.$parent.$el;\n }\n if (container && container !== el.parentNode) {\n container.appendChild(el);\n }\n if (afterPortal) {\n afterPortal.call(this);\n }\n }\n }\n };\n}","map":{"version":3,"names":["getElement","selector","document","querySelector","PortalMixin","_temp","_ref","ref","afterPortal","props","getContainer","String","Function","watch","mounted","portal","methods","el","$refs","$el","container","$parent","parentNode","appendChild","call"],"sources":["E:/work/sino/sino-h5/node_modules/vant/es/mixins/portal.js"],"sourcesContent":["function getElement(selector) {\n if (typeof selector === 'string') {\n return document.querySelector(selector);\n }\n\n return selector();\n}\n\nexport function PortalMixin(_temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n ref = _ref.ref,\n afterPortal = _ref.afterPortal;\n\n return {\n props: {\n getContainer: [String, Function]\n },\n watch: {\n getContainer: 'portal'\n },\n mounted: function mounted() {\n if (this.getContainer) {\n this.portal();\n }\n },\n methods: {\n portal: function portal() {\n var getContainer = this.getContainer;\n var el = ref ? this.$refs[ref] : this.$el;\n var container;\n\n if (getContainer) {\n container = getElement(getContainer);\n } else if (this.$parent) {\n container = this.$parent.$el;\n }\n\n if (container && container !== el.parentNode) {\n container.appendChild(el);\n }\n\n if (afterPortal) {\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