-
Notifications
You must be signed in to change notification settings - Fork 0
/
v-ajax-form.js.map
1 lines (1 loc) · 7.15 KB
/
v-ajax-form.js.map
1
{"version":3,"file":"v-ajax-form.js","sources":["src/components/VAjaxForm.vue","node_modules/vue-runtime-helpers/dist/normalize-component.js","src/main.js"],"sourcesContent":["<template>\n <form v-bind=\"$attrs\" :action=\"this.action\" :method=\"this.method\" @submit.prevent=\"submit\">\n <slot></slot>\n </form>\n</template>\n<script>\nmodule.exports = {\n props: {\n action: String,\n method: String,\n uriEncode: Boolean\n }, methods: {\n request: function (params) {\n const vm = this;\n vm.$emit('start', params);\n let ax_op2 = {};\n let _method = vm.method.toLowerCase();\n switch (vm.method) {\n case 'get':\n ax_op2 = {params: params};\n break;\n case 'post':\n ax_op2 = params;\n break;\n }\n axios[_method](vm.action,\n ax_op2\n ).then(function (response) {\n vm.$emit('receive', response);\n }).catch(function (response) {\n vm.$emit('fail', response);\n }).finally(function () {\n vm.$emit('done', params);\n });\n }, submit: function () {\n let params = {};\n let vm = this;\n vm.$el.querySelectorAll('input,select,textarea').forEach(function(el){\n if ((typeof el.attributes['disabled'] === 'undefined')\n && (typeof el.attributes['name'] != 'undefined')\n ) {\n if ((el.type === 'radio' || el.type === 'checkbox') && !el.checked) return;\n let val = el.value;\n let name = el.attributes['name'].value;\n if(vm.uriEncode) {\n val = encodeURIComponent(val);\n name = encodeURIComponent(name);\n }\n if (typeof params[name] === 'undefined') {\n params[name] = val;\n } else if (params[name] instanceof Array) {\n params[name].push(val);\n } else {\n params[name] = [params[name], val];\n }\n }\n });\n vm.request(params);\n }\n }\n}\n</script>\n","'use strict';\n\nfunction normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier\n/* server only */\n, shadowMode, createInjector, createInjectorSSR, createInjectorShadow) {\n if (typeof shadowMode !== 'boolean') {\n createInjectorSSR = createInjector;\n createInjector = shadowMode;\n shadowMode = false;\n } // Vue.extend constructor export interop.\n\n\n var options = typeof script === 'function' ? script.options : script; // render functions\n\n if (template && template.render) {\n options.render = template.render;\n options.staticRenderFns = template.staticRenderFns;\n options._compiled = true; // functional template\n\n if (isFunctionalTemplate) {\n options.functional = true;\n }\n } // scopedId\n\n\n if (scopeId) {\n options._scopeId = scopeId;\n }\n\n var hook;\n\n if (moduleIdentifier) {\n // server build\n hook = function hook(context) {\n // 2.3 injection\n context = context || // cached call\n this.$vnode && this.$vnode.ssrContext || // stateful\n this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext; // functional\n // 2.2 with runInNewContext: true\n\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__;\n } // inject component styles\n\n\n if (style) {\n style.call(this, createInjectorSSR(context));\n } // register component module identifier for async chunk inference\n\n\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier);\n }\n }; // used by ssr in case component is cached and beforeCreate\n // never gets called\n\n\n options._ssrRegister = hook;\n } else if (style) {\n hook = shadowMode ? function () {\n style.call(this, createInjectorShadow(this.$root.$options.shadowRoot));\n } : function (context) {\n style.call(this, createInjector(context));\n };\n }\n\n if (hook) {\n if (options.functional) {\n // register for functional component in vue file\n var originalRender = options.render;\n\n options.render = function renderWithStyleInjection(h, context) {\n hook.call(context);\n return originalRender(h, context);\n };\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate;\n options.beforeCreate = existing ? [].concat(existing, hook) : [hook];\n }\n }\n\n return script;\n}\n\nmodule.exports = normalizeComponent;\n//# sourceMappingURL=normalize-component.js.map\n","import VAjaxForm from './components/VAjaxForm.vue';\nVue.component('VAjaxForm', VAjaxForm);\n"],"names":["const"],"mappings":";;;;;;;;;IAMA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ICJA,SAAS,kBAAkB,CAAC,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,oBAAoB,EAAE,gBAAgB;;MAElG,UAAU,EAAE,cAAc,EAAE,i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