eoss-mobiles 0.1.89 → 0.1.91

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.
package/CHANGELOG.md CHANGED
@@ -1,10 +1,10 @@
1
1
  ## 更新日志
2
2
 
3
- ### 0.1.88
3
+ ### 0.1.90
4
4
 
5
5
  - 2023-12-08
6
- - fix:<br/>1. input 组件新增属性required-position必填图标展示的位置<br/>2. form 组件优化验证表格
7
- - 版本号:0.1.88
6
+ - fix:<br/>1. input 组件新增属性required-position必填图标展示的位置<br/>2. form 组件优化验证表格<br/>2. table 组件样式优化
7
+ - 版本号:0.1.90
8
8
  - 2023-12-05
9
9
  - fix:<br/>1. input 组件新增属性show-password是否显示切换密码图标<br/>2. form 组件优化验证表格<br/>3. flow 组件优化
10
10
  - 版本号:0.1.84
@@ -7652,6 +7652,7 @@ var table_src_mainvue_type_script_lang_js_extends = Object.assign || function (t
7652
7652
  selected: null,
7653
7653
  pageChange: false,
7654
7654
  tableHeight: 'auto',
7655
+ tableClientHeight: '',
7655
7656
  validateSuccess: true,
7656
7657
  options: {},
7657
7658
  theadData: [],
@@ -7705,9 +7706,14 @@ var table_src_mainvue_type_script_lang_js_extends = Object.assign || function (t
7705
7706
  }
7706
7707
  },
7707
7708
  mounted: function mounted() {
7709
+ var _this = this;
7710
+
7708
7711
  // this.resetHeight();
7709
7712
  this.getTableData();
7710
7713
  this.checkSelect(this.checked);
7714
+ this.$nextTick(function () {
7715
+ _this.tableClientHeight = _this.$refs.emTable.clientHeight;
7716
+ });
7711
7717
  },
7712
7718
 
7713
7719
  computed: {
@@ -7720,7 +7726,7 @@ var table_src_mainvue_type_script_lang_js_extends = Object.assign || function (t
7720
7726
 
7721
7727
  datas: {
7722
7728
  get: function get() {
7723
- var _this = this;
7729
+ var _this2 = this;
7724
7730
 
7725
7731
  if (this.list) {
7726
7732
  return this.list;
@@ -7728,7 +7734,7 @@ var table_src_mainvue_type_script_lang_js_extends = Object.assign || function (t
7728
7734
  if (this.page && this.data && this.data.length && this.config.totalCount < this.data.length + 1) {
7729
7735
  this.config.totalCount = this.data.length - this.lose;
7730
7736
  return this.data.filter(function (item, index) {
7731
- return index > (_this.config.pageNum - 1) * _this.config.pageSize - 1 && index < _this.config.pageNum * _this.config.pageSize;
7737
+ return index > (_this2.config.pageNum - 1) * _this2.config.pageSize - 1 && index < _this2.config.pageNum * _this2.config.pageSize;
7732
7738
  });
7733
7739
  }
7734
7740
 
@@ -7745,14 +7751,14 @@ var table_src_mainvue_type_script_lang_js_extends = Object.assign || function (t
7745
7751
  this.validateSuccess = !val;
7746
7752
  },
7747
7753
  validate: function validate() {
7748
- var _this2 = this;
7754
+ var _this3 = this;
7749
7755
 
7750
7756
  var success = true;
7751
7757
  var _that = this;
7752
7758
  if (_that.form) {
7753
7759
  _that.theads.map(function (item) {
7754
7760
  if (item.rules && item.rules.required) {
7755
- _this2.datas.map(function (x) {
7761
+ _this3.datas.map(function (x) {
7756
7762
  if (!x[item.field] && !item.rules.validator) {
7757
7763
  _that.$toast(item.rules.message);
7758
7764
  success = false;
@@ -7770,19 +7776,19 @@ var table_src_mainvue_type_script_lang_js_extends = Object.assign || function (t
7770
7776
  this.$refs.oaTable.toggleAllSelection();
7771
7777
  },
7772
7778
  toggleRowSelection: function toggleRowSelection(newVal) {
7773
- var _this3 = this;
7779
+ var _this4 = this;
7774
7780
 
7775
7781
  newVal.forEach(function (row) {
7776
- _this3.$refs.oaTable.toggleRowSelection(row, true);
7782
+ _this4.$refs.oaTable.toggleRowSelection(row, true);
7777
7783
  });
7778
7784
  },
7779
7785
  checkSelect: function checkSelect(newVal) {
7780
- var _this4 = this;
7786
+ var _this5 = this;
7781
7787
 
7782
7788
  if (!this.isFirsetCheck && newVal) {
7783
7789
  if (util.getObjectType(newVal) === 'array') {
7784
7790
  newVal.forEach(function (row) {
7785
- _this4.$refs.oaTable.toggleRowSelection(row, true);
7791
+ _this5.$refs.oaTable.toggleRowSelection(row, true);
7786
7792
  });
7787
7793
  } else if (newVal === true) {
7788
7794
  this.toggleAllSelection();
@@ -7791,7 +7797,7 @@ var table_src_mainvue_type_script_lang_js_extends = Object.assign || function (t
7791
7797
  }
7792
7798
  },
7793
7799
  getTableData: function getTableData(res) {
7794
- var _this5 = this;
7800
+ var _this6 = this;
7795
7801
 
7796
7802
  var where = void 0;
7797
7803
  var first = void 0;
@@ -7827,32 +7833,32 @@ var table_src_mainvue_type_script_lang_js_extends = Object.assign || function (t
7827
7833
  data: reqData
7828
7834
  }).then(function (res) {
7829
7835
  if (res.rCode === 0 || res.status === 'success') {
7830
- var results = _this5.parseData !== undefined ? _this5.parseData(res.results || res.data || res) : res.results || res.data;
7831
- _this5.list = results.data || results.records || results.list || [];
7832
- _this5.config.totalCount = results.count || results.total || results.totalCount;
7836
+ var results = _this6.parseData !== undefined ? _this6.parseData(res.results || res.data || res) : res.results || res.data;
7837
+ _this6.list = results.data || results.records || results.list || [];
7838
+ _this6.config.totalCount = results.count || results.total || results.totalCount;
7833
7839
  } else {
7834
- _this5.list = [];
7840
+ _this6.list = [];
7835
7841
  }
7836
- _this5.$toast.clear();
7837
- _this5.$emit('success', res);
7842
+ _this6.$toast.clear();
7843
+ _this6.$emit('success', res);
7838
7844
  }).catch(function (err) {
7839
- _this5.$toast.clear();
7845
+ _this6.$toast.clear();
7840
7846
  if (err && err.code && [64, 65, 67].indexOf(err.code) > -1) {
7841
7847
  return;
7842
7848
  }
7843
7849
  if (util.getObjectType(err) === 'string') {
7844
- _this5.$toast(err);
7850
+ _this6.$toast(err);
7845
7851
  } else {
7846
- _this5.$toast(err.message || '数据加载失败,请联系管理员!');
7852
+ _this6.$toast(err.message || '数据加载失败,请联系管理员!');
7847
7853
  }
7848
7854
  });
7849
7855
  },
7850
7856
  currentChange: function currentChange(res) {
7851
- var _this6 = this;
7857
+ var _this7 = this;
7852
7858
 
7853
7859
  this.pageChange = true;
7854
7860
  setTimeout(function () {
7855
- _this6.pageChange = false;
7861
+ _this7.pageChange = false;
7856
7862
  }, 10);
7857
7863
  this.config.pageNum = res;
7858
7864
  this.$emit('page-current-change', res);
@@ -7861,7 +7867,7 @@ var table_src_mainvue_type_script_lang_js_extends = Object.assign || function (t
7861
7867
  }
7862
7868
  },
7863
7869
  getTheads: function getTheads() {
7864
- var _this7 = this;
7870
+ var _this8 = this;
7865
7871
 
7866
7872
  util.ajax({
7867
7873
  url: this.thead,
@@ -7873,24 +7879,24 @@ var table_src_mainvue_type_script_lang_js_extends = Object.assign || function (t
7873
7879
  if (res.rCode === 0) {
7874
7880
  var results = res.results;
7875
7881
  if (Array.isArray(results)) {
7876
- _this7.theadData = results;
7882
+ _this8.theadData = results;
7877
7883
  } else {
7878
- _this7.theadData = results.theadData || [];
7879
- _this7.list = results.data || results.records || [];
7880
- _this7.config.totalCount = results.count || results.total || results.totalCount;
7884
+ _this8.theadData = results.theadData || [];
7885
+ _this8.list = results.data || results.records || [];
7886
+ _this8.config.totalCount = results.count || results.total || results.totalCount;
7881
7887
  }
7882
7888
  } else {
7883
- _this7.theadData = [];
7889
+ _this8.theadData = [];
7884
7890
  }
7885
- _this7.$emit('success', res);
7891
+ _this8.$emit('success', res);
7886
7892
  }).catch(function (err) {
7887
7893
  if (err && err.code && [64, 65, 67].indexOf(err.code) > -1) {
7888
7894
  return;
7889
7895
  }
7890
7896
  if (util.getObjectType(err) === 'string') {
7891
- _this7.$message.error(err);
7897
+ _this8.$message.error(err);
7892
7898
  } else {
7893
- _this7.$message.error(err.message || '数据加载失败,请联系管理员!');
7899
+ _this8.$message.error(err.message || '数据加载失败,请联系管理员!');
7894
7900
  }
7895
7901
  });
7896
7902
  },
@@ -7904,51 +7910,51 @@ var table_src_mainvue_type_script_lang_js_extends = Object.assign || function (t
7904
7910
  this.$emit('focus', data, this.datas);
7905
7911
  },
7906
7912
  formChange: function formChange(data) {
7907
- var _this8 = this;
7913
+ var _this9 = this;
7908
7914
 
7909
7915
  if (this.pageChange) return;
7910
7916
  if (data.type) {
7911
7917
  this.pageChange = true;
7912
7918
  setTimeout(function () {
7913
- _this8.pageChange = false;
7919
+ _this9.pageChange = false;
7914
7920
  }, 20);
7915
7921
  }
7916
7922
  this.$emit('edit', data, this.datas);
7917
7923
  },
7918
7924
  resetHeight: function resetHeight() {
7919
- var _this9 = this;
7925
+ var _this10 = this;
7920
7926
 
7921
7927
  this.$nextTick(function () {
7922
- if (_this9.full && !_this9.height && !_this9.maxHeight) {
7923
- var height = _this9.$el.parentNode.offsetHeight - parseInt(util.getStyle(_this9.$el.parentNode, 'paddingTop'), 10) - parseInt(util.getStyle(_this9.$el.parentNode, 'paddingBottom'), 10);
7924
- for (var i = 0; i < _this9.$el.parentNode.childNodes.length; i++) {
7925
- var ele = _this9.$el.parentNode.childNodes[i];
7926
- if (ele !== _this9.$el) {
7928
+ if (_this10.full && !_this10.height && !_this10.maxHeight) {
7929
+ var height = _this10.$el.parentNode.offsetHeight - parseInt(util.getStyle(_this10.$el.parentNode, 'paddingTop'), 10) - parseInt(util.getStyle(_this10.$el.parentNode, 'paddingBottom'), 10);
7930
+ for (var i = 0; i < _this10.$el.parentNode.childNodes.length; i++) {
7931
+ var ele = _this10.$el.parentNode.childNodes[i];
7932
+ if (ele !== _this10.$el) {
7927
7933
  height -= ele.offsetHeight === undefined ? 0 : ele.offsetHeight;
7928
7934
  }
7929
7935
  }
7930
- for (var _i = 0; _i < _this9.$el.childNodes.length; _i++) {
7931
- var _ele = _this9.$el.childNodes[_i];
7932
- if (_ele !== _this9.$refs.esTableContent) {
7936
+ for (var _i = 0; _i < _this10.$el.childNodes.length; _i++) {
7937
+ var _ele = _this10.$el.childNodes[_i];
7938
+ if (_ele !== _this10.$refs.esTableContent) {
7933
7939
  height -= _ele.offsetHeight === undefined ? 0 : _ele.offsetHeight;
7934
7940
  }
7935
7941
  }
7936
- _this9.styles = { height: height + 'px' };
7937
- var loadingDom = _this9.$refs.esTableContent.querySelector('.el-loading-mask');
7938
- for (var _i2 = 0; _i2 < _this9.$refs.esTableContent.childNodes.length; _i2++) {
7939
- var _ele2 = _this9.$refs.esTableContent.childNodes[_i2];
7940
- if (_ele2 !== _this9.$refs.oaTable.$el && (!loadingDom || _ele2 !== loadingDom)) {
7942
+ _this10.styles = { height: height + 'px' };
7943
+ var loadingDom = _this10.$refs.esTableContent.querySelector('.el-loading-mask');
7944
+ for (var _i2 = 0; _i2 < _this10.$refs.esTableContent.childNodes.length; _i2++) {
7945
+ var _ele2 = _this10.$refs.esTableContent.childNodes[_i2];
7946
+ if (_ele2 !== _this10.$refs.oaTable.$el && (!loadingDom || _ele2 !== loadingDom)) {
7941
7947
  height -= _ele2.offsetHeight === undefined ? 0 : _ele2.offsetHeight;
7942
7948
  }
7943
7949
  }
7944
- var pt = parseInt(util.getStyle(_this9.$refs.esTableContent, 'paddingTop'), 10);
7945
- var pb = parseInt(util.getStyle(_this9.$refs.esTableContent, 'paddingBottom'), 10);
7946
- _this9.tableHeight = height - pt - pb + (_this9.page ? 2 : 1) + 'px';
7950
+ var pt = parseInt(util.getStyle(_this10.$refs.esTableContent, 'paddingTop'), 10);
7951
+ var pb = parseInt(util.getStyle(_this10.$refs.esTableContent, 'paddingBottom'), 10);
7952
+ _this10.tableHeight = height - pt - pb + (_this10.page ? 2 : 1) + 'px';
7947
7953
  }
7948
7954
  });
7949
7955
  },
7950
7956
  handleAjax: function handleAjax(handle, row) {
7951
- var _this10 = this;
7957
+ var _this11 = this;
7952
7958
 
7953
7959
  this.$toast.loading({
7954
7960
  message: '加载中...',
@@ -8010,9 +8016,9 @@ var table_src_mainvue_type_script_lang_js_extends = Object.assign || function (t
8010
8016
  method: handle.method,
8011
8017
  format: handle.format
8012
8018
  }).then(function (res) {
8013
- _this10.$toast.clear();
8019
+ _this11.$toast.clear();
8014
8020
  if (res.rCode === 0) {
8015
- _this10.$message({
8021
+ _this11.$message({
8016
8022
  message: handle.text + '\u6210\u529F',
8017
8023
  duration: 2000,
8018
8024
  type: 'success',
@@ -8020,17 +8026,17 @@ var table_src_mainvue_type_script_lang_js_extends = Object.assign || function (t
8020
8026
  var first = Object.prototype.hasOwnProperty.call(handle, 'first') ? handle.first : false;
8021
8027
  var reload = handle.reload || true;
8022
8028
  if (reload) {
8023
- _this10.reload({}, first);
8029
+ _this11.reload({}, first);
8024
8030
  }
8025
8031
  }
8026
8032
  });
8027
8033
  } else {
8028
- _this10.$toast(res.msg || handle.text + '\u5931\u8D25\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\uFF01');
8034
+ _this11.$toast(res.msg || handle.text + '\u5931\u8D25\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\uFF01');
8029
8035
  }
8030
8036
  }).catch(function () {});
8031
8037
  },
8032
8038
  handleClick: function handleClick(res) {
8033
- var _this11 = this;
8039
+ var _this12 = this;
8034
8040
 
8035
8041
  var row = res.row,
8036
8042
  handle = res.handle;
@@ -8068,7 +8074,7 @@ var table_src_mainvue_type_script_lang_js_extends = Object.assign || function (t
8068
8074
  cancelButtonText: '取消',
8069
8075
  type: 'warning'
8070
8076
  }).then(function () {
8071
- _this11.handleAjax(handle, rows);
8077
+ _this12.handleAjax(handle, rows);
8072
8078
  }).catch(function () {});
8073
8079
  } else {
8074
8080
  this.handleAjax(handle, rows);
@@ -8175,35 +8181,35 @@ var table_src_mainvue_type_script_lang_js_extends = Object.assign || function (t
8175
8181
  this.$emit('row-click', row, column, event);
8176
8182
  },
8177
8183
  getChildrens: function getChildrens(h, items) {
8178
- var _this12 = this;
8184
+ var _this13 = this;
8179
8185
 
8180
8186
  var doms = [];
8181
8187
  items.childHead.forEach(function (item, index) {
8182
8188
  if (!item.hide) {
8183
8189
  var childs = [];
8184
8190
  if (item.childHead && item.childHead.length) {
8185
- childs = _this12.getChildrens(h, item);
8191
+ childs = _this13.getChildrens(h, item);
8186
8192
  }
8187
8193
  doms.push(h('em-table-column', {
8188
8194
  ref: 'emTableColum',
8189
8195
  props: {
8190
- name: _this12.name,
8196
+ name: _this13.name,
8191
8197
  item: item,
8192
- prop: item[_this12.valueKey],
8193
- label: item[_this12.labelKey],
8198
+ prop: item[_this13.valueKey],
8199
+ label: item[_this13.labelKey],
8194
8200
  width: item.width,
8195
8201
  index: index + 1000,
8196
- readonly: _this12.readonly,
8197
- optionData: _this12.optionDatas,
8198
- form: _this12.form,
8199
- minWidth: _this12.minWidth
8202
+ readonly: _this13.readonly,
8203
+ optionData: _this13.optionDatas,
8204
+ form: _this13.form,
8205
+ minWidth: _this13.minWidth
8200
8206
  },
8201
8207
  on: {
8202
- handleClick: _this12.handleClick,
8203
- formBlur: _this12.formBlur,
8204
- formFocus: _this12.formFocus,
8205
- tableColumns: _this12.getTableColumns,
8206
- formChange: _this12.formChange
8208
+ handleClick: _this13.handleClick,
8209
+ formBlur: _this13.formBlur,
8210
+ formFocus: _this13.formFocus,
8211
+ tableColumns: _this13.getTableColumns,
8212
+ formChange: _this13.formChange
8207
8213
  }
8208
8214
  }, childs));
8209
8215
  }
@@ -8224,7 +8230,7 @@ var table_src_mainvue_type_script_lang_js_extends = Object.assign || function (t
8224
8230
  }
8225
8231
  },
8226
8232
  render: function render(h) {
8227
- var _this13 = this;
8233
+ var _this14 = this;
8228
8234
 
8229
8235
  var tag = 'div';
8230
8236
  var dom = [];
@@ -8290,28 +8296,28 @@ var table_src_mainvue_type_script_lang_js_extends = Object.assign || function (t
8290
8296
  } else if (!items.hide) {
8291
8297
  var tds = [];
8292
8298
  if (items.childHead && items.childHead.length) {
8293
- tds = _this13.getChildrens(h, items);
8299
+ tds = _this14.getChildrens(h, items);
8294
8300
  }
8295
8301
  dom.push(h('em-table-column', {
8296
8302
  ref: 'emTableColum',
8297
8303
  props: {
8298
- name: _this13.name,
8299
- prop: items[_this13.valueKey],
8300
- label: items[_this13.labelKey],
8304
+ name: _this14.name,
8305
+ prop: items[_this14.valueKey],
8306
+ label: items[_this14.labelKey],
8301
8307
  item: items,
8302
8308
  width: items.width,
8303
8309
  index: indexs,
8304
- readonly: _this13.readonly,
8305
- optionData: _this13.optionDatas,
8306
- form: _this13.form,
8307
- minWidth: _this13.minWidth
8310
+ readonly: _this14.readonly,
8311
+ optionData: _this14.optionDatas,
8312
+ form: _this14.form,
8313
+ minWidth: _this14.minWidth
8308
8314
  },
8309
8315
  on: {
8310
- handleClick: _this13.handleClick,
8311
- formBlur: _this13.formBlur,
8312
- formFocus: _this13.formFocus,
8313
- tableColumns: _this13.getTableColumns,
8314
- formChange: _this13.formChange
8316
+ handleClick: _this14.handleClick,
8317
+ formBlur: _this14.formBlur,
8318
+ formFocus: _this14.formFocus,
8319
+ tableColumns: _this14.getTableColumns,
8320
+ formChange: _this14.formChange
8315
8321
  },
8316
8322
  key: indexs
8317
8323
  }, tds));
@@ -8326,7 +8332,7 @@ var table_src_mainvue_type_script_lang_js_extends = Object.assign || function (t
8326
8332
  'header-row-class-name': this.tableHeader,
8327
8333
  data: this.datas
8328
8334
  }, this.$attrs, {
8329
- height: this.tableHeight !== 'auto' ? this.tableHeight : undefined
8335
+ height: this.tableHeight !== 'auto' ? this.tableHeight : this.tableClientHeight
8330
8336
  }),
8331
8337
  on: table_src_mainvue_type_script_lang_js_extends({}, this.$listeners, {
8332
8338
  'row-click': this.rowClick,
@@ -8346,6 +8352,7 @@ var table_src_mainvue_type_script_lang_js_extends = Object.assign || function (t
8346
8352
  }));
8347
8353
  }
8348
8354
  return h('div', {
8355
+ ref: 'emTable',
8349
8356
  style: {
8350
8357
  height: '100%'
8351
8358
  }
@@ -18040,7 +18047,7 @@ if (typeof window !== 'undefined' && window.Vue) {
18040
18047
  }
18041
18048
 
18042
18049
  /* harmony default export */ var src = __webpack_exports__["default"] = ({
18043
- version: '0.1.89',
18050
+ version: '0.1.91',
18044
18051
  install: install,
18045
18052
  Button: packages_button,
18046
18053
  ButtonGroup: button_group,