eoss-mobiles 0.1.78 → 0.1.80

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3734,8 +3734,8 @@ var selector_tree_component = normalizeComponent(
3734
3734
  )
3735
3735
 
3736
3736
  /* harmony default export */ var selector_tree = (selector_tree_component.exports);
3737
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/selector/src/selector-field.vue?vue&type=template&id=43641679&
3738
- var selector_fieldvue_type_template_id_43641679_render = function () {
3737
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/selector/src/selector-field.vue?vue&type=template&id=723827d0&
3738
+ var selector_fieldvue_type_template_id_723827d0_render = function () {
3739
3739
  var _vm = this
3740
3740
  var _h = _vm.$createElement
3741
3741
  var _c = _vm._self._c || _h
@@ -3833,7 +3833,7 @@ var selector_fieldvue_type_template_id_43641679_render = function () {
3833
3833
  _vm._v(
3834
3834
  "\n " +
3835
3835
  _vm._s(
3836
- r[_vm.labelKey].length > 10
3836
+ r[_vm.labelKey] && r[_vm.labelKey].length > 10
3837
3837
  ? r[_vm.labelKey].slice(0, 10) + "..."
3838
3838
  : r[_vm.labelKey]
3839
3839
  ) +
@@ -3894,11 +3894,11 @@ var selector_fieldvue_type_template_id_43641679_render = function () {
3894
3894
  1
3895
3895
  )
3896
3896
  }
3897
- var selector_fieldvue_type_template_id_43641679_staticRenderFns = []
3898
- selector_fieldvue_type_template_id_43641679_render._withStripped = true
3897
+ var selector_fieldvue_type_template_id_723827d0_staticRenderFns = []
3898
+ selector_fieldvue_type_template_id_723827d0_render._withStripped = true
3899
3899
 
3900
3900
 
3901
- // CONCATENATED MODULE: ./packages/selector/src/selector-field.vue?vue&type=template&id=43641679&
3901
+ // CONCATENATED MODULE: ./packages/selector/src/selector-field.vue?vue&type=template&id=723827d0&
3902
3902
 
3903
3903
  // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/selector/src/selector-field.vue?vue&type=script&lang=js&
3904
3904
  //
@@ -4150,8 +4150,8 @@ selector_fieldvue_type_template_id_43641679_render._withStripped = true
4150
4150
 
4151
4151
  var selector_field_component = normalizeComponent(
4152
4152
  src_selector_fieldvue_type_script_lang_js_,
4153
- selector_fieldvue_type_template_id_43641679_render,
4154
- selector_fieldvue_type_template_id_43641679_staticRenderFns,
4153
+ selector_fieldvue_type_template_id_723827d0_render,
4154
+ selector_fieldvue_type_template_id_723827d0_staticRenderFns,
4155
4155
  false,
4156
4156
  null,
4157
4157
  null,
@@ -7570,8 +7570,10 @@ var table_src_mainvue_type_script_lang_js_extends = Object.assign || function (t
7570
7570
  selected: null,
7571
7571
  pageChange: false,
7572
7572
  tableHeight: 'auto',
7573
+ validateSuccess: true,
7573
7574
  options: {},
7574
7575
  theadData: [],
7576
+ errForm: [],
7575
7577
  list: null,
7576
7578
  wheres: {},
7577
7579
  config: {
@@ -7656,23 +7658,49 @@ var table_src_mainvue_type_script_lang_js_extends = Object.assign || function (t
7656
7658
  }
7657
7659
  },
7658
7660
  methods: {
7661
+ validValue: function validValue(val) {
7662
+ val && this.$toast(val);
7663
+ this.validateSuccess = !val;
7664
+ },
7665
+ validate: function validate() {
7666
+ var _this2 = this;
7667
+
7668
+ var success = true;
7669
+ var _that = this;
7670
+ if (_that.form) {
7671
+ _that.theads.map(function (item) {
7672
+ if (item.rules && item.rules.required) {
7673
+ _this2.datas.map(function (x) {
7674
+ if (!x[item.field] && !item.rules.validator) {
7675
+ _that.$toast(item.rules.message);
7676
+ success = false;
7677
+ } else if (item.rules.validator) {
7678
+ item.rules.validator(x[item.field], _that.validValue);
7679
+ success = _that.validateSuccess;
7680
+ }
7681
+ });
7682
+ }
7683
+ });
7684
+ }
7685
+ return success;
7686
+ },
7659
7687
  toggleAllSelection: function toggleAllSelection() {
7660
7688
  this.$refs.oaTable.toggleAllSelection();
7661
7689
  },
7662
7690
  toggleRowSelection: function toggleRowSelection(newVal) {
7663
- var _this2 = this;
7691
+ var _this3 = this;
7664
7692
 
7665
7693
  newVal.forEach(function (row) {
7666
- _this2.$refs.oaTable.toggleRowSelection(row, true);
7694
+ _this3.$refs.oaTable.toggleRowSelection(row, true);
7667
7695
  });
7668
7696
  },
7669
7697
  checkSelect: function checkSelect(newVal) {
7670
- var _this3 = this;
7698
+ var _this4 = this;
7671
7699
 
7672
7700
  if (!this.isFirsetCheck && newVal) {
7673
7701
  if (util.getObjectType(newVal) === 'array') {
7674
7702
  newVal.forEach(function (row) {
7675
- _this3.$refs.oaTable.toggleRowSelection(row, true);
7703
+ _this4.$refs.oaTable.toggleRowSelection(row, true);
7676
7704
  });
7677
7705
  } else if (newVal === true) {
7678
7706
  this.toggleAllSelection();
@@ -7681,7 +7709,7 @@ var table_src_mainvue_type_script_lang_js_extends = Object.assign || function (t
7681
7709
  }
7682
7710
  },
7683
7711
  getTableData: function getTableData(res) {
7684
- var _this4 = this;
7712
+ var _this5 = this;
7685
7713
 
7686
7714
  var where = void 0;
7687
7715
  var first = void 0;
@@ -7717,32 +7745,32 @@ var table_src_mainvue_type_script_lang_js_extends = Object.assign || function (t
7717
7745
  data: reqData
7718
7746
  }).then(function (res) {
7719
7747
  if (res.rCode === 0 || res.status === 'success') {
7720
- var results = _this4.parseData !== undefined ? _this4.parseData(res.results || res.data || res) : res.results || res.data;
7721
- _this4.list = results.data || results.records || results.list || [];
7722
- _this4.config.totalCount = results.count || results.total || results.totalCount;
7748
+ var results = _this5.parseData !== undefined ? _this5.parseData(res.results || res.data || res) : res.results || res.data;
7749
+ _this5.list = results.data || results.records || results.list || [];
7750
+ _this5.config.totalCount = results.count || results.total || results.totalCount;
7723
7751
  } else {
7724
- _this4.list = [];
7752
+ _this5.list = [];
7725
7753
  }
7726
- _this4.$toast.clear();
7727
- _this4.$emit('success', res);
7754
+ _this5.$toast.clear();
7755
+ _this5.$emit('success', res);
7728
7756
  }).catch(function (err) {
7729
- _this4.$toast.clear();
7757
+ _this5.$toast.clear();
7730
7758
  if (err && err.code && [64, 65, 67].indexOf(err.code) > -1) {
7731
7759
  return;
7732
7760
  }
7733
7761
  if (util.getObjectType(err) === 'string') {
7734
- _this4.$toast(err);
7762
+ _this5.$toast(err);
7735
7763
  } else {
7736
- _this4.$toast(err.message || '数据加载失败,请联系管理员!');
7764
+ _this5.$toast(err.message || '数据加载失败,请联系管理员!');
7737
7765
  }
7738
7766
  });
7739
7767
  },
7740
7768
  currentChange: function currentChange(res) {
7741
- var _this5 = this;
7769
+ var _this6 = this;
7742
7770
 
7743
7771
  this.pageChange = true;
7744
7772
  setTimeout(function () {
7745
- _this5.pageChange = false;
7773
+ _this6.pageChange = false;
7746
7774
  }, 10);
7747
7775
  this.config.pageNum = res;
7748
7776
  this.$emit('page-current-change', res);
@@ -7751,7 +7779,7 @@ var table_src_mainvue_type_script_lang_js_extends = Object.assign || function (t
7751
7779
  }
7752
7780
  },
7753
7781
  getTheads: function getTheads() {
7754
- var _this6 = this;
7782
+ var _this7 = this;
7755
7783
 
7756
7784
  util.ajax({
7757
7785
  url: this.thead,
@@ -7763,24 +7791,24 @@ var table_src_mainvue_type_script_lang_js_extends = Object.assign || function (t
7763
7791
  if (res.rCode === 0) {
7764
7792
  var results = res.results;
7765
7793
  if (Array.isArray(results)) {
7766
- _this6.theadData = results;
7794
+ _this7.theadData = results;
7767
7795
  } else {
7768
- _this6.theadData = results.theadData || [];
7769
- _this6.list = results.data || results.records || [];
7770
- _this6.config.totalCount = results.count || results.total || results.totalCount;
7796
+ _this7.theadData = results.theadData || [];
7797
+ _this7.list = results.data || results.records || [];
7798
+ _this7.config.totalCount = results.count || results.total || results.totalCount;
7771
7799
  }
7772
7800
  } else {
7773
- _this6.theadData = [];
7801
+ _this7.theadData = [];
7774
7802
  }
7775
- _this6.$emit('success', res);
7803
+ _this7.$emit('success', res);
7776
7804
  }).catch(function (err) {
7777
7805
  if (err && err.code && [64, 65, 67].indexOf(err.code) > -1) {
7778
7806
  return;
7779
7807
  }
7780
7808
  if (util.getObjectType(err) === 'string') {
7781
- _this6.$message.error(err);
7809
+ _this7.$message.error(err);
7782
7810
  } else {
7783
- _this6.$message.error(err.message || '数据加载失败,请联系管理员!');
7811
+ _this7.$message.error(err.message || '数据加载失败,请联系管理员!');
7784
7812
  }
7785
7813
  });
7786
7814
  },
@@ -7794,51 +7822,51 @@ var table_src_mainvue_type_script_lang_js_extends = Object.assign || function (t
7794
7822
  this.$emit('focus', data, this.datas);
7795
7823
  },
7796
7824
  formChange: function formChange(data) {
7797
- var _this7 = this;
7825
+ var _this8 = this;
7798
7826
 
7799
7827
  if (this.pageChange) return;
7800
7828
  if (data.type) {
7801
7829
  this.pageChange = true;
7802
7830
  setTimeout(function () {
7803
- _this7.pageChange = false;
7831
+ _this8.pageChange = false;
7804
7832
  }, 20);
7805
7833
  }
7806
7834
  this.$emit('edit', data, this.datas);
7807
7835
  },
7808
7836
  resetHeight: function resetHeight() {
7809
- var _this8 = this;
7837
+ var _this9 = this;
7810
7838
 
7811
7839
  this.$nextTick(function () {
7812
- if (_this8.full && !_this8.height && !_this8.maxHeight) {
7813
- var height = _this8.$el.parentNode.offsetHeight - parseInt(util.getStyle(_this8.$el.parentNode, 'paddingTop'), 10) - parseInt(util.getStyle(_this8.$el.parentNode, 'paddingBottom'), 10);
7814
- for (var i = 0; i < _this8.$el.parentNode.childNodes.length; i++) {
7815
- var ele = _this8.$el.parentNode.childNodes[i];
7816
- if (ele !== _this8.$el) {
7840
+ if (_this9.full && !_this9.height && !_this9.maxHeight) {
7841
+ var height = _this9.$el.parentNode.offsetHeight - parseInt(util.getStyle(_this9.$el.parentNode, 'paddingTop'), 10) - parseInt(util.getStyle(_this9.$el.parentNode, 'paddingBottom'), 10);
7842
+ for (var i = 0; i < _this9.$el.parentNode.childNodes.length; i++) {
7843
+ var ele = _this9.$el.parentNode.childNodes[i];
7844
+ if (ele !== _this9.$el) {
7817
7845
  height -= ele.offsetHeight === undefined ? 0 : ele.offsetHeight;
7818
7846
  }
7819
7847
  }
7820
- for (var _i = 0; _i < _this8.$el.childNodes.length; _i++) {
7821
- var _ele = _this8.$el.childNodes[_i];
7822
- if (_ele !== _this8.$refs.esTableContent) {
7848
+ for (var _i = 0; _i < _this9.$el.childNodes.length; _i++) {
7849
+ var _ele = _this9.$el.childNodes[_i];
7850
+ if (_ele !== _this9.$refs.esTableContent) {
7823
7851
  height -= _ele.offsetHeight === undefined ? 0 : _ele.offsetHeight;
7824
7852
  }
7825
7853
  }
7826
- _this8.styles = { height: height + 'px' };
7827
- var loadingDom = _this8.$refs.esTableContent.querySelector('.el-loading-mask');
7828
- for (var _i2 = 0; _i2 < _this8.$refs.esTableContent.childNodes.length; _i2++) {
7829
- var _ele2 = _this8.$refs.esTableContent.childNodes[_i2];
7830
- if (_ele2 !== _this8.$refs.oaTable.$el && (!loadingDom || _ele2 !== loadingDom)) {
7854
+ _this9.styles = { height: height + 'px' };
7855
+ var loadingDom = _this9.$refs.esTableContent.querySelector('.el-loading-mask');
7856
+ for (var _i2 = 0; _i2 < _this9.$refs.esTableContent.childNodes.length; _i2++) {
7857
+ var _ele2 = _this9.$refs.esTableContent.childNodes[_i2];
7858
+ if (_ele2 !== _this9.$refs.oaTable.$el && (!loadingDom || _ele2 !== loadingDom)) {
7831
7859
  height -= _ele2.offsetHeight === undefined ? 0 : _ele2.offsetHeight;
7832
7860
  }
7833
7861
  }
7834
- var pt = parseInt(util.getStyle(_this8.$refs.esTableContent, 'paddingTop'), 10);
7835
- var pb = parseInt(util.getStyle(_this8.$refs.esTableContent, 'paddingBottom'), 10);
7836
- _this8.tableHeight = height - pt - pb + (_this8.page ? 2 : 1) + 'px';
7862
+ var pt = parseInt(util.getStyle(_this9.$refs.esTableContent, 'paddingTop'), 10);
7863
+ var pb = parseInt(util.getStyle(_this9.$refs.esTableContent, 'paddingBottom'), 10);
7864
+ _this9.tableHeight = height - pt - pb + (_this9.page ? 2 : 1) + 'px';
7837
7865
  }
7838
7866
  });
7839
7867
  },
7840
7868
  handleAjax: function handleAjax(handle, row) {
7841
- var _this9 = this;
7869
+ var _this10 = this;
7842
7870
 
7843
7871
  this.$toast.loading({
7844
7872
  message: '加载中...',
@@ -7900,9 +7928,9 @@ var table_src_mainvue_type_script_lang_js_extends = Object.assign || function (t
7900
7928
  method: handle.method,
7901
7929
  format: handle.format
7902
7930
  }).then(function (res) {
7903
- _this9.$toast.clear();
7931
+ _this10.$toast.clear();
7904
7932
  if (res.rCode === 0) {
7905
- _this9.$message({
7933
+ _this10.$message({
7906
7934
  message: handle.text + '\u6210\u529F',
7907
7935
  duration: 2000,
7908
7936
  type: 'success',
@@ -7910,17 +7938,17 @@ var table_src_mainvue_type_script_lang_js_extends = Object.assign || function (t
7910
7938
  var first = Object.prototype.hasOwnProperty.call(handle, 'first') ? handle.first : false;
7911
7939
  var reload = handle.reload || true;
7912
7940
  if (reload) {
7913
- _this9.reload({}, first);
7941
+ _this10.reload({}, first);
7914
7942
  }
7915
7943
  }
7916
7944
  });
7917
7945
  } else {
7918
- _this9.$toast(res.msg || handle.text + '\u5931\u8D25\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\uFF01');
7946
+ _this10.$toast(res.msg || handle.text + '\u5931\u8D25\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\uFF01');
7919
7947
  }
7920
7948
  }).catch(function () {});
7921
7949
  },
7922
7950
  handleClick: function handleClick(res) {
7923
- var _this10 = this;
7951
+ var _this11 = this;
7924
7952
 
7925
7953
  var row = res.row,
7926
7954
  handle = res.handle;
@@ -7958,7 +7986,7 @@ var table_src_mainvue_type_script_lang_js_extends = Object.assign || function (t
7958
7986
  cancelButtonText: '取消',
7959
7987
  type: 'warning'
7960
7988
  }).then(function () {
7961
- _this10.handleAjax(handle, rows);
7989
+ _this11.handleAjax(handle, rows);
7962
7990
  }).catch(function () {});
7963
7991
  } else {
7964
7992
  this.handleAjax(handle, rows);
@@ -8065,34 +8093,35 @@ var table_src_mainvue_type_script_lang_js_extends = Object.assign || function (t
8065
8093
  this.$emit('row-click', row, column, event);
8066
8094
  },
8067
8095
  getChildrens: function getChildrens(h, items) {
8068
- var _this11 = this;
8096
+ var _this12 = this;
8069
8097
 
8070
8098
  var doms = [];
8071
8099
  items.childHead.forEach(function (item, index) {
8072
8100
  if (!item.hide) {
8073
8101
  var childs = [];
8074
8102
  if (item.childHead && item.childHead.length) {
8075
- childs = _this11.getChildrens(h, item);
8103
+ childs = _this12.getChildrens(h, item);
8076
8104
  }
8077
8105
  doms.push(h('em-table-column', {
8106
+ ref: 'emTableColum',
8078
8107
  props: {
8079
- name: _this11.name,
8108
+ name: _this12.name,
8080
8109
  item: item,
8081
- prop: item[_this11.valueKey],
8082
- label: item[_this11.labelKey],
8110
+ prop: item[_this12.valueKey],
8111
+ label: item[_this12.labelKey],
8083
8112
  width: item.width,
8084
8113
  index: index + 1000,
8085
- readonly: _this11.readonly,
8086
- optionData: _this11.optionDatas,
8087
- form: _this11.form,
8088
- minWidth: _this11.minWidth
8114
+ readonly: _this12.readonly,
8115
+ optionData: _this12.optionDatas,
8116
+ form: _this12.form,
8117
+ minWidth: _this12.minWidth
8089
8118
  },
8090
8119
  on: {
8091
- handleClick: _this11.handleClick,
8092
- formBlur: _this11.formBlur,
8093
- formFocus: _this11.formFocus,
8094
- tableColumns: _this11.getTableColumns,
8095
- formChange: _this11.formChange
8120
+ handleClick: _this12.handleClick,
8121
+ formBlur: _this12.formBlur,
8122
+ formFocus: _this12.formFocus,
8123
+ tableColumns: _this12.getTableColumns,
8124
+ formChange: _this12.formChange
8096
8125
  }
8097
8126
  }, childs));
8098
8127
  }
@@ -8113,7 +8142,7 @@ var table_src_mainvue_type_script_lang_js_extends = Object.assign || function (t
8113
8142
  }
8114
8143
  },
8115
8144
  render: function render(h) {
8116
- var _this12 = this;
8145
+ var _this13 = this;
8117
8146
 
8118
8147
  var tag = 'div';
8119
8148
  var dom = [];
@@ -8152,6 +8181,7 @@ var table_src_mainvue_type_script_lang_js_extends = Object.assign || function (t
8152
8181
  if (items.type && (items.type === 'selection' || items.type === 'index')) {
8153
8182
  if (items.type === 'index') {
8154
8183
  dom.push(h('em-table-column', {
8184
+ ref: 'emTableColum',
8155
8185
  props: util.extend({}, {
8156
8186
  type: 'index',
8157
8187
  label: '序号',
@@ -8164,6 +8194,7 @@ var table_src_mainvue_type_script_lang_js_extends = Object.assign || function (t
8164
8194
  }));
8165
8195
  } else {
8166
8196
  dom.push(h('em-table-column', {
8197
+ ref: 'emTableColum',
8167
8198
  props: util.extend({}, {
8168
8199
  type: 'selection',
8169
8200
  width: '55',
@@ -8177,27 +8208,28 @@ var table_src_mainvue_type_script_lang_js_extends = Object.assign || function (t
8177
8208
  } else if (!items.hide) {
8178
8209
  var tds = [];
8179
8210
  if (items.childHead && items.childHead.length) {
8180
- tds = _this12.getChildrens(h, items);
8211
+ tds = _this13.getChildrens(h, items);
8181
8212
  }
8182
8213
  dom.push(h('em-table-column', {
8214
+ ref: 'emTableColum',
8183
8215
  props: {
8184
- name: _this12.name,
8185
- prop: items[_this12.valueKey],
8186
- label: items[_this12.labelKey],
8216
+ name: _this13.name,
8217
+ prop: items[_this13.valueKey],
8218
+ label: items[_this13.labelKey],
8187
8219
  item: items,
8188
8220
  width: items.width,
8189
8221
  index: indexs,
8190
- readonly: _this12.readonly,
8191
- optionData: _this12.optionDatas,
8192
- form: _this12.form,
8193
- minWidth: _this12.minWidth
8222
+ readonly: _this13.readonly,
8223
+ optionData: _this13.optionDatas,
8224
+ form: _this13.form,
8225
+ minWidth: _this13.minWidth
8194
8226
  },
8195
8227
  on: {
8196
- handleClick: _this12.handleClick,
8197
- formBlur: _this12.formBlur,
8198
- formFocus: _this12.formFocus,
8199
- tableColumns: _this12.getTableColumns,
8200
- formChange: _this12.formChange
8228
+ handleClick: _this13.handleClick,
8229
+ formBlur: _this13.formBlur,
8230
+ formFocus: _this13.formFocus,
8231
+ tableColumns: _this13.getTableColumns,
8232
+ formChange: _this13.formChange
8201
8233
  },
8202
8234
  key: indexs
8203
8235
  }, tds));
@@ -8282,8 +8314,8 @@ table_src_main.install = function (Vue) {
8282
8314
  };
8283
8315
 
8284
8316
  /* harmony default export */ var table = (table_src_main);
8285
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/table-column/src/main.vue?vue&type=template&id=7eca6cd2&
8286
- var mainvue_type_template_id_7eca6cd2_render = function () {
8317
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/table-column/src/main.vue?vue&type=template&id=1ced7a5e&
8318
+ var mainvue_type_template_id_1ced7a5e_render = function () {
8287
8319
  var _vm = this
8288
8320
  var _h = _vm.$createElement
8289
8321
  var _c = _vm._self._c || _h
@@ -8438,6 +8470,7 @@ var mainvue_type_template_id_7eca6cd2_render = function () {
8438
8470
  modifiers: { lazy: true },
8439
8471
  },
8440
8472
  ],
8473
+ ref: "emInput",
8441
8474
  staticClass:
8442
8475
  "el-input__inner",
8443
8476
  attrs: {
@@ -8561,6 +8594,7 @@ var mainvue_type_template_id_7eca6cd2_render = function () {
8561
8594
  "em-input",
8562
8595
  _vm._b(
8563
8596
  {
8597
+ ref: "emInput",
8564
8598
  staticClass: "em-table-input",
8565
8599
  attrs: {
8566
8600
  label: _vm.item.title,
@@ -8931,11 +8965,11 @@ var mainvue_type_template_id_7eca6cd2_render = function () {
8931
8965
  )
8932
8966
  : _vm._e()
8933
8967
  }
8934
- var mainvue_type_template_id_7eca6cd2_staticRenderFns = []
8935
- mainvue_type_template_id_7eca6cd2_render._withStripped = true
8968
+ var mainvue_type_template_id_1ced7a5e_staticRenderFns = []
8969
+ mainvue_type_template_id_1ced7a5e_render._withStripped = true
8936
8970
 
8937
8971
 
8938
- // CONCATENATED MODULE: ./packages/table-column/src/main.vue?vue&type=template&id=7eca6cd2&
8972
+ // CONCATENATED MODULE: ./packages/table-column/src/main.vue?vue&type=template&id=1ced7a5e&
8939
8973
 
8940
8974
  // CONCATENATED MODULE: ./packages/table-column/src/mixins/table.js
8941
8975
  /* harmony default export */ var mixins_table = ({
@@ -9538,6 +9572,8 @@ var src_mainvue_type_script_lang_js_typeof = typeof Symbol === "function" && typ
9538
9572
  //
9539
9573
  //
9540
9574
  //
9575
+ //
9576
+ //
9541
9577
 
9542
9578
 
9543
9579
 
@@ -9583,6 +9619,10 @@ var src_mainvue_type_script_lang_js_typeof = typeof Symbol === "function" && typ
9583
9619
  }
9584
9620
  },
9585
9621
  methods: (_methods = {
9622
+ handleFailed: function handleFailed(val) {
9623
+ console.log(this.$refs.emInput, 'Failed');
9624
+ console.log(this.$refs, 'Failed');
9625
+ },
9586
9626
  getValue: function getValue(row) {
9587
9627
  var str = void 0;
9588
9628
  var _item = this.item,
@@ -9701,8 +9741,8 @@ var src_mainvue_type_script_lang_js_typeof = typeof Symbol === "function" && typ
9701
9741
 
9702
9742
  var table_column_src_main_component = normalizeComponent(
9703
9743
  packages_table_column_src_mainvue_type_script_lang_js_,
9704
- mainvue_type_template_id_7eca6cd2_render,
9705
- mainvue_type_template_id_7eca6cd2_staticRenderFns,
9744
+ mainvue_type_template_id_1ced7a5e_render,
9745
+ mainvue_type_template_id_1ced7a5e_staticRenderFns,
9706
9746
  false,
9707
9747
  null,
9708
9748
  null,
@@ -16200,21 +16240,22 @@ count_down_src_main.install = function (Vue) {
16200
16240
  };
16201
16241
 
16202
16242
  /* harmony default export */ var count_down = (count_down_src_main);
16203
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/form/src/main.vue?vue&type=template&id=152d0360&
16204
- var mainvue_type_template_id_152d0360_render = function () {
16243
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/form/src/main.vue?vue&type=template&id=5aa23c3c&
16244
+ var mainvue_type_template_id_5aa23c3c_render = function () {
16205
16245
  var _vm = this
16206
16246
  var _h = _vm.$createElement
16207
16247
  var _c = _vm._self._c || _h
16208
16248
  return _c(
16209
16249
  "van-form",
16210
- _vm._g(
16211
- _vm._b(
16212
- { ref: "emForm", staticClass: "em-form" },
16213
- "van-form",
16214
- _vm.$attrs,
16215
- false
16216
- ),
16217
- _vm.$listeners
16250
+ _vm._b(
16251
+ {
16252
+ ref: "emForm",
16253
+ staticClass: "em-form",
16254
+ on: { failed: _vm.handleFailed, submit: _vm.handleSubmit },
16255
+ },
16256
+ "van-form",
16257
+ _vm.$attrs,
16258
+ false
16218
16259
  ),
16219
16260
  [
16220
16261
  _vm._l(_vm.newContent, function (item, index) {
@@ -16540,10 +16581,12 @@ var mainvue_type_template_id_152d0360_render = function () {
16540
16581
  "em-table",
16541
16582
  _vm._b(
16542
16583
  {
16584
+ ref: "emFormTable",
16585
+ refInFor: true,
16543
16586
  staticClass: "em-form-table",
16544
16587
  style: "margin:" + (item.margin || 10) + "px 0px",
16545
16588
  attrs: {
16546
- data: _vm.model[item.name] || [],
16589
+ data: _vm.model[item.name],
16547
16590
  thead: item.tHead,
16548
16591
  form:
16549
16592
  !item.disabled &&
@@ -16614,11 +16657,11 @@ var mainvue_type_template_id_152d0360_render = function () {
16614
16657
  2
16615
16658
  )
16616
16659
  }
16617
- var mainvue_type_template_id_152d0360_staticRenderFns = []
16618
- mainvue_type_template_id_152d0360_render._withStripped = true
16660
+ var mainvue_type_template_id_5aa23c3c_staticRenderFns = []
16661
+ mainvue_type_template_id_5aa23c3c_render._withStripped = true
16619
16662
 
16620
16663
 
16621
- // CONCATENATED MODULE: ./packages/form/src/main.vue?vue&type=template&id=152d0360&
16664
+ // CONCATENATED MODULE: ./packages/form/src/main.vue?vue&type=template&id=5aa23c3c&
16622
16665
 
16623
16666
  // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/form/src/main.vue?vue&type=script&lang=js&
16624
16667
  //
@@ -16805,7 +16848,6 @@ mainvue_type_template_id_152d0360_render._withStripped = true
16805
16848
  //
16806
16849
  //
16807
16850
  //
16808
- //
16809
16851
 
16810
16852
  /* harmony default export */ var form_src_mainvue_type_script_lang_js_ = ({
16811
16853
  name: 'EmForm',
@@ -16876,27 +16918,42 @@ mainvue_type_template_id_152d0360_render._withStripped = true
16876
16918
  },
16877
16919
 
16878
16920
  methods: {
16879
- // setBtnType() {
16880
- // let tableList = this.contents.filter(x => x.type == 'table');
16881
- // if (tableList.length > 0) {
16882
- // tableList.map(x => {
16883
- // if (x.type == 'handle' && x.events) {
16884
- // x.events.map(y => {
16885
- // y['native-type'] = 'button';
16886
- // });
16887
- // }
16888
- // });
16889
- // }
16890
- // this.contents
16891
- // },
16921
+ handleFailed: function handleFailed(values) {
16922
+ this.$refs.emFormTable.map(function (item) {
16923
+ item.validate();
16924
+ });
16925
+ this.$emit('failed', { errors: values.errors, values: this.model });
16926
+ },
16927
+ handleSubmit: function handleSubmit() {
16928
+ var errForm = false;
16929
+ this.$refs.emFormTable.map(function (item) {
16930
+ if (!item.validate()) {
16931
+ errForm = true;
16932
+ }
16933
+ });
16934
+ if (errForm) {
16935
+ this.$emit('failed', { errors: [], values: this.model });
16936
+ } else {
16937
+ this.$emit('submit', this.model);
16938
+ }
16939
+ },
16892
16940
  handleChange: function handleChange(key, value) {
16893
16941
  this.$emit('change', key, value);
16894
16942
  },
16895
16943
  handleBtnClick: function handleBtnClick(val) {
16896
16944
  this.$emit('table-btn-click', val);
16897
16945
  },
16898
- validate: function validate() {
16899
- this.$refs.emForm.validate();
16946
+ validate: function validate(name) {
16947
+ this.$refs.emForm.validate(name);
16948
+ },
16949
+ submit: function submit() {
16950
+ this.$refs.emForm.submit();
16951
+ },
16952
+ resetValidation: function resetValidation(name) {
16953
+ this.$refs.emForm.resetValidation(name);
16954
+ },
16955
+ scrollToField: function scrollToField(name, alignToTop) {
16956
+ this.$refs.emForm.scrollToField(name, alignToTop);
16900
16957
  },
16901
16958
  handleClick: function handleClick(val) {
16902
16959
  this.$emit('click', { values: this.model, btn: val });
@@ -16915,8 +16972,8 @@ mainvue_type_template_id_152d0360_render._withStripped = true
16915
16972
 
16916
16973
  var form_src_main_component = normalizeComponent(
16917
16974
  packages_form_src_mainvue_type_script_lang_js_,
16918
- mainvue_type_template_id_152d0360_render,
16919
- mainvue_type_template_id_152d0360_staticRenderFns,
16975
+ mainvue_type_template_id_5aa23c3c_render,
16976
+ mainvue_type_template_id_5aa23c3c_staticRenderFns,
16920
16977
  false,
16921
16978
  null,
16922
16979
  null,
@@ -17914,7 +17971,7 @@ if (typeof window !== 'undefined' && window.Vue) {
17914
17971
  }
17915
17972
 
17916
17973
  /* harmony default export */ var src = __webpack_exports__["default"] = ({
17917
- version: '0.1.78',
17974
+ version: '0.1.80',
17918
17975
  install: install,
17919
17976
  Button: packages_button,
17920
17977
  ButtonGroup: button_group,