module.exports =
/******/ (function(modules) { // webpackBootstrap
/******/ 	// The module cache
/******/ 	var installedModules = {};
/******/
/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {
/******/
/******/ 		// Check if module is in cache
/******/ 		if(installedModules[moduleId]) {
/******/ 			return installedModules[moduleId].exports;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = installedModules[moduleId] = {
/******/ 			i: moduleId,
/******/ 			l: false,
/******/ 			exports: {}
/******/ 		};
/******/
/******/ 		// Execute the module function
/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ 		// Flag the module as loaded
/******/ 		module.l = true;
/******/
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/
/******/
/******/ 	// expose the modules object (__webpack_modules__)
/******/ 	__webpack_require__.m = modules;
/******/
/******/ 	// expose the module cache
/******/ 	__webpack_require__.c = installedModules;
/******/
/******/ 	// define getter function for harmony exports
/******/ 	__webpack_require__.d = function(exports, name, getter) {
/******/ 		if(!__webpack_require__.o(exports, name)) {
/******/ 			Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ 		}
/******/ 	};
/******/
/******/ 	// define __esModule on exports
/******/ 	__webpack_require__.r = function(exports) {
/******/ 		if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ 			Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ 		}
/******/ 		Object.defineProperty(exports, '__esModule', { value: true });
/******/ 	};
/******/
/******/ 	// create a fake namespace object
/******/ 	// mode & 1: value is a module id, require it
/******/ 	// mode & 2: merge all properties of value into the ns
/******/ 	// mode & 4: return value when already ns object
/******/ 	// mode & 8|1: behave like require
/******/ 	__webpack_require__.t = function(value, mode) {
/******/ 		if(mode & 1) value = __webpack_require__(value);
/******/ 		if(mode & 8) return value;
/******/ 		if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ 		var ns = Object.create(null);
/******/ 		__webpack_require__.r(ns);
/******/ 		Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ 		if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ 		return ns;
/******/ 	};
/******/
/******/ 	// getDefaultExport function for compatibility with non-harmony modules
/******/ 	__webpack_require__.n = function(module) {
/******/ 		var getter = module && module.__esModule ?
/******/ 			function getDefault() { return module['default']; } :
/******/ 			function getModuleExports() { return module; };
/******/ 		__webpack_require__.d(getter, 'a', getter);
/******/ 		return getter;
/******/ 	};
/******/
/******/ 	// Object.prototype.hasOwnProperty.call
/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ 	// __webpack_public_path__
/******/ 	__webpack_require__.p = "/dist/";
/******/
/******/
/******/ 	// Load entry module and return exports
/******/ 	return __webpack_require__(__webpack_require__.s = 63);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
/* globals __VUE_SSR_CONTEXT__ */

// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
// This module is a runtime utility for cleaner component module output and will
// be included in the final webpack user bundle.

function normalizeComponent (
  scriptExports,
  render,
  staticRenderFns,
  functionalTemplate,
  injectStyles,
  scopeId,
  moduleIdentifier, /* server only */
  shadowMode /* vue-cli only */
) {
  // Vue.extend constructor export interop
  var options = typeof scriptExports === 'function'
    ? scriptExports.options
    : scriptExports

  // render functions
  if (render) {
    options.render = render
    options.staticRenderFns = staticRenderFns
    options._compiled = true
  }

  // functional template
  if (functionalTemplate) {
    options.functional = true
  }

  // scopedId
  if (scopeId) {
    options._scopeId = 'data-v-' + scopeId
  }

  var hook
  if (moduleIdentifier) { // server build
    hook = function (context) {
      // 2.3 injection
      context =
        context || // cached call
        (this.$vnode && this.$vnode.ssrContext) || // stateful
        (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
      // 2.2 with runInNewContext: true
      if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
        context = __VUE_SSR_CONTEXT__
      }
      // inject component styles
      if (injectStyles) {
        injectStyles.call(this, context)
      }
      // register component module identifier for async chunk inferrence
      if (context && context._registeredComponents) {
        context._registeredComponents.add(moduleIdentifier)
      }
    }
    // used by ssr in case component is cached and beforeCreate
    // never gets called
    options._ssrRegister = hook
  } else if (injectStyles) {
    hook = shadowMode
      ? function () {
        injectStyles.call(
          this,
          (options.functional ? this.parent : this).$root.$options.shadowRoot
        )
      }
      : injectStyles
  }

  if (hook) {
    if (options.functional) {
      // for template-only hot-reload because in that case the render fn doesn't
      // go through the normalizer
      options._injectStyles = hook
      // register for functional component in vue file
      var originalRender = options.render
      options.render = function renderWithStyleInjection (h, context) {
        hook.call(context)
        return originalRender(h, context)
      }
    } else {
      // inject component registration as beforeCreate hook
      var existing = options.beforeCreate
      options.beforeCreate = existing
        ? [].concat(existing, hook)
        : [hook]
    }
  }

  return {
    exports: scriptExports,
    options: options
  }
}


/***/ }),
/* 1 */,
/* 2 */,
/* 3 */,
/* 4 */,
/* 5 */,
/* 6 */,
/* 7 */
/***/ (function(module, exports) {

module.exports = require("vue");

/***/ }),
/* 8 */,
/* 9 */
/***/ (function(module, exports) {

module.exports = require("@ued_fpi/element-ui/lib/input");

/***/ }),
/* 10 */,
/* 11 */,
/* 12 */,
/* 13 */,
/* 14 */,
/* 15 */,
/* 16 */,
/* 17 */
/***/ (function(module, exports) {

module.exports = require("@ued_fpi/element-ui/lib/checkbox");

/***/ }),
/* 18 */,
/* 19 */,
/* 20 */,
/* 21 */,
/* 22 */,
/* 23 */
/***/ (function(module, exports) {

module.exports = require("@ued_fpi/element-ui/lib/checkbox-group");

/***/ }),
/* 24 */,
/* 25 */,
/* 26 */,
/* 27 */,
/* 28 */,
/* 29 */,
/* 30 */,
/* 31 */,
/* 32 */,
/* 33 */,
/* 34 */,
/* 35 */,
/* 36 */,
/* 37 */
/***/ (function(module, exports) {

module.exports = require("@ued_fpi/element-ui/lib/select");

/***/ }),
/* 38 */
/***/ (function(module, exports) {

module.exports = require("@ued_fpi/element-ui/lib/option");

/***/ }),
/* 39 */,
/* 40 */,
/* 41 */,
/* 42 */,
/* 43 */
/***/ (function(module, exports) {

module.exports = require("@ued_fpi/element-ui/lib/radio");

/***/ }),
/* 44 */,
/* 45 */,
/* 46 */,
/* 47 */,
/* 48 */,
/* 49 */,
/* 50 */,
/* 51 */,
/* 52 */,
/* 53 */,
/* 54 */
/***/ (function(module, exports) {

module.exports = require("@ued_fpi/element-ui/lib/option-group");

/***/ }),
/* 55 */
/***/ (function(module, exports) {

module.exports = require("@ued_fpi/element-ui/lib/radio-button");

/***/ }),
/* 56 */
/***/ (function(module, exports) {

module.exports = require("@ued_fpi/element-ui/lib/radio-group");

/***/ }),
/* 57 */
/***/ (function(module, exports) {

module.exports = require("@ued_fpi/element-ui/lib/checkbox-button");

/***/ }),
/* 58 */
/***/ (function(module, exports) {

module.exports = require("@ued_fpi/element-ui/lib/switch");

/***/ }),
/* 59 */
/***/ (function(module, exports) {

module.exports = require("@ued_fpi/element-ui/lib/color-picker");

/***/ }),
/* 60 */
/***/ (function(module, exports) {

module.exports = require("@ued_fpi/element-ui/lib/time-picker");

/***/ }),
/* 61 */
/***/ (function(module, exports) {

module.exports = require("@ued_fpi/element-ui/lib/date-picker");

/***/ }),
/* 62 */,
/* 63 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);

// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/dynamic-form/src/form.vue?vue&type=template&id=2e061a58&
var formvue_type_template_id_2e061a58_render = function () {
  var _vm = this
  var _h = _vm.$createElement
  var _c = _vm._self._c || _h
  return _c(
    "div",
    { staticClass: "dynamic-form" },
    [
      _c(
        "el-form",
        {
          ref: "form",
          attrs: {
            model: _vm.form,
            inline: _vm.inline,
            "label-position": _vm.labelPosition,
            "label-width": _vm.labelWidth,
            "label-suffix": _vm.labelSuffix,
            "hide-required-asterisk": _vm.hideRequiredAsterisk,
            "show-message": _vm.showMessage,
            "inline-message": _vm.inlineMessage,
            "status-icon": _vm.statusIcon,
            "validate-on-rule-change": _vm.validateOnRuleChange,
            size: _vm.size,
            disabled: _vm.disabled,
          },
          on: { validate: _vm.validateMethod },
        },
        [
          _vm.group
            ? _vm._l(_vm.options, function (option, inx) {
                return _c(
                  "el-row",
                  {
                    key: "group" + inx,
                    staticClass: "dynamic-form-row",
                    attrs: { gutter: _vm.gutter },
                  },
                  [
                    option.title
                      ? _c("head-line", { attrs: { name: option.title } })
                      : _vm._e(),
                    _vm._l(option.options, function (item) {
                      return _c("form-middleware", {
                        key: item.key,
                        attrs: {
                          "control-key": item.key,
                          option: item,
                          form: _vm.form,
                          layout: _vm.layout,
                          formItem: _vm.formItem,
                          component: _vm.component,
                          pattern: _vm.pattern,
                        },
                        on: {
                          valueChange: function (value) {
                            return _vm.valueChange(item.key, value)
                          },
                        },
                      })
                    }),
                  ],
                  2
                )
              })
            : [
                _c(
                  "el-row",
                  {
                    staticClass: "dynamic-form-row",
                    attrs: { gutter: _vm.gutter },
                  },
                  _vm._l(_vm.options, function (item) {
                    return _c("form-middleware", {
                      key: item.key,
                      attrs: {
                        "control-key": item.key,
                        option: item,
                        form: _vm.form,
                        layout: _vm.layout,
                        formItem: _vm.formItem,
                        component: _vm.component,
                        pattern: _vm.pattern,
                      },
                      on: {
                        valueChange: function (value) {
                          return _vm.valueChange(item.key, value)
                        },
                      },
                    })
                  }),
                  1
                ),
              ],
        ],
        2
      ),
    ],
    1
  )
}
var staticRenderFns = []
formvue_type_template_id_2e061a58_render._withStripped = true


// CONCATENATED MODULE: ./packages/dynamic-form/src/form.vue?vue&type=template&id=2e061a58&

// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/dynamic-form/src/form-middleware.vue?vue&type=template&id=13fdbe52&
var form_middlewarevue_type_template_id_13fdbe52_render = function () {
  var _vm = this
  var _h = _vm.$createElement
  var _c = _vm._self._c || _h
  return !_vm.usedOption.hidden
    ? _c("form-item", {
        key: _vm.key,
        attrs: {
          form: _vm.form,
          controlKey: _vm.controlKey,
          value: _vm.value,
          "tag-name": _vm.tagName,
          option: _vm.usedOption,
        },
        on: { input: _vm.valueChange },
      })
    : _vm._e()
}
var form_middlewarevue_type_template_id_13fdbe52_staticRenderFns = []
form_middlewarevue_type_template_id_13fdbe52_render._withStripped = true


// CONCATENATED MODULE: ./packages/dynamic-form/src/form-middleware.vue?vue&type=template&id=13fdbe52&

// CONCATENATED MODULE: ./packages/dynamic-form/utils/tools.js
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };

// 是否为promise
function isPromise(obj) {
  return !!obj && ( // 有实际含义的变量才执行方法，变量null，undefined和''空串都为false
  (typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) === 'object' || typeof obj === 'function') && // 初始promise 或 promise.then返回的
  typeof obj.then === 'function';
}

function deepMerge() {
  var extended = {};
  var deep = false;
  var i = 0;
  // 判断是否为深拷贝
  if (Object.prototype.toString.call(arguments[0]) === '[object Boolean]') {
    deep = arguments[0];
    i++; // 如果为深拷贝则初始的i为1或者为0
  }
  // 将对象属性合并到已存在的对象中
  var merge = function merge(obj) {
    for (var prop in obj) {
      if (Object.prototype.hasOwnProperty.call(obj, prop)) {
        // 如果属性为对象并且需要深拷贝时则使用函数递归、反之则将当前的属性替换现有的属性
        if (deep && Object.prototype.toString.call(obj[prop]) === '[object Object]') {
          extended[prop] = deepMerge(deep, extended[prop], obj[prop]);
        } else {
          extended[prop] = obj[prop];
        }
      }
    }
  };
  // 遍历所有对象属性
  for (; i < arguments.length; i++) {
    merge(arguments[i]);
  }
  return extended;
}

function deepMergeWithoutNone() {
  var extended = {};
  var deep = false;
  var i = 0;
  // 判断是否为深拷贝
  if (Object.prototype.toString.call(arguments[0]) === '[object Boolean]') {
    deep = arguments[0];
    i++; // 如果为深拷贝则初始的i为1或者为0
  }
  // 将对象属性合并到已存在的对象中
  var merge = function merge(obj) {
    for (var prop in obj) {
      if (Object.prototype.hasOwnProperty.call(obj, prop)) {
        // 如果属性为对象并且需要深拷贝时则使用函数递归、反之则将当前的属性替换现有的属性
        if (deep && Object.prototype.toString.call(obj[prop]) === '[object Object]') {
          extended[prop] = deepMerge(deep, extended[prop], obj[prop]);
        } else {
          if (obj[prop] !== undefined && obj[prop] !== null) extended[prop] = obj[prop];
        }
      }
    }
  };
  // 遍历所有对象属性
  for (; i < arguments.length; i++) {
    merge(arguments[i]);
  }
  return extended;
}
// CONCATENATED MODULE: ./packages/dynamic-form/utils/ajax.js
/* eslint-disable */

// 自定义XHR请求
var ajax_XHR = function XHR(config) {
  this.config = config;
  var that = this;
  // 默认配置项
  var defaultConfig = {
    options: {
      url: '', // 请求地址
      method: 'post', // get||post
      dataType: 'json', // 请求数据类型，json/formate，默认为json
      async: true, // 异步
      data: {}, // post请求数据
      timeout: 5000 // 超时时间
    },
    success: function success() {},
    error: function error() {}
  };
  // 合并配置项
  var mergeConfig = deepMerge(true, defaultConfig, this.config);
  mergeConfig.options.dataType = mergeConfig.options.dataType.toUpperCase() === 'FORMDATA' ? 'formData' : 'json';
  var xhr = this.createXhr();

  // 处理逻辑
  var postData = null;
  var url = mergeConfig.options.url;
  if (mergeConfig.options.method == 'post') {
    // post 用formate传值，省去加header
    if (mergeConfig.options.dataType === 'json') {
      postData = JSON.stringify(mergeConfig.options.data);
    } else {
      var formData = new FormData();
      Object.keys(mergeConfig.options.data).forEach(function (item) {
        formData.append(item, mergeConfig.options.data[item]);
      });
      postData = formData;
    }
  } else {
    // get方式用参数名和参数值用encodeURIComponent()编码
    url = this.dealUrl(url);
  }
  xhr.open(mergeConfig.options.method, url, mergeConfig.options.async);
  // post请求需要添加请求头
  if (mergeConfig.options.method == 'post' && mergeConfig.options.dataType === 'json') {
    xhr.setRequestHeader('content-type', 'application/json;charset=utf-8');
  }

  xhr.onreadystatechange = function () {
    // 监听状态 0=>为初始化 1=>启动 2=>发送 3=>接受 4=>完成
    if (xhr.readyState == 4) {
      if (xhr.status >= 200 && xhr.status < 300 || xhr.status == 304) {
        that.config.success(xhr.responseText);
      } else {
        that.config.error() + xhr.status;
      }
    }
  };
  xhr.send(postData);

  // 超时报错
  xhr.ontimeout = function () {
    throw new Error('connect timeout');
  };
};

// 创建xhr
/** 支持XHR对象和ActiveX对象**/
ajax_XHR.prototype.createXhr = function () {
  if (typeof XMLHttpRequest !== 'undefined') {
    return new XMLHttpRequest();
  } else if (typeof ActiveXObject !== 'undefined') {
    // @ts-ignore
    if (typeof arguments.callee.activeXString !== 'string') {
      var versions = ['MSXML2.XMLHttp.6.0', 'MSXML2.XMLHttp.3.0', 'MSXML2.XMLHttp'];
      for (var i = 0, len = versions.length; i < len; i++) {
        try {
          // eslint-disable-next-line no-undef
          new ActiveXObject(versions[i]);
          // @ts-ignore
          arguments.callee.activeXString = versions[i];
          break;
        } catch (ex) {
          // 跳过
        }
      }
    }
    // eslint-disable-next-line no-undef
    // @ts-ignore
    return new ActiveXObject(arguments.callee.activeXString);
  } else {
    throw new Error('NO XHR object available');
  }
};

// 处理url
ajax_XHR.prototype.dealUrl = function (url) {
  var index = url.indexOf('?');
  if (index == -1) {
    return url;
  }
  var domain = url.substring(0, index);
  var pars = url.slice(index + 1);
  var arrs = pars.split('&');
  var newurl = domain;
  for (var item in arrs) {
    var arr = arrs[item].split('=');
    var split = '&';
    // @ts-ignore
    if (item == 0) {
      split = '?';
    }
    newurl += split + encodeURIComponent(arr[0]) + '=' + encodeURIComponent(arr[1]);
  }
  return newurl;
};

var ajax = {
  get: function get(url, data) {
    return new Promise(function (resolve, reject) {
      new ajax_XHR({
        options: {
          url: url, // 请求地址
          method: 'get', // get||post
          async: true, // 异步
          data: data // post请求数据
        },
        success: function success(response) {
          resolve(response);
        },
        error: function error(response) {
          reject(response);
        }
      });
    });
  },
  post: function post(url, data) {
    return new Promise(function (resolve, reject) {
      new ajax_XHR({
        options: {
          url: url, // 请求地址
          method: 'post', // get||post
          async: true, // 异步
          data: data // post请求数据
        },
        success: function success(response) {
          resolve(response);
        },
        error: function error(response) {
          reject(response);
        }
      });
    });
  }
};

/* harmony default export */ var utils_ajax = (ajax);
// EXTERNAL MODULE: external "vue"
var external_vue_ = __webpack_require__(7);
var external_vue_default = /*#__PURE__*/__webpack_require__.n(external_vue_);

// CONCATENATED MODULE: ./packages/dynamic-form/utils/bus.js


var bus = new external_vue_default.a();

/* harmony default export */ var utils_bus = (bus);
// EXTERNAL MODULE: external "@ued_fpi/element-ui/lib/input"
var input_ = __webpack_require__(9);
var input_default = /*#__PURE__*/__webpack_require__.n(input_);

// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/dynamic-form/components/dynamic-select.vue?vue&type=template&id=dec45b2c&
var dynamic_selectvue_type_template_id_dec45b2c_render = function () {
  var _vm = this
  var _h = _vm.$createElement
  var _c = _vm._self._c || _h
  return _c(
    "el-select",
    {
      attrs: {
        name: _vm.name,
        id: _vm.id,
        value: _vm.value,
        autocomplete: _vm.autocomplete,
        automaticDropdown: _vm.automaticDropdown,
        size: _vm.size,
        disabled: _vm.disabled,
        clearable: _vm.clearable,
        filterable: _vm.filterable,
        allowCreate: _vm.allowCreate,
        loading: _vm.loading,
        popperClass: _vm.popperClass,
        remote: _vm.remote,
        loadingText: _vm.loadingText,
        noMatchText: _vm.noMatchText,
        noDataText: _vm.noDataText,
        remoteMethod: _vm.remoteMethod,
        filterMethod: _vm.filterMethod,
        multiple: _vm.multiple,
        multipleLimit: _vm.multipleLimit,
        placeholder: _vm.placeholder,
        defaultFirstOption: _vm.defaultFirstOption,
        reserveKeyword: _vm.reserveKeyword,
        valueKey: _vm.valueKey,
        collapseTags: _vm.collapseTags,
        popperAppendToBody: _vm.popperAppendToBody,
      },
      on: { change: _vm.change },
    },
    [
      _vm._l(_vm.data, function (group, index) {
        return [
          Object.prototype.hasOwnProperty.call(group, "options") &&
          Array.isArray(group.options)
            ? _c(
                "el-option-group",
                {
                  key: group.label + index,
                  attrs: { label: group.label, disabled: group.disable },
                },
                _vm._l(group.options, function (item) {
                  return _c("el-option", {
                    key: item[_vm.realProps.value],
                    attrs: {
                      label: item[_vm.realProps.label],
                      value: item[_vm.realProps.value],
                      disabled: item[_vm.realProps.disabled],
                    },
                  })
                }),
                1
              )
            : _c("el-option", {
                key: group[_vm.realProps.value],
                attrs: {
                  label: group[_vm.realProps.label],
                  value: group[_vm.realProps.value],
                  disabled: group[_vm.realProps.disabled],
                },
              }),
        ]
      }),
    ],
    2
  )
}
var dynamic_selectvue_type_template_id_dec45b2c_staticRenderFns = []
dynamic_selectvue_type_template_id_dec45b2c_render._withStripped = true


// CONCATENATED MODULE: ./packages/dynamic-form/components/dynamic-select.vue?vue&type=template&id=dec45b2c&

// EXTERNAL MODULE: external "@ued_fpi/element-ui/lib/select"
var select_ = __webpack_require__(37);
var select_default = /*#__PURE__*/__webpack_require__.n(select_);

// EXTERNAL MODULE: external "@ued_fpi/element-ui/lib/option"
var option_ = __webpack_require__(38);
var option_default = /*#__PURE__*/__webpack_require__.n(option_);

// EXTERNAL MODULE: external "@ued_fpi/element-ui/lib/option-group"
var option_group_ = __webpack_require__(54);
var option_group_default = /*#__PURE__*/__webpack_require__.n(option_group_);

// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/dynamic-form/components/dynamic-select.vue?vue&type=script&lang=js&
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//




/* harmony default export */ var dynamic_selectvue_type_script_lang_js_ = ({
  name: 'ELDynamicSelect',
  props: {
    name: String,
    id: String,
    value: {
      required: true
    },
    autocomplete: {
      type: String,
      default: 'off'
    },
    /** @Deprecated in next major version */
    autoComplete: {
      type: String,
      validator: function validator() {
         false && false;
        return true;
      }
    },
    automaticDropdown: Boolean,
    size: String,
    disabled: Boolean,
    clearable: Boolean,
    filterable: Boolean,
    allowCreate: Boolean,
    loading: Boolean,
    popperClass: String,
    remote: Boolean,
    loadingText: String,
    noMatchText: String,
    noDataText: String,
    remoteMethod: Function,
    filterMethod: Function,
    props: Object,
    multiple: {
      type: Boolean,
      default: false
    },
    multipleLimit: {
      type: Number,
      default: 0
    },
    placeholder: {
      type: String,
      required: false
    },
    defaultFirstOption: Boolean,
    reserveKeyword: Boolean,
    valueKey: {
      type: String,
      default: 'value'
    },
    collapseTags: Boolean,
    popperAppendToBody: {
      type: Boolean,
      default: true
    },
    data: {
      type: Array,
      default: function _default() {
        return [];
      }
    }
  },
  components: {
    ElSelect: select_default.a,
    ElOption: option_default.a,
    ElOptionGroup: option_group_default.a
  },
  computed: {
    realProps: function realProps() {
      return _extends({
        label: 'label',
        value: 'value',
        disabled: 'disabled'
      }, this.props);
    }
  },
  methods: {
    change: function change(value) {
      this.$emit('input', value);
    }
  }
});
// CONCATENATED MODULE: ./packages/dynamic-form/components/dynamic-select.vue?vue&type=script&lang=js&
 /* harmony default export */ var components_dynamic_selectvue_type_script_lang_js_ = (dynamic_selectvue_type_script_lang_js_); 
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
var componentNormalizer = __webpack_require__(0);

// CONCATENATED MODULE: ./packages/dynamic-form/components/dynamic-select.vue





/* normalize component */

var dynamic_select_component = Object(componentNormalizer["a" /* default */])(
  components_dynamic_selectvue_type_script_lang_js_,
  dynamic_selectvue_type_template_id_dec45b2c_render,
  dynamic_selectvue_type_template_id_dec45b2c_staticRenderFns,
  false,
  null,
  null,
  null
  
)

/* hot reload */
if (false) { var api; }
dynamic_select_component.options.__file = "packages/dynamic-form/components/dynamic-select.vue"
/* harmony default export */ var dynamic_select = (dynamic_select_component.exports);
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/dynamic-form/components/dynamic-radio.vue?vue&type=template&id=851fd506&
var dynamic_radiovue_type_template_id_851fd506_render = function () {
  var _vm = this
  var _h = _vm.$createElement
  var _c = _vm._self._c || _h
  return _c(
    "el-radio-group",
    {
      attrs: {
        value: _vm.value,
        size: _vm.size,
        fill: _vm.fill,
        textColor: _vm.textColor,
        disabled: _vm.disabled,
      },
      on: { input: _vm.input },
    },
    [
      _vm.parrent === "button"
        ? _vm._l(_vm.data, function (item) {
            return _c(
              "el-radio-button",
              {
                key: item[_vm.realProps.value],
                attrs: {
                  label: item[_vm.realProps.value],
                  disabled: item[_vm.realProps.disabled],
                  name: item.name,
                },
              },
              [_vm._v(_vm._s(item[_vm.realProps.label]))]
            )
          })
        : _vm._l(_vm.data, function (item) {
            return _c(
              "el-radio",
              {
                key: item[_vm.realProps.value],
                attrs: {
                  label: item[_vm.realProps.value],
                  disabled: item[_vm.realProps.disabled],
                  border: item.border,
                  size: item.size,
                  name: item.name,
                },
              },
              [_vm._v(_vm._s(item[_vm.realProps.label]))]
            )
          }),
    ],
    2
  )
}
var dynamic_radiovue_type_template_id_851fd506_staticRenderFns = []
dynamic_radiovue_type_template_id_851fd506_render._withStripped = true


// CONCATENATED MODULE: ./packages/dynamic-form/components/dynamic-radio.vue?vue&type=template&id=851fd506&

// EXTERNAL MODULE: external "@ued_fpi/element-ui/lib/radio"
var radio_ = __webpack_require__(43);
var radio_default = /*#__PURE__*/__webpack_require__.n(radio_);

// EXTERNAL MODULE: external "@ued_fpi/element-ui/lib/radio-button"
var radio_button_ = __webpack_require__(55);
var radio_button_default = /*#__PURE__*/__webpack_require__.n(radio_button_);

// EXTERNAL MODULE: external "@ued_fpi/element-ui/lib/radio-group"
var radio_group_ = __webpack_require__(56);
var radio_group_default = /*#__PURE__*/__webpack_require__.n(radio_group_);

// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/dynamic-form/components/dynamic-radio.vue?vue&type=script&lang=js&
var dynamic_radiovue_type_script_lang_js_extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//




/* harmony default export */ var dynamic_radiovue_type_script_lang_js_ = ({
  name: 'ElDynamicRadio',
  props: {
    value: String,
    size: String,
    fill: String,
    textColor: String,
    disabled: Boolean,
    data: {
      type: Array,
      default: function _default() {
        return [];
      }
    },
    props: Object,
    parrent: String // 只区分el-radio和el-radio-button，只有当parrent为button时，使用el-radio-button
  },
  comments: {
    ElRadioGroup: radio_group_default.a,
    ElRadioButton: radio_button_default.a,
    ElRadio: radio_default.a
  },
  computed: {
    realProps: function realProps() {
      return dynamic_radiovue_type_script_lang_js_extends({
        label: 'label',
        value: 'value',
        disabled: 'disabled'
      }, this.props);
    }
  },
  methods: {
    input: function input(val) {
      this.$emit('input', val);
    }
  }
});
// CONCATENATED MODULE: ./packages/dynamic-form/components/dynamic-radio.vue?vue&type=script&lang=js&
 /* harmony default export */ var components_dynamic_radiovue_type_script_lang_js_ = (dynamic_radiovue_type_script_lang_js_); 
// CONCATENATED MODULE: ./packages/dynamic-form/components/dynamic-radio.vue





/* normalize component */

var dynamic_radio_component = Object(componentNormalizer["a" /* default */])(
  components_dynamic_radiovue_type_script_lang_js_,
  dynamic_radiovue_type_template_id_851fd506_render,
  dynamic_radiovue_type_template_id_851fd506_staticRenderFns,
  false,
  null,
  null,
  null
  
)

/* hot reload */
if (false) { var dynamic_radio_api; }
dynamic_radio_component.options.__file = "packages/dynamic-form/components/dynamic-radio.vue"
/* harmony default export */ var dynamic_radio = (dynamic_radio_component.exports);
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/dynamic-form/components/dynamic-checkbox.vue?vue&type=template&id=433c2031&
var dynamic_checkboxvue_type_template_id_433c2031_render = function () {
  var _vm = this
  var _h = _vm.$createElement
  var _c = _vm._self._c || _h
  return _c(
    "el-checkbox-group",
    {
      staticClass: "el-dynamic-checobox-group",
      attrs: {
        value: _vm.value,
        size: _vm.size,
        disabled: _vm.disabled,
        min: _vm.min,
        max: _vm.max,
        "text-color": _vm.textColor,
        fill: _vm.fill,
      },
      on: { input: _vm.input },
    },
    [
      _vm.parrent === "button"
        ? _vm._l(_vm.data, function (item) {
            return _c(
              "el-checkbox-button",
              {
                key: item[_vm.realProps.value],
                attrs: {
                  label: item[_vm.realProps.value],
                  trueLabel: item.trueLabel,
                  falseLabel: item.falseLabel,
                  disabled: item[_vm.realProps.disabled],
                  border: item.border,
                  size: item.size,
                  name: item.name,
                },
              },
              [_vm._v(_vm._s(item[_vm.realProps.label]))]
            )
          })
        : _vm._l(_vm.data, function (item) {
            return _c(
              "el-checkbox",
              {
                key: item[_vm.realProps.value],
                attrs: {
                  label: item[_vm.realProps.value],
                  trueLabel: item.trueLabel,
                  falseLabel: item.falseLabel,
                  disabled: item[_vm.realProps.disabled],
                  border: item.border,
                  size: item.size,
                  name: item.name,
                },
              },
              [_vm._v(_vm._s(item[_vm.realProps.label]))]
            )
          }),
    ],
    2
  )
}
var dynamic_checkboxvue_type_template_id_433c2031_staticRenderFns = []
dynamic_checkboxvue_type_template_id_433c2031_render._withStripped = true


// CONCATENATED MODULE: ./packages/dynamic-form/components/dynamic-checkbox.vue?vue&type=template&id=433c2031&

// EXTERNAL MODULE: external "@ued_fpi/element-ui/lib/checkbox"
var checkbox_ = __webpack_require__(17);
var checkbox_default = /*#__PURE__*/__webpack_require__.n(checkbox_);

// EXTERNAL MODULE: external "@ued_fpi/element-ui/lib/checkbox-button"
var checkbox_button_ = __webpack_require__(57);
var checkbox_button_default = /*#__PURE__*/__webpack_require__.n(checkbox_button_);

// EXTERNAL MODULE: external "@ued_fpi/element-ui/lib/checkbox-group"
var checkbox_group_ = __webpack_require__(23);
var checkbox_group_default = /*#__PURE__*/__webpack_require__.n(checkbox_group_);

// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/dynamic-form/components/dynamic-checkbox.vue?vue&type=script&lang=js&
var dynamic_checkboxvue_type_script_lang_js_extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//




/* harmony default export */ var dynamic_checkboxvue_type_script_lang_js_ = ({
  name: 'ElDynamicCheckbox',
  props: {
    value: Array,
    disabled: Boolean,
    min: Number,
    max: Number,
    size: String,
    fill: String,
    textColor: String,
    data: {
      type: Array,
      default: function _default() {
        return [];
      }
    },
    props: Object,
    parrent: String // 只区分el-radio和el-radio-button，只有当parrent为button时，使用el-radio-button
  },
  components: {
    ElCheckboxGroup: checkbox_group_default.a,
    ElCheckboxButton: checkbox_button_default.a,
    ElCheckbox: checkbox_default.a
  },
  computed: {
    realProps: function realProps() {
      return dynamic_checkboxvue_type_script_lang_js_extends({
        label: 'label',
        value: 'value'
      }, this.props);
    }
  },
  methods: {
    input: function input(val) {
      this.$emit('input', val);
    }
  }
});
// CONCATENATED MODULE: ./packages/dynamic-form/components/dynamic-checkbox.vue?vue&type=script&lang=js&
 /* harmony default export */ var components_dynamic_checkboxvue_type_script_lang_js_ = (dynamic_checkboxvue_type_script_lang_js_); 
// CONCATENATED MODULE: ./packages/dynamic-form/components/dynamic-checkbox.vue





/* normalize component */

var dynamic_checkbox_component = Object(componentNormalizer["a" /* default */])(
  components_dynamic_checkboxvue_type_script_lang_js_,
  dynamic_checkboxvue_type_template_id_433c2031_render,
  dynamic_checkboxvue_type_template_id_433c2031_staticRenderFns,
  false,
  null,
  null,
  null
  
)

/* hot reload */
if (false) { var dynamic_checkbox_api; }
dynamic_checkbox_component.options.__file = "packages/dynamic-form/components/dynamic-checkbox.vue"
/* harmony default export */ var dynamic_checkbox = (dynamic_checkbox_component.exports);
// EXTERNAL MODULE: external "@ued_fpi/element-ui/lib/switch"
var switch_ = __webpack_require__(58);
var switch_default = /*#__PURE__*/__webpack_require__.n(switch_);

// EXTERNAL MODULE: external "@ued_fpi/element-ui/lib/color-picker"
var color_picker_ = __webpack_require__(59);
var color_picker_default = /*#__PURE__*/__webpack_require__.n(color_picker_);

// EXTERNAL MODULE: external "@ued_fpi/element-ui/lib/time-picker"
var time_picker_ = __webpack_require__(60);
var time_picker_default = /*#__PURE__*/__webpack_require__.n(time_picker_);

// EXTERNAL MODULE: external "@ued_fpi/element-ui/lib/date-picker"
var date_picker_ = __webpack_require__(61);
var date_picker_default = /*#__PURE__*/__webpack_require__.n(date_picker_);

// CONCATENATED MODULE: ./packages/dynamic-form/utils/registComponents.js

// 输入框

// 下拉框

// 单选框

// 多选框

// 开关

// 颜色选择器

// 时间选择器

// 日期选择器


// 预设组件
var componentList = [
// 输入框，默认可清除
{
  name: 'input',
  components: input_default.a,
  defaultValue: '',
  defaultAttrs: {
    clearable: true
  }
},
// 下拉框，默认宽度100%，可清除
{
  name: 'select',
  components: dynamic_select,
  defaultValue: '',
  defaultAttrs: {
    clearable: true
  },
  defaultStyles: {
    width: '100%'
  }
},
// 下拉多选框，默认宽度100%，可清除
{
  name: 'multipleSelect',
  components: dynamic_select,
  defaultValue: [],
  defaultAttrs: {
    clearable: true,
    multiple: true
  },
  defaultStyles: {
    width: '100%'
  }
},
// 单选框
{
  name: 'radio',
  components: dynamic_radio,
  defaultValue: ''
},
// 多选框
{
  name: 'checkbox',
  components: dynamic_checkbox,
  defaultValue: []
},
// 开关
{
  name: 'switch',
  components: switch_default.a
},
// 颜色选择器
{
  name: 'colorPicker',
  components: color_picker_default.a
},
// 时间选择器
{
  name: 'timePicker',
  components: time_picker_default.a,
  defaultStyles: {
    width: '100%'
  }
},
// 日期选择器
{
  name: 'datePicker',
  components: date_picker_default.a,
  defaultStyles: {
    width: '100%'
  }
}];

// 已注册组件tagName和component的映射
var registedComponentMapping = {};

// 组件注册方法
// 为了避免和全局组件冲突，tagName需要随机生成，生成规则：name加随机数
var registComponents_regist = function regist(name, components) {
  var value = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;
  var attrs = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
  var style = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};

  var aliasName = name + Math.random().toString().slice(2);
  external_vue_default.a.component(aliasName, components);
  registedComponentMapping[name] = {
    tagName: aliasName,
    value: value,
    attrs: attrs,
    style: style
  };
};

// 预注册组件
for (var registComponents_iterator = componentList, registComponents_isArray = Array.isArray(registComponents_iterator), registComponents_i = 0, registComponents_iterator = registComponents_isArray ? registComponents_iterator : registComponents_iterator[Symbol.iterator]();;) {
  var registComponents_ref;

  if (registComponents_isArray) {
    if (registComponents_i >= registComponents_iterator.length) break;
    registComponents_ref = registComponents_iterator[registComponents_i++];
  } else {
    registComponents_i = registComponents_iterator.next();
    if (registComponents_i.done) break;
    registComponents_ref = registComponents_i.value;
  }

  var registComponents_item = registComponents_ref;

  registComponents_regist(registComponents_item.name, registComponents_item.components, registComponents_item.defaultValue, registComponents_item.defaultAttrs, registComponents_item.defaultStyles);
}

/* harmony default export */ var registComponents = (registComponents_regist);
// CONCATENATED MODULE: ./packages/dynamic-form/utils/registRules.js
// 校验规则
var registRules_rules = {};

var registRules_regist = function regist(name, rule) {
  registRules_rules[name] = rule;
};

/* harmony default export */ var registRules = (registRules_regist);
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/dynamic-form/src/form-item.vue?vue&type=script&lang=js&
var form_itemvue_type_script_lang_js_extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };


/* harmony default export */ var form_itemvue_type_script_lang_js_ = ({
  functional: true,
  render: function render(h, content) {
    var parent = content.parent;
    var _content$props = content.props,
        form = _content$props.form,
        value = _content$props.value,
        tagName = _content$props.tagName,
        controlKey = _content$props.controlKey,
        _content$props$option = _content$props.option,
        option = _content$props$option === undefined ? {} : _content$props$option;
    var _option$layout = option.layout,
        layout = _option$layout === undefined ? {} : _option$layout,
        _option$formItem = option.formItem,
        formItem = _option$formItem === undefined ? {} : _option$formItem,
        _option$component = option.component,
        component = _option$component === undefined ? {} : _option$component;
    // 特殊处理的属性

    var _option$rules = option.rules,
        rules = _option$rules === undefined ? [] : _option$rules;

    var usedRules = [];
    // 对rules预处理

    var _loop = function _loop(item) {
      if (typeof item === 'string' && registRules_rules[item]) {
        usedRules.push(registRules_rules[item]);
      } else {
        // 区分函数校验和一般校验
        if (item.validator) {
          usedRules.push(form_itemvue_type_script_lang_js_extends({}, item, {
            validator: function validator(rule, value, callback) {
              item.validator(rule, value, callback, form);
            }
          }));
        } else {
          usedRules.push(item);
        }
      }
    };

    for (var _iterator = rules, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
      var _ref;

      if (_isArray) {
        if (_i >= _iterator.length) break;
        _ref = _iterator[_i++];
      } else {
        _i = _iterator.next();
        if (_i.done) break;
        _ref = _i.value;
      }

      var item = _ref;

      _loop(item);
    }
    // 不加这一行，校验不会触发，暂时不清楚原因
    // 加入一个空的校验规则，保证不会影响校验结果
    // BUG
    usedRules.push({
      validator: function validator(rules, value, callback) {
        callback();
      }
    });
    // 需要根据组件类型渲染
    // 不能直接h('el-col', layout)，会报错，数据监听的问题
    return h('el-col', {
      props: form_itemvue_type_script_lang_js_extends({}, layout.props),
      attrs: form_itemvue_type_script_lang_js_extends({}, layout.attrs),
      style: form_itemvue_type_script_lang_js_extends({}, layout.style),
      class: form_itemvue_type_script_lang_js_extends({}, layout.class)
    }, [h('el-form-item', {
      props: form_itemvue_type_script_lang_js_extends({}, formItem.props),
      attrs: form_itemvue_type_script_lang_js_extends({}, formItem.attrs, {
        prop: controlKey,
        rules: usedRules
      }),
      style: form_itemvue_type_script_lang_js_extends({}, formItem.style),
      class: form_itemvue_type_script_lang_js_extends({}, formItem.class)
    }, [h(tagName, {
      props: form_itemvue_type_script_lang_js_extends({}, component.props),
      attrs: form_itemvue_type_script_lang_js_extends({
        value: value
      }, component.attrs),
      style: form_itemvue_type_script_lang_js_extends({}, component.style),
      class: form_itemvue_type_script_lang_js_extends({}, component.class),
      on: {
        input: parent.valueChange
      }
    })])]);
  }
});
// CONCATENATED MODULE: ./packages/dynamic-form/src/form-item.vue?vue&type=script&lang=js&
 /* harmony default export */ var src_form_itemvue_type_script_lang_js_ = (form_itemvue_type_script_lang_js_); 
// CONCATENATED MODULE: ./packages/dynamic-form/src/form-item.vue
var form_item_render, form_item_staticRenderFns




/* normalize component */

var form_item_component = Object(componentNormalizer["a" /* default */])(
  src_form_itemvue_type_script_lang_js_,
  form_item_render,
  form_item_staticRenderFns,
  false,
  null,
  null,
  null
  
)

/* hot reload */
if (false) { var form_item_api; }
form_item_component.options.__file = "packages/dynamic-form/src/form-item.vue"
/* harmony default export */ var form_item = (form_item_component.exports);
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/dynamic-form/src/form-middleware.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//






var defaultFetchPath = ['component.attrs.data', 'data'];
var arrToObj = 'arrToObj';
/* harmony default export */ var form_middlewarevue_type_script_lang_js_ = ({
  props: {
    form: {
      type: Object,
      default: function _default() {
        return {};
      }
    },
    controlKey: String,
    option: Object,
    pattern: String,
    layout: Object,
    formItem: Object,
    component: Object
  },
  data: function data() {
    return {
      key: Math.random(), // 随机数keu，用于强制item-control更新
      type: '', // 组件类型
      tagName: '', // 组件名称
      value: undefined, // 值
      updateOptionTimer: undefined, // 合并配置防抖定时器
      valueChangeTimer: undefined, // 组件值改变时的防抖定时器
      usedOption: {}, // 实际使用的配置
      stageOption: {}, // 暂存的配置
      /**
             * eg:  dependency: [
             *          {
             *              path: 'component.attrs.data', // 映射字段路径
             *              triggerFields: [], // 关键字段值变化时触发（对应配置项的key）
             *              getValue: () => {}, // 计算值的方法
             *              transferModel: 'fixed' // 结果的转换方式，fixed或者underfined，不需要改变，arrToObj, 将数组中的每一项作为新对象的key，并赋值为true
             *          }
             *     ],
             */
      dependency: [], // 表单依赖关系
      /**
             * fetch: [
             *     {
             *         id: '', // 数据源唯一键，
             *         path: [], // fetch.data映射的字段
             *         resetValue: '', // 重设值
             *         resetFlag: 是否需要重设值， // 默认为false
             *         triggerFields: [], // fetch.data依赖的属性
             *         getValue: undefined, // fetch方法
             *     },
             * ],
             */
      fetch: [], // 数据源管理
      fetchData: [], // 数据源请求的结果,对应fetch中的数据源

      patternOption: {}, // 不同模式的配置，数据格式同stageOption
      patternDependency: [], // 指定模式配置项，数据格式同dependency
      patternFetch: [], // 指定模式数据源，数据格式同fetch
      patternFetchData: [] // 指定模式数据源请求结果,对应patternFetch中的数据源，数据格式同fetchData
    };
  },

  components: {
    FormItem: form_item
  },
  watch: {
    pattern: function pattern() {
      // 清除指定模式数据
      this.patternOption = {};
      this.patternDependency = [];
      this.patternFetch = [];
      this.patternFetchData = [];
      var hasPattern = this.testPatternKey(this.pattern);

      // 当pattern为空或者错误时，代表切换为基础模式，
      if (!hasPattern) {
        // 因基础配置和指定模式配置完全分离，切换回基础模式，只需要清除指定模式配置即可
        this.doUpdateOptions({}, true, false);
      } else {
        // 处理配置项，暂忽略有依赖关系的配置，并记录依赖关系
        // 记录的依赖关系需要和普通的依赖做区分
        this.handleOption(this.option[this.pattern], true);

        // 处理fetch
        this.handleFetch(this.option[this.pattern], true);
        this.toUpdateOption(this.form, '', true, true);
        this.doUpdateOptions({}, true, false);
      }
    }
  },
  created: function created() {
    try {
      var type = this.option.type || this.option.component.type;
      this.type = type;
      this.tagName = registedComponentMapping[type] ? registedComponentMapping[type].tagName : type;
      var value = this.form[this.controlKey];
      this.value = value !== undefined && value !== null ? value : registedComponentMapping[type] ? registedComponentMapping[type].value : undefined;
      // 表单域控件初始化
      this.init();
    } catch (error) {
      console.error(error);
    }
  },
  mounted: function mounted() {
    var _this = this;

    utils_bus.$on('valueChange', function (form, changedKey) {
      if (_this.valueChangeTimer) {
        clearTimeout(_this.valueChangeTimer);
      }
      // 增加防抖机制，防止触发多次
      _this.valueChangeTimer = setTimeout(function () {
        var pattern = _this.testPatternKey(_this.pattern);
        // 清除需要更新的数据源结果缓存
        // 因为部分属性需要依赖数据源结果，清除了数据源结果就可以避免属性的冗余更新
        // 也可以避免属性使用历史数据更新
        _this.clearFetchData(changedKey, pattern);
        _this.toUpdateOption(form, changedKey, false, pattern);
      }, 50);
    });
  },

  methods: {
    valueChange: function valueChange(value) {
      // 会因为value只已经改变，而表单的form值未及时更新，导致验证出错
      // 如果this.value放在定时器中执行，会导致延迟，已经连续输入的无效
      this.value = value;
      this.$emit('valueChange', value);
    },

    /**
         * 配置项初始化
         */
    init: function init() {
      // 清除之前的数据
      this.usedOption = {};
      this.dependency = [];
      this.fetch = [];
      this.fetchData = [];

      // 清除指定模式数据
      this.patternOption = {};
      this.patternDependency = [];
      this.patternFetch = [];
      this.patternFetchData = [];

      // 处理配置项，暂忽略有依赖关系的配置，并记录依赖关系
      this.handleOption(this.option);

      // 处理fetch
      this.handleFetch(this.option);

      var hasPattern = this.testPatternKey(this.pattern);
      if (hasPattern) {
        // 处理配置项，暂忽略有依赖关系的配置，并记录依赖关系
        this.handleOption(this.option[this.pattern], true);
        // 处理fetch
        this.handleFetch(this.option[this.pattern], true);
      }

      // 这里强制更新一次
      this.toUpdateOption(this.form, '', true, hasPattern);
      this.doUpdateOptions({}, true, hasPattern);
    },

    /**
         * 处理fetch
         * fromPattern: 来源，是否为指定模式配置
         */
    handleFetch: function handleFetch(option) {
      var fromPattern = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;

      if (!Object.prototype.hasOwnProperty.call(option, 'fetch')) return;

      var fetch = Array.isArray(option.fetch) ? option.fetch : [option.fetch];

      for (var _iterator = fetch, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
        var _ref;

        if (_isArray) {
          if (_i >= _iterator.length) break;
          _ref = _iterator[_i++];
        } else {
          _i = _iterator.next();
          if (_i.done) break;
          _ref = _i.value;
        }

        var item = _ref;

        // 如果不存在mappingFileds或者mappingFileds为空，使用默认值
        var mappingFileds = item.mappingFileds && Array.isArray(item.mappingFileds) && item.mappingFileds.length > 0 ? item.mappingFileds : defaultFetchPath;
        if (!item.data) continue;
        var resetFlag = false;
        if (Object.prototype.hasOwnProperty.call(item, 'resetValue')) {
          resetFlag = true;
        }
        this.addFetchRules(item.id, item.data, mappingFileds, item.dependency, item.resetValue, resetFlag, fromPattern);
      }
    },

    /**
         * 新增数据源请求规则
         */
    addFetchRules: function addFetchRules(id, value) {
      var path = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
      var triggerFields = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
      var resetValue = arguments[4];
      var resetFlag = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : false;
      var fromPattern = arguments[6];

      var getValue = void 0;
      if (value.constructor !== Function && Object.prototype.constructor.call(value, '_xhr') && value._xhr) {
        if (value.type.toUpperCase() === 'POST') {
          getValue = utils_ajax.post(value.url, value.data);
        } else {
          getValue = utils_ajax.get(value.url, value.data);
        }
      } else {
        getValue = value;
      }
      if (fromPattern) {
        this.patternFetch.push({
          id: id,
          path: Array.isArray(path) ? path : path.split(','), // fetch.data映射的字段
          resetValue: resetValue, // 重设值
          resetFlag: resetFlag, // 是否需要重设
          triggerFields: triggerFields, // fetch.data依赖的属性
          getValue: getValue // fetch方法
        });
      } else {
        this.fetch.push({
          id: id,
          path: Array.isArray(path) ? path : path.split(','), // fetch.data映射的字段
          resetValue: resetValue, // 重设值
          resetFlag: resetFlag, // 是否需要重设
          triggerFields: triggerFields, // fetch.data依赖的属性
          getValue: getValue // fetch方法
        });
      }
    },

    /**
         * 根据变化的key，清除相关数据源结果
         */
    clearFetchData: function clearFetchData(changedKey, fromPattern) {
      var _this2 = this;

      var patternFetchIds = []; // 指定模式数据源的id
      if (fromPattern) {
        this.patternFetch.forEach(function (item, index) {
          if (item.triggerFields.includes(changedKey)) {
            if (item.id) patternFetchIds.push(item.id);
            _this2.patternFetchData[index] = undefined;
          }
        });
      }
      this.fetch.forEach(function (item, index) {
        if (item.triggerFields.includes(changedKey) && !patternFetchIds.includes(item.id)) {
          _this2.fetchData[index] = undefined;
        }
      });
    },

    /**
         * 更新数据源结果缓存
         */
    updateFetchData: function updateFetchData(data, index, fromPattern) {
      if (fromPattern) {
        this.patternFetchData[index] = data;
      } else {
        this.fetchData[index] = data;
      }
    },

    /**
         * 处理配置项，记录依赖关系
         * fromPattern: 来源，是否为指定模式配置
         */
    handleOption: function handleOption(option) {
      var fromPattern = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;

      var control = deepMergeWithoutNone(true, {
        key: option.key
      }, {
        component: {
          attrs: registedComponentMapping[this.type].attrs,
          style: registedComponentMapping[this.type].style
        }
      }, {
        layout: this.layout,
        formItem: this.formItem,
        component: this.component
      });

      // 需要将填写的配置项转为jsx可识别的配置

      // 根据dom划分的大类
      var domCategoryList = ['layout', 'formItem', 'component'];

      // 基础属性，对应dom相应的属性，值不需要转换
      var basicFieldList = ['attrs', 'props', 'style'];

      // 需要被排除的属性名
      var excludedFieldList = ['value', 'rules'];

      // 需要转换最终结果的属性，直接计算该属性即可，采用arrToObj规则
      var arrToObjFieldList = ['class'];

      // 直接属性，直接挂载在配置项上，attr：属性名, path：属性路径,多级使用/分割
      var directFieldList = [{ attr: 'label', path: ['formItem', 'attrs', 'label'] }, { attr: 'data', path: ['component', 'attrs', 'data'] }, { attr: 'disabled', path: ['component', 'attrs', 'disabled'] }, { attr: 'hidden', path: ['hidden'] }, { attr: 'rules', path: ['rules'] }, { attr: 'span', path: ['layout', 'attrs', 'span'] }, { attr: 'placeholder', path: ['component', 'attrs', 'placeholder'] }];

      for (var _iterator2 = domCategoryList, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {
        var _ref2;

        if (_isArray2) {
          if (_i2 >= _iterator2.length) break;
          _ref2 = _iterator2[_i2++];
        } else {
          _i2 = _iterator2.next();
          if (_i2.done) break;
          _ref2 = _i2.value;
        }

        var category = _ref2;

        control[category] = control[category] || {};
        for (var _iterator4 = basicFieldList, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : _iterator4[Symbol.iterator]();;) {
          var _ref5;

          if (_isArray4) {
            if (_i4 >= _iterator4.length) break;
            _ref5 = _iterator4[_i4++];
          } else {
            _i4 = _iterator4.next();
            if (_i4.done) break;
            _ref5 = _i4.value;
          }

          var field = _ref5;

          control[category][field] = control[category][field] || {};
          if (option[category] && option[category][field]) {
            for (var _attr in option[category][field]) {
              if (excludedFieldList.includes(_attr)) continue;
              // 如果有_function属性，说明需要根据表单值计算属性
              if (option[category][field][_attr]._function) {
                if (typeof option[category][field][_attr].value === 'string') {
                  // 函数字符串
                  // 添加规则
                  this.addRules(new Function('form', option[category][field][_attr].value), [category, field, _attr], option[category][field][_attr].dependency, fromPattern);
                } else {
                  // 添加规则
                  this.addRules(option[category][field][_attr].value, [category, field, _attr], option[category][field][_attr].dependency, fromPattern);
                }
                control[category][field][_attr] = option[category][field][_attr].defaultValue;
              } else if (option[category][field][_attr].constructor === Function) {
                // 添加规则
                this.addRules(option[category][field][_attr], [category, field, _attr], [], fromPattern);
              } else {
                control[category][field][_attr] = option[category][field][_attr];
              }
            }
          }
        }

        // 需要转换最终结果的属性
        for (var _iterator5 = arrToObjFieldList, _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : _iterator5[Symbol.iterator]();;) {
          var _ref6;

          if (_isArray5) {
            if (_i5 >= _iterator5.length) break;
            _ref6 = _iterator5[_i5++];
          } else {
            _i5 = _iterator5.next();
            if (_i5.done) break;
            _ref6 = _i5.value;
          }

          var _field = _ref6;

          if (option[category] && option[category][_field]) {
            // 如果有_function属性，说明需要根据表单值计算属性
            if (option[category][_field]._function) {
              if (option[category][_field].value === 'string') {
                // 函数字符串
                // 添加规则
                this.addRules(new Function('form', option[category][_field].value), [category, _field], option[category][_field].dependency, fromPattern, arrToObj);
              } else {
                // 添加规则
                this.addRules(option[category][_field].value, [category, _field], option[category][_field].dependency, fromPattern, arrToObj);
              }
              control[category][_field] = option[category][_field].defaultValue;
            } else if (option[category][_field].constructor === Function) {
              // 添加规则
              this.addRules(option[category][_field], [category, _field], [], fromPattern, arrToObj);
            } else {
              var usedObj = {};
              for (var _iterator6 = option[category][_field], _isArray6 = Array.isArray(_iterator6), _i6 = 0, _iterator6 = _isArray6 ? _iterator6 : _iterator6[Symbol.iterator]();;) {
                var _ref7;

                if (_isArray6) {
                  if (_i6 >= _iterator6.length) break;
                  _ref7 = _iterator6[_i6++];
                } else {
                  _i6 = _iterator6.next();
                  if (_i6.done) break;
                  _ref7 = _i6.value;
                }

                var responseItem = _ref7;

                usedObj[responseItem] = true;
              }
              control[category][_field] = usedObj;
            }
          }
        }
      }

      // 直接属性
      for (var _iterator3 = directFieldList, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) {
        var _ref4;

        if (_isArray3) {
          if (_i3 >= _iterator3.length) break;
          _ref4 = _iterator3[_i3++];
        } else {
          _i3 = _iterator3.next();
          if (_i3.done) break;
          _ref4 = _i3.value;
        }

        var _ref3 = _ref4;
        var attr = _ref3.attr,
            path = _ref3.path;

        if (Object.prototype.hasOwnProperty.call(option, attr)) {
          // 如果有_function属性，说明需要根据表单值计算属性
          if (option[attr]._function) {
            if (typeof option[attr].value === 'string') {
              // 函数字符串
              // 添加规则
              this.addRules(new Function('form', option[attr].value), path, option[attr].dependency, fromPattern);
            } else {
              // 添加规则
              this.addRules(option[attr].value, path, option[attr].dependency, fromPattern);
            }
            control = deepMerge(true, control, this.transferPathToObject(path.join('.'), option[attr].defaultValue));
          } else if (option[attr].constructor === Function) {
            // 添加规则
            this.addRules(option[attr], path, [], fromPattern);
          } else {
            control = deepMerge(true, control, this.transferPathToObject(path.join('.'), option[attr]));
          }
        }
      }
      // 执行更新配置
      this.doUpdateOptions(control, false, fromPattern);
    },

    /**
         * 添加依赖关系
         */
    addRules: function addRules(value) {
      var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
      var triggerFields = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
      var fromPattern = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
      var transferModel = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 'fixed';

      path = Array.isArray(path) ? path : path.split(',');
      // 需要根据配置项来源（是否指定了模式），分别存储
      if (fromPattern) {
        this.patternDependency.push({
          path: path.join('.'), // 映射字段路径
          triggerFields: triggerFields, // 关键字段值变化时触发（对应配置项的key）
          getValue: value, // 计算值的方法
          transferModel: transferModel // 结果的转换方式，fixed或者underfined，不需要改变，arrToObj, 将数组中的每一项作为新对象的key，并赋值为true
        });
      } else {
        this.dependency.push({
          path: path.join('.'), // 映射字段路径
          triggerFields: triggerFields, // 关键字段值变化时触发（对应配置项的key）
          getValue: value, // 计算值的方法
          transferModel: transferModel // 结果的转换方式，fixed或者underfined，不需要改变，arrToObj, 将数组中的每一项作为新对象的key，并赋值为true
        });
      }
    },

    /**
         * 更新配置项
         */
    toUpdateOption: function toUpdateOption(form, triggerFields) {
      var isInit = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
      var fromPattern = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;

      // 根据依赖计算普通属性
      this.computedOptionByDependency(form, triggerFields, isInit, fromPattern);
      // 根据依赖计算fetch结果
      this.computedOptionByFetch(form, triggerFields, isInit, fromPattern);
    },

    /**
         * 根据声明的依赖计算配置项
         * triggerFields只能是字符串或者数组
         */
    computedOptionByDependency: function computedOptionByDependency(form, triggerFields) {
      var isInit = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
      var fromPattern = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;

      // 建立索引
      var map = {};
      if (typeof triggerFields === 'string') {
        map[triggerFields] = true;
      } else {
        for (var _iterator7 = triggerFields, _isArray7 = Array.isArray(_iterator7), _i7 = 0, _iterator7 = _isArray7 ? _iterator7 : _iterator7[Symbol.iterator]();;) {
          var _ref8;

          if (_isArray7) {
            if (_i7 >= _iterator7.length) break;
            _ref8 = _iterator7[_i7++];
          } else {
            _i7 = _iterator7.next();
            if (_i7.done) break;
            _ref8 = _i7.value;
          }

          var item = _ref8;

          map[item] = true;
        }
      }
      if (fromPattern) {
        // 处理基础配置项
        var mappingField = [];
        this.patternFetch.forEach(function (item) {
          // 找到依赖当前变化字段的数据源
          // 初始化视为所有字段变化
          if (isInit || item.triggerFields.some(function (sItem) {
            return map[sItem];
          })) {
            mappingField = mappingField.concat(item.path);
          }
        });
        // 处理指定模式配置项
        for (var _iterator8 = this.patternDependency, _isArray8 = Array.isArray(_iterator8), _i8 = 0, _iterator8 = _isArray8 ? _iterator8 : _iterator8[Symbol.iterator]();;) {
          var _ref9;

          if (_isArray8) {
            if (_i8 >= _iterator8.length) break;
            _ref9 = _iterator8[_i8++];
          } else {
            _i8 = _iterator8.next();
            if (_i8.done) break;
            _ref9 = _i8.value;
          }

          var _item = _ref9;

          // 属性计算触发机制
          // 1.初始化时 2.属性未声明依赖 3.属性声明的依赖变化。  以上条件任一为真
          // 如果有任一fetch映射的该属性，需要等fetch结束在计算
          if ((isInit || _item.triggerFields.length === 0 || _item.triggerFields.some(function (field) {
            return map[field];
          })) && !mappingField.includes(_item.path)) {
            this.handleDependencyToOption(form, _item, true);
          }
        }
      } else {
        var _mappingField = [];
        this.fetch.forEach(function (item) {
          // 找到依赖当前变化字段的数据源
          // 初始化视为所有字段变化
          if (isInit || item.triggerFields.some(function (sItem) {
            return map[sItem];
          })) {
            _mappingField = _mappingField.concat(item.path);
          }
        });
        // 处理基础配置项
        for (var _iterator9 = this.dependency, _isArray9 = Array.isArray(_iterator9), _i9 = 0, _iterator9 = _isArray9 ? _iterator9 : _iterator9[Symbol.iterator]();;) {
          var _ref10;

          if (_isArray9) {
            if (_i9 >= _iterator9.length) break;
            _ref10 = _iterator9[_i9++];
          } else {
            _i9 = _iterator9.next();
            if (_i9.done) break;
            _ref10 = _i9.value;
          }

          var _item2 = _ref10;

          // 属性计算触发机制
          // 1.初始化时 2.属性未声明依赖 3.属性声明的依赖变化。  以上条件任一为真
          // 如果有任一fetch映射的该属性，需要等fetch结束在计算
          if ((isInit || _item2.triggerFields.length === 0 || _item2.triggerFields.some(function (field) {
            return map[field];
          })) && !_mappingField.includes(_item2.path)) {
            // 第一次初始化只需要将配置项更新到缓存中，后续会强制更新
            this.handleDependencyToOption(form, _item2, !isInit);
          }
        }
      }
    },

    /**
         * 根据改变的字段触发fetch
         * isInit: 是否为初始化，初始化会忽略triggerFields匹配
         */
    computedOptionByFetch: function computedOptionByFetch(form, triggerFields) {
      var _this3 = this;

      var isInit = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
      var fromPattern = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;

      // 建立索引
      var map = {};
      if (typeof triggerFields === 'string') {
        map[triggerFields] = true;
      } else {
        for (var _iterator10 = triggerFields, _isArray10 = Array.isArray(_iterator10), _i10 = 0, _iterator10 = _isArray10 ? _iterator10 : _iterator10[Symbol.iterator]();;) {
          var _ref11;

          if (_isArray10) {
            if (_i10 >= _iterator10.length) break;
            _ref11 = _iterator10[_i10++];
          } else {
            _i10 = _iterator10.next();
            if (_i10.done) break;
            _ref11 = _i10.value;
          }

          var item = _ref11;

          map[item] = true;
        }
      }
      if (fromPattern) {
        this.patternFetch.forEach(function (item, index) {
          if (isInit || item.triggerFields.some(function (field) {
            return map[field];
          })) {
            _this3.handleFetchToOption(form, item, index, fromPattern);
            // 将控件值置为设定值
            // 初始化不需要重设
            if (item.resetFlag && _this3.value !== item.resetValue && !isInit) {
              _this3.valueChange(item.resetValue);
            }
          }
        });
      }
      // 初始化时，一定触发
      // 遍历fetch，匹配触发字段
      if (isInit || !fromPattern) {
        this.fetch.forEach(function (item, index) {
          if (isInit || item.triggerFields.some(function (field) {
            return map[field];
          })) {
            _this3.handleFetchToOption(form, item, index);
            // 将控件值置为设定值
            // 初始化不需要重设
            if (item.resetFlag && _this3.value !== item.resetValue && !isInit) {
              _this3.valueChange(item.resetValue);
            }
          }
        });
      }
    },

    /**
         * 处理数据源请求，缓存数据源请求结果，
         * 更新相关配置项
         */
    handleFetchToOption: function handleFetchToOption(form, fetch, index) {
      var _this4 = this;

      var fromPattern = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;

      if (fetch.getValue.constructor !== Function) {
        this.doHandleFetchToOption(form, fetch.getValue, fetch, index, false, fromPattern);
      } else {
        var p = fetch.getValue(form);
        if (isPromise(p)) {
          p.then(function (response) {
            _this4.doHandleFetchToOption(form, response, fetch, index, true, fromPattern);
          });
        } else {
          this.doHandleFetchToOption(form, p, fetch, index, false, fromPattern);
        }
      }
    },
    doHandleFetchToOption: function doHandleFetchToOption(form, data, fetch, index) {
      var canUpdate = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
      var fromPattern = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : false;

      // const dependency = fromPattern ? this.patternDependency : this.dependency
      this.updateFetchData(data, index, fromPattern);
      // 更新配置
      if (fromPattern) {
        for (var _iterator11 = this.patternDependency, _isArray11 = Array.isArray(_iterator11), _i11 = 0, _iterator11 = _isArray11 ? _iterator11 : _iterator11[Symbol.iterator]();;) {
          var _ref12;

          if (_isArray11) {
            if (_i11 >= _iterator11.length) break;
            _ref12 = _iterator11[_i11++];
          } else {
            _i11 = _iterator11.next();
            if (_i11.done) break;
            _ref12 = _i11.value;
          }

          var item = _ref12;

          if (fetch.path.includes(item.path)) {
            this.handleDependencyToOption(form, item, canUpdate, fromPattern);
          }
        }
      }
      // 因指定模式的fetch可能会映射到基础配置上，所以这里不管是否为指定模式，都需要更新基础配置
      for (var _iterator12 = this.dependency, _isArray12 = Array.isArray(_iterator12), _i12 = 0, _iterator12 = _isArray12 ? _iterator12 : _iterator12[Symbol.iterator]();;) {
        var _ref13;

        if (_isArray12) {
          if (_i12 >= _iterator12.length) break;
          _ref13 = _iterator12[_i12++];
        } else {
          _i12 = _iterator12.next();
          if (_i12.done) break;
          _ref13 = _i12.value;
        }

        var _item3 = _ref13;

        if (fetch.path.includes(_item3.path)) {
          this.handleDependencyToOption(form, _item3, canUpdate, fromPattern);
        }
      }
    },

    /**
         * 根据依赖关系计算配置项
         */
    handleDependencyToOption: function handleDependencyToOption(form, dependency) {
      var _this5 = this;

      var canUpdate = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
      var fromPattern = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;

      var path = dependency.path;

      var patternFetchData = [];
      var patternFetchIds = []; // 指定模式数据源的id

      // 所有映射到该属性的数据源是否已请求完毕
      var patternFetchReady = true;
      var fetchReady = true;
      if (fromPattern) {
        this.patternFetch.forEach(function (item, index) {
          if (item.path.includes(path) && typeof _this5.patternFetchData[index] !== 'undefined') {
            if (item.id) patternFetchIds.push(item.id);
            if (_this5.patternFetchData[index] !== undefined) {
              patternFetchData.push(_this5.patternFetchData[index]);
            } else {
              patternFetchReady = false;
            }
          }
        });
      }
      // 找到所有映射了该字段的fetchData
      var fetchData = [];
      this.fetch.forEach(function (item, index) {
        // 如果当前fetch的id已经在指定模式中出现，则忽略该fetch
        if (item.path.includes(path) && typeof _this5.fetchData[index] !== 'undefined' && !patternFetchIds.includes(item.id)) {
          if (_this5.fetchData[index] !== undefined) {
            fetchData.push(_this5.fetchData[index]);
          } else {
            fetchReady = false;
          }
        }
      });

      // 任意一个依赖的数据源未请求完毕，不需要更新配置
      if (!patternFetchReady || !fetchReady) return;

      // 如果该属性指定模式有数据源，则认为该配置是指定了模式的
      var p = dependency.getValue.apply(dependency, [form].concat(fetchData, patternFetchData));
      if (isPromise(p)) {
        p.then(function (response) {
          var value = _this5.transferPathToObject(path, response, dependency.transferModel);
          // 对于异步的属性计算，直接更新
          _this5.doUpdateOptions(value, true, fromPattern);
        });
      } else if (p && p.constructor === Function) {
        var value = this.transferPathToObject(path, p.apply(undefined, [form].concat(fetchData)), dependency.transferModel);
        this.doUpdateOptions(value, canUpdate, fromPattern);
      } else {
        // 根据转换规则处理数据
        var _value = this.transferPathToObject(path, p, dependency.transferModel);
        this.doUpdateOptions(_value, canUpdate, fromPattern);
      }
    },

    /**
     * 将属性路径转为对象
    */
    transferPathToObject: function transferPathToObject(path, value, transferModel) {
      var separator = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '.';

      // 分割key
      var key = path.split(separator);
      // 如果value值为引用类型，需要转为字符串
      var obj = {};
      // obj[key[key.length - 1]] = value
      // 根据属性路径path，拼接出属性字符串
      var leftStr = '{';
      var rightStr = '}';
      for (var i = 0; i < key.length; i++) {
        if (i === key.length - 1) {
          if (transferModel === arrToObj) {
            obj[key[i]] = {};
            for (var _iterator13 = value, _isArray13 = Array.isArray(_iterator13), _i13 = 0, _iterator13 = _isArray13 ? _iterator13 : _iterator13[Symbol.iterator]();;) {
              var _ref14;

              if (_isArray13) {
                if (_i13 >= _iterator13.length) break;
                _ref14 = _iterator13[_i13++];
              } else {
                _i13 = _iterator13.next();
                if (_i13.done) break;
                _ref14 = _i13.value;
              }

              var item = _ref14;

              obj[key[i]][item] = true;
            }
          } else {
            obj[key[i]] = value;
          }
        } else if (i === key.length - 2) {
          leftStr += '"' + key[i] + '":';
        } else {
          leftStr += '"' + key[i] + '":{';
          rightStr += '}';
        }
      }
      if (key.length > 1) {
        // 拼接值,并提交
        return JSON.parse(leftStr + JSON.stringify(obj) + rightStr);
      } else {
        return obj;
      }
    },

    /**
         * 合并配置项,
         * 等待所有规则计算完毕后（异步除外），批量更新
         * 规则计算完成标识，canUpdate
         */
    doUpdateOptions: function doUpdateOptions() {
      var obj = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
      var canUpdate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
      var fromPattern = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;

      // 合并配置项
      if (fromPattern) {
        this.patternOption = deepMerge(true, this.patternOption, obj);
      } else {
        this.stageOption = deepMerge(true, this.stageOption, obj);
      }
      // 需要对多个同步计算结果一起处理,如果canUpdate为true，则直接更新
      if (canUpdate) {
        this.$set(this, 'usedOption', deepMerge(true, this.stageOption, this.patternOption));
        this.key = Math.random();
      } else {
        // // 增加防抖机制，防止触发多次
        // if (this.updateOptionTimer) {
        //   clearTimeout(this.updateOptionTimer);
        // }
        // this.updateOptionTimer = setTimeout(() => {
        //   this.$set(this, 'usedOption', deepMerge(true, this.stageOption, this.patternOption));
        //   this.key = Math.random();
        // }, 50);
      }
    },

    /**
         * 校验模式关键字是否正确
         */
    testPatternKey: function testPatternKey(key) {
      // 关键字，禁用以下字段名作为模式名称
      var primaryWords = ['key', 'label', 'type', 'data', 'rules', 'fetch', 'disabled', 'hidden', 'attrs', 'props', 'style', 'class', 'domProps', 'on', 'nativeOn', 'directives', 'scopedSlots', 'slot', 'ref', 'refInFor'];
      // 保留字，配置属性上的关键字，不可以作为模式关键字
      // 关键字必须为字符串，且不能为空串
      if (primaryWords.includes(key) || typeof key !== 'string' || key === '' || !this.option[key]) {
        return false;
      }
      return true;
    }
  }
});
// CONCATENATED MODULE: ./packages/dynamic-form/src/form-middleware.vue?vue&type=script&lang=js&
 /* harmony default export */ var src_form_middlewarevue_type_script_lang_js_ = (form_middlewarevue_type_script_lang_js_); 
// CONCATENATED MODULE: ./packages/dynamic-form/src/form-middleware.vue





/* normalize component */

var form_middleware_component = Object(componentNormalizer["a" /* default */])(
  src_form_middlewarevue_type_script_lang_js_,
  form_middlewarevue_type_template_id_13fdbe52_render,
  form_middlewarevue_type_template_id_13fdbe52_staticRenderFns,
  false,
  null,
  null,
  null
  
)

/* hot reload */
if (false) { var form_middleware_api; }
form_middleware_component.options.__file = "packages/dynamic-form/src/form-middleware.vue"
/* harmony default export */ var form_middleware = (form_middleware_component.exports);
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/dynamic-form/components/head-line.vue?vue&type=template&id=02d51a51&
var head_linevue_type_template_id_02d51a51_render = function () {
  var _vm = this
  var _h = _vm.$createElement
  var _c = _vm._self._c || _h
  return _c("div", { staticClass: "el-dynamic-head-line-wrapper" }, [
    _c("div", { staticClass: "head-name" }, [_vm._v(_vm._s(_vm.name))]),
    _c("div", { staticClass: "head-line" }),
  ])
}
var head_linevue_type_template_id_02d51a51_staticRenderFns = []
head_linevue_type_template_id_02d51a51_render._withStripped = true


// CONCATENATED MODULE: ./packages/dynamic-form/components/head-line.vue?vue&type=template&id=02d51a51&

// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/dynamic-form/components/head-line.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//

/* harmony default export */ var head_linevue_type_script_lang_js_ = ({
  name: 'headLine',
  props: {
    name: {
      type: String,
      default: '标题'
    }
  }
});
// CONCATENATED MODULE: ./packages/dynamic-form/components/head-line.vue?vue&type=script&lang=js&
 /* harmony default export */ var components_head_linevue_type_script_lang_js_ = (head_linevue_type_script_lang_js_); 
// CONCATENATED MODULE: ./packages/dynamic-form/components/head-line.vue





/* normalize component */

var head_line_component = Object(componentNormalizer["a" /* default */])(
  components_head_linevue_type_script_lang_js_,
  head_linevue_type_template_id_02d51a51_render,
  head_linevue_type_template_id_02d51a51_staticRenderFns,
  false,
  null,
  null,
  null
  
)

/* hot reload */
if (false) { var head_line_api; }
head_line_component.options.__file = "packages/dynamic-form/components/head-line.vue"
/* harmony default export */ var head_line = (head_line_component.exports);
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/dynamic-form/src/form.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//





/* harmony default export */ var formvue_type_script_lang_js_ = ({
  name: 'ElDynamicForm',
  props: {
    pattern: {
      type: String,
      default: ''
    }, // 当前表单采用的模式，为空则表示为正常模式
    options: Array, // 表单配置项
    gutter: {
      type: Number,
      default: 0
    }, // 详见element表单属性
    defaultValue: {
      type: Object,
      default: function _default() {
        return {};
      }
    }, // 表单初始值
    group: {
      type: Boolean,
      default: false
    }, // 是否分组
    layout: {
      type: Object,
      default: function _default() {
        return {
          span: 24
        };
      }
    }, // 布局全局配置
    formItem: Object, // 表单项全局配置
    component: Object, // 组件全局配置
    // rules: Object, // 校验规则
    inline: {
      type: Boolean,
      default: false
    },
    labelPosition: {
      type: String,
      default: 'right'
    },
    labelWidth: {
      type: String,
      default: 'auto'
    },
    labelSuffix: String,
    hideRequiredAsterisk: {
      type: Boolean,
      default: false
    },
    showMessage: {
      type: Boolean,
      default: true
    },
    inlineMessage: {
      type: Boolean,
      default: false
    },
    statusIcon: {
      type: Boolean,
      default: false
    },
    validateOnRuleChange: {
      type: Boolean,
      default: true
    },
    size: String,
    disabled: {
      type: Boolean,
      default: false
    }
  },
  data: function data() {
    return {
      form: this.defaultValue, // 表单值
      formOptions: [] // 表单配置项
    };
  },

  components: {
    FormMiddleware: form_middleware,
    HeadLine: head_line
  },
  methods: {
    /**
         * 表单项改变
         */
    valueChange: function valueChange(attr, value) {
      // 更新表单值
      this.$set(this.form, attr, value);
      // 通知各个组件更新配置（如有依赖）
      utils_bus.$emit('valueChange', this.form, attr);
      // // 抛出新的表单值
      // this.$emit('input', JSON.parse(JSON.stringify(this.form)))
    },

    /**
         * 	对整个表单进行校验的方法，参数为一个回调函数。该回调函数会在校验结束后被调用，并传入两个参数：是否校验成功和未通过校验的字段。若不传入回调函数，则会返回一个 promise
         */
    validate: function validate() {
      var _$refs$form;

      return (_$refs$form = this.$refs.form).validate.apply(_$refs$form, arguments);
    },

    /**
         * 对部分表单字段进行校验的方法
         */
    validateField: function validateField() {
      var _$refs$form2;

      return (_$refs$form2 = this.$refs.form).validateField.apply(_$refs$form2, arguments);
    },

    /**
         * 对整个表单进行重置，将所有字段值重置为初始值并移除校验结果
         */
    resetFields: function resetFields() {
      var _$refs$form3;

      return (_$refs$form3 = this.$refs.form).resetFields.apply(_$refs$form3, arguments);
    },

    /**
         * 清除指定字段的校验结果
         */
    clearValidate: function clearValidate(field) {
      if (this.$refs.form) this.$refs.form.clearValidate(field);
    },

    /**
         * 	任一表单项被校验后触发
         */
    validateMethod: function validateMethod() {
      this.$emit.apply(this, ['validate'].concat(Array.prototype.slice.call(arguments)));
    },

    /**
         * 获取表单值
         */
    getValue: function getValue() {
      return this.form;
    }
    /**
         * 设置表单值
         * 直接设置整个表单的值，会因为不清楚具体是哪些值改变，从而被迫更新整个表单
         * 如果这么设计，不如直接通过v-model来绑定
         */
    // setValue(value = {}) {
    //     const attrs = []
    //     for (const key in value) {
    //         attrs.push(key)
    //     }
    //     this.form = value
    //     bus.$emit('valueChange', this.form, attrs)
    // },

  }
});
// CONCATENATED MODULE: ./packages/dynamic-form/src/form.vue?vue&type=script&lang=js&
 /* harmony default export */ var src_formvue_type_script_lang_js_ = (formvue_type_script_lang_js_); 
// CONCATENATED MODULE: ./packages/dynamic-form/src/form.vue





/* normalize component */

var form_component = Object(componentNormalizer["a" /* default */])(
  src_formvue_type_script_lang_js_,
  formvue_type_template_id_2e061a58_render,
  staticRenderFns,
  false,
  null,
  null,
  null
  
)

/* hot reload */
if (false) { var form_api; }
form_component.options.__file = "packages/dynamic-form/src/form.vue"
/* harmony default export */ var src_form = (form_component.exports);
// CONCATENATED MODULE: ./packages/dynamic-form/index.js




/* istanbul ignore next */
src_form.install = function (Vue) {
  Vue.component(src_form.name, src_form);
};

// 校验规则注册
src_form.registValidateRules = function (name, rule) {
  registRules(name, rule);
};

// 批量校验规则注册
src_form.batchRegistValidateRules = function (rules) {
  if (!Array.isArray(rules)) rules = new Array(rules);
  for (var _iterator = rules, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
    var _ref;

    if (_isArray) {
      if (_i >= _iterator.length) break;
      _ref = _iterator[_i++];
    } else {
      _i = _iterator.next();
      if (_i.done) break;
      _ref = _i.value;
    }

    var item = _ref;
    registRules(item.name, item.rule);
  }
};

// 组件注册
src_form.registComponents = function (name, component, defaultValue, defaultAttrs) {
  registComponents(name, component, defaultValue, defaultAttrs);
};

// 批量组件注册
src_form.batchRegistComponents = function (components) {
  if (!Array.isArray(components)) components = new Array(components);
  for (var _iterator2 = components, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {
    var _ref2;

    if (_isArray2) {
      if (_i2 >= _iterator2.length) break;
      _ref2 = _iterator2[_i2++];
    } else {
      _i2 = _iterator2.next();
      if (_i2.done) break;
      _ref2 = _i2.value;
    }

    var item = _ref2;
    registComponents(item.name, item.component, item.defaultValue, item.defaultAttrs);
  }
};

/* harmony default export */ var dynamic_form = __webpack_exports__["default"] = (src_form);

/***/ })
/******/ ]);