123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388 |
- exports.ids = [20];
- exports.modules = {
- /***/ 221:
- /***/ (function(module, exports) {
- // Exports
- module.exports = {
- };
- /***/ }),
- /***/ 244:
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony import */ var _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_PcGlobalForm_vue_vue_type_style_index_0_id_4b4d0fec_prod_lang_scss_scope_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(221);
- /* harmony import */ var _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_PcGlobalForm_vue_vue_type_style_index_0_id_4b4d0fec_prod_lang_scss_scope_true__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_PcGlobalForm_vue_vue_type_style_index_0_id_4b4d0fec_prod_lang_scss_scope_true__WEBPACK_IMPORTED_MODULE_0__);
- /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_PcGlobalForm_vue_vue_type_style_index_0_id_4b4d0fec_prod_lang_scss_scope_true__WEBPACK_IMPORTED_MODULE_0__) if(["default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_PcGlobalForm_vue_vue_type_style_index_0_id_4b4d0fec_prod_lang_scss_scope_true__WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
- /***/ }),
- /***/ 295:
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- // ESM COMPAT FLAG
- __webpack_require__.r(__webpack_exports__);
- // CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/PcGlobalForm.vue?vue&type=template&id=4b4d0fec
- var render = function render() {
- var _vm = this,
- _c = _vm._self._c;
- return _c('div', {
- staticClass: "form global-form"
- }, [_c('el-form', {
- ref: "ruleForm",
- staticClass: "form-list",
- attrs: {
- "model": _vm.formData,
- "rules": _vm.rules
- }
- }, _vm._l(_vm.formConfig, function (item) {
- return _c('el-form-item', {
- key: item.label,
- attrs: {
- "prop": item.prop
- }
- }, [item.type === 'input' ? _c('el-input', {
- style: {
- width: item.width
- },
- attrs: {
- "disabled": item.disabled,
- "placeholder": item.placeholder,
- "clearable": ""
- },
- on: {
- "change": function ($event) {
- item.change && item.change(_vm.formData[item.prop]);
- }
- },
- model: {
- value: _vm.formData[item.prop],
- callback: function ($$v) {
- _vm.$set(_vm.formData, item.prop, $$v);
- },
- expression: "formData[item.prop]"
- }
- }) : _vm._e(), _vm._v(" "), item.type === 'password' ? _c('el-input', {
- style: {
- width: item.width
- },
- attrs: {
- "type": _vm.flag ? 'text' : 'password',
- "autocomplete": "off",
- "placeholder": item.placeholder,
- "clearable": ""
- },
- on: {
- "change": function ($event) {
- item.change && item.change(_vm.formData[item.prop]);
- }
- },
- model: {
- value: _vm.formData[item.prop],
- callback: function ($$v) {
- _vm.$set(_vm.formData, item.prop, $$v);
- },
- expression: "formData[item.prop]"
- }
- }, [!_vm.flag ? _c('i', {
- staticClass: "el-input__icon iconfont",
- staticStyle: {
- "font-size": "22px"
- },
- attrs: {
- "slot": "suffix"
- },
- on: {
- "click": _vm.showPassword
- },
- slot: "suffix"
- }, [_vm._v("")]) : _c('i', {
- staticClass: "el-input__icon iconfont",
- staticStyle: {
- "font-size": "22px"
- },
- attrs: {
- "slot": "suffix"
- },
- on: {
- "click": _vm.showPassword
- },
- slot: "suffix"
- }, [_vm._v("")])]) : _vm._e(), _vm._v(" "), item.type === 'textarea' ? _c('el-input', {
- style: {
- width: item.width
- },
- attrs: {
- "type": "textarea",
- "disabled": item.disabled,
- "maxlength": item.maxlength,
- "rows": item.rows,
- "show-word-limit": item.showWordLimit
- },
- on: {
- "change": function ($event) {
- item.change && item.change(_vm.formData[item.prop]);
- }
- },
- model: {
- value: _vm.formData[item.prop],
- callback: function ($$v) {
- _vm.$set(_vm.formData, item.prop, $$v);
- },
- expression: "formData[item.prop]"
- }
- }) : _vm._e(), _vm._v(" "), item.type === 'select' ? _c('el-select', {
- style: {
- width: item.width
- },
- attrs: {
- "disabled": item.disabled,
- "clearable": "",
- "multiple": _vm.multiple,
- "placeholder": item.placeholder
- },
- on: {
- "change": function ($event) {
- item.change && item.change(_vm.formData[item.prop]);
- }
- },
- model: {
- value: _vm.formData[item.prop],
- callback: function ($$v) {
- _vm.$set(_vm.formData, item.prop, $$v);
- },
- expression: "formData[item.prop]"
- }
- }, _vm._l(item.selectList, function (option) {
- return _c('el-option', {
- key: option.id,
- attrs: {
- "label": option.name,
- "value": option.id
- }
- });
- }), 1) : _vm._e(), _vm._v(" "), item.type === 'selectObj' ? _c('el-select', {
- style: {
- width: item.width
- },
- attrs: {
- "disabled": item.disabled,
- "filterable": "",
- "clearable": "",
- "placeholder": item.placeholder
- },
- on: {
- "change": function ($event) {
- item.change && item.change(_vm.formData[item.prop]);
- }
- },
- model: {
- value: _vm.formData[item.prop],
- callback: function ($$v) {
- _vm.$set(_vm.formData, item.prop, $$v);
- },
- expression: "formData[item.prop]"
- }
- }, _vm._l(item.selectList, function (item, key) {
- return _c('el-option', {
- key: parseInt(key),
- attrs: {
- "label": item,
- "value": parseInt(key)
- }
- });
- }), 1) : _vm._e(), _vm._v(" "), item.type === 'radio' ? _c('el-radio-group', {
- attrs: {
- "disabled": item.disabled
- },
- on: {
- "change": function ($event) {
- item.change && item.change(_vm.formData[item.prop]);
- }
- },
- model: {
- value: _vm.formData[item.prop],
- callback: function ($$v) {
- _vm.$set(_vm.formData, item.prop, $$v);
- },
- expression: "formData[item.prop]"
- }
- }, _vm._l(item.radios, function (radio) {
- return _c('el-radio', {
- key: radio.label,
- attrs: {
- "label": radio.label
- }
- });
- }), 1) : _vm._e(), _vm._v(" "), item.type === 'checkbox' ? _c('el-checkbox-group', {
- attrs: {
- "disabled": item.disabled
- },
- on: {
- "change": function ($event) {
- item.change && item.change(_vm.formData[item.prop]);
- }
- },
- model: {
- value: _vm.formData[item.prop],
- callback: function ($$v) {
- _vm.$set(_vm.formData, item.prop, $$v);
- },
- expression: "formData[item.prop]"
- }
- }, _vm._l(item.checkboxs, function (item) {
- return _c('el-checkbox', {
- key: item.label,
- attrs: {
- "label": item.label
- }
- }, [_vm._v(_vm._s(item.label))]);
- }), 1) : _vm._e(), _vm._v(" "), item.type === 'switch' ? _c('el-switch', {
- attrs: {
- "disabled": item.disabled
- },
- on: {
- "change": function ($event) {
- item.change && item.change(_vm.formData[item.prop]);
- }
- },
- model: {
- value: _vm.formData[item.prop],
- callback: function ($$v) {
- _vm.$set(_vm.formData, item.prop, $$v);
- },
- expression: "formData[item.prop]"
- }
- }) : _vm._e(), _vm._v(" "), item.type === 'slot' ? [_vm._t(item.slotName)] : _vm._e()], 2);
- }), 1), _vm._ssrNode(" "), _vm._ssrNode("<div class=\"submit-btn\">", "</div>", [_vm.showLoginBtn ? _c('el-button', {
- attrs: {
- "loading": _vm.submitLoading
- },
- nativeOn: {
- "click": function ($event) {
- return _vm.submit.apply(null, arguments);
- }
- }
- }, [_vm._v("\n LOGIN\n ")]) : _vm._e(), _vm._ssrNode(" "), _vm.showRegisterBtn ? _c('el-button', {
- attrs: {
- "loading": _vm.submitLoading
- },
- nativeOn: {
- "click": function ($event) {
- return _vm.submit.apply(null, arguments);
- }
- }
- }, [_vm._v("\n REGISTER\n ")]) : _vm._e(), _vm._ssrNode(" "), _vm.showDeleteBtn ? _c('el-button', {
- nativeOn: {
- "click": function ($event) {
- return _vm.close.apply(null, arguments);
- }
- }
- }, [_vm._v("取 消")]) : _vm._e()], 2)], 2);
- };
- var staticRenderFns = [];
- // CONCATENATED MODULE: ./components/PcGlobalForm.vue?vue&type=template&id=4b4d0fec
- // CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/PcGlobalForm.vue?vue&type=script&lang=js
- /* harmony default export */ var PcGlobalFormvue_type_script_lang_js = ({
- name: "GlobalForm",
- props: {
- showDeleteBtn: {
- type: Boolean,
- default: true
- },
- showLoginBtn: {
- type: Boolean,
- default: true
- },
- showRegisterBtn: {
- type: Boolean,
- default: true
- },
- // 表单配置
- formConfig: {
- type: Array,
- required: true
- },
- // 表单数据
- formData: {
- type: Object,
- required: true
- },
- // 表单规则
- rules: {
- type: Object
- },
- submitLoading: {
- type: Boolean
- }
- },
- data() {
- return {
- flag: false
- };
- },
- methods: {
- submit() {
- this.$refs.ruleForm.validate(valid => {
- if (valid) {
- this.$emit("handleSubmit");
- } else {
- console.log("error submit!!");
- return false;
- }
- });
- },
- close() {
- this.$emit("handleClose");
- },
- showPassword() {
- this.flag = !this.flag;
- }
- }
- });
- // CONCATENATED MODULE: ./components/PcGlobalForm.vue?vue&type=script&lang=js
- /* harmony default export */ var components_PcGlobalFormvue_type_script_lang_js = (PcGlobalFormvue_type_script_lang_js);
- // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
- var componentNormalizer = __webpack_require__(2);
- // CONCATENATED MODULE: ./components/PcGlobalForm.vue
- function injectStyles (context) {
-
- var style0 = __webpack_require__(244)
- if (style0.__inject__) style0.__inject__(context)
- }
- /* normalize component */
- var component = Object(componentNormalizer["a" /* default */])(
- components_PcGlobalFormvue_type_script_lang_js,
- render,
- staticRenderFns,
- false,
- injectStyles,
- null,
- "905cdef0"
-
- )
- /* harmony default export */ var PcGlobalForm = __webpack_exports__["default"] = (component.exports);
- /***/ })
- };;
- //# sourceMappingURL=pc-global-form.js.map
|