eoss-ui 0.4.86 → 0.4.88

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/lib/upload.js CHANGED
@@ -3398,8 +3398,8 @@ module.exports = require("qs");
3398
3398
  // ESM COMPAT FLAG
3399
3399
  __webpack_require__.r(__webpack_exports__);
3400
3400
 
3401
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/upload/src/main.vue?vue&type=template&id=df2dc078&
3402
- var mainvue_type_template_id_df2dc078_render = function () {
3401
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/upload/src/main.vue?vue&type=template&id=3bdc3f65&
3402
+ var mainvue_type_template_id_3bdc3f65_render = function () {
3403
3403
  var _vm = this
3404
3404
  var _h = _vm.$createElement
3405
3405
  var _c = _vm._self._c || _h
@@ -3779,10 +3779,10 @@ var mainvue_type_template_id_df2dc078_render = function () {
3779
3779
  : _vm._e()
3780
3780
  }
3781
3781
  var staticRenderFns = []
3782
- mainvue_type_template_id_df2dc078_render._withStripped = true
3782
+ mainvue_type_template_id_3bdc3f65_render._withStripped = true
3783
3783
 
3784
3784
 
3785
- // CONCATENATED MODULE: ./packages/upload/src/main.vue?vue&type=template&id=df2dc078&
3785
+ // CONCATENATED MODULE: ./packages/upload/src/main.vue?vue&type=template&id=3bdc3f65&
3786
3786
 
3787
3787
  // EXTERNAL MODULE: ./src/config/api.js
3788
3788
  var api = __webpack_require__(1);
@@ -4266,7 +4266,7 @@ var _props;
4266
4266
  return this.showFileList;
4267
4267
  },
4268
4268
  url: function url() {
4269
- var url = this.action ? this.action : this.portrait || !this.multiple ? api["Wb" /* uploadOnlyOne */] : api["Yb" /* uploads */];
4269
+ var url = this.action ? this.action : this.portrait ? api["Wb" /* uploadOnlyOne */] : api["Yb" /* uploads */];
4270
4270
  return url.indexOf(this.host) > -1 ? url : this.host + url;
4271
4271
  },
4272
4272
  excludes: function excludes() {
@@ -4848,7 +4848,7 @@ var componentNormalizer = __webpack_require__(2);
4848
4848
 
4849
4849
  var component = Object(componentNormalizer["a" /* default */])(
4850
4850
  src_mainvue_type_script_lang_js_,
4851
- mainvue_type_template_id_df2dc078_render,
4851
+ mainvue_type_template_id_3bdc3f65_render,
4852
4852
  staticRenderFns,
4853
4853
  false,
4854
4854
  null,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eoss-ui",
3
- "version": "0.4.86",
3
+ "version": "0.4.88",
4
4
  "description": "eoss内部业务组件",
5
5
  "main": "lib/eoss-ui.common.js",
6
6
  "files": [
@@ -95,7 +95,7 @@
95
95
  "cp-cli": "^1.0.2",
96
96
  "cross-env": "^3.1.3",
97
97
  "css-loader": "^2.1.0",
98
- "eoss-element": "^0.2.69",
98
+ "eoss-element": "^0.2.71",
99
99
  "es6-promise": "^4.0.5",
100
100
  "eslint": "4.18.2",
101
101
  "eslint-config-elemefe": "0.1.1",
@@ -449,7 +449,12 @@ export default {
449
449
  },
450
450
  theads: {
451
451
  get() {
452
- return typeof this.thead === 'string' ? this.theadData : this.thead;
452
+ if (typeof this.thead === 'string') {
453
+ this.theadData.length && this.setMinWidth(this.theadData);
454
+ return this.theadData;
455
+ }
456
+ this.setMinWidth(this.thead);
457
+ return this.thead;
453
458
  },
454
459
  set(val) {
455
460
  return val;
@@ -602,6 +607,7 @@ export default {
602
607
  this.getOptions(this.thead);
603
608
  }
604
609
  this.immediate && this.getTableData();
610
+ this.chekOpenTotalArea();
605
611
  },
606
612
  mounted() {
607
613
  this.datas.length && this.checkSelect(this.checked);
@@ -627,6 +633,20 @@ export default {
627
633
  }
628
634
  return false;
629
635
  },
636
+ setMinWidth(obj) {
637
+ obj.forEach((item) => {
638
+ if (item.childHead && item.childHead.length) {
639
+ this.setMinWidth(item.childHead);
640
+ } else if (item.children && item.children.length) {
641
+ this.setMinWidth(item.children);
642
+ } else if (!item.width && !item.minWidth && item.title) {
643
+ let width = item.title.length * 14 + 20;
644
+ if (width > 80) {
645
+ this.$set(item, 'minWidth', width);
646
+ }
647
+ }
648
+ });
649
+ },
630
650
  getOptions(res) {
631
651
  res.forEach((item) => {
632
652
  if (item.sysCode || item.url) {
@@ -1276,6 +1296,10 @@ export default {
1276
1296
  } else {
1277
1297
  console.warn(this.$el.parentNode, `获取不到高度!`);
1278
1298
  }
1299
+ } else if (!warn) {
1300
+ setTimeout(() => {
1301
+ this.resetHeight(true);
1302
+ }, 1000);
1279
1303
  }
1280
1304
  }
1281
1305
  });
@@ -243,9 +243,7 @@
243
243
  <es-label
244
244
  slot="label"
245
245
  v-if="
246
- item.showLabel !== false &&
247
- item.type !== 'table' &&
248
- showLabel
246
+ item.showLabel !== false && item.label && showLabel
249
247
  "
250
248
  :contents="item.label"
251
249
  v-bind="
@@ -1184,11 +1182,7 @@
1184
1182
  >
1185
1183
  <es-label
1186
1184
  slot="label"
1187
- v-if="
1188
- item.showLabel !== false &&
1189
- item.type !== 'table' &&
1190
- showLabel
1191
- "
1185
+ v-if="item.showLabel !== false && item.label && showLabel"
1192
1186
  :contents="item.label"
1193
1187
  v-bind="
1194
1188
  item.label
@@ -2154,11 +2148,7 @@
2154
2148
  >
2155
2149
  <es-label
2156
2150
  slot="label"
2157
- v-if="
2158
- item.showLabel !== false &&
2159
- item.type !== 'table' &&
2160
- showLabel
2161
- "
2151
+ v-if="item.showLabel !== false && item.label && showLabel"
2162
2152
  :contents="item.label"
2163
2153
  v-bind="
2164
2154
  item.label
@@ -3048,11 +3038,7 @@
3048
3038
  >
3049
3039
  <es-label
3050
3040
  slot="label"
3051
- v-if="
3052
- item.showLabel !== false &&
3053
- item.type !== 'table' &&
3054
- showLabel
3055
- "
3041
+ v-if="item.showLabel !== false && item.label && showLabel"
3056
3042
  :contents="item.label"
3057
3043
  v-bind="
3058
3044
  item.label
@@ -5047,7 +5033,7 @@ export default {
5047
5033
  }
5048
5034
  let obj = JSON.parse(JSON.stringify(models));
5049
5035
  if (this.within) {
5050
- //within:把提交数据装到指定属性中
5036
+ //within:把提交数据装到指定属性中(分表)
5051
5037
  let newData = {};
5052
5038
  if (typeof this.within === 'string') {
5053
5039
  newData[this.within] = obj;
@@ -110,7 +110,7 @@
110
110
  :rowspan="item.labelRow"
111
111
  >
112
112
  <es-label
113
- v-if="item.type !== 'table'"
113
+ v-if="item.showLabel !== false && item.label"
114
114
  :contents="item.label"
115
115
  v-bind="
116
116
  item.label
@@ -621,13 +621,10 @@ export default {
621
621
  };
622
622
  },
623
623
  created() {
624
+ this.homePage =
625
+ typeof this.loadHomePage === 'string' ? this.loadHomePage : '';
624
626
  this.isHeader = util.getParams('header');
625
627
  this.getConfig();
626
- if (this.remote) {
627
- this.getMenu();
628
- } else {
629
- this.renderMenu();
630
- }
631
628
  if (this.socket) {
632
629
  this.initWebSocket();
633
630
  }
@@ -848,12 +845,11 @@ export default {
848
845
  if (i === 'initApplication' && results[i]) {
849
846
  this.results[i] = results[i].split(',');
850
847
  }
851
- if (this.loadHomePage) {
852
- if (typeof this.loadHomePage === 'string') {
853
- this.homePage = this.loadHomePage;
854
- } else if (i === 'indexUrl') {
855
- this.homePage = results[i];
856
- }
848
+ if (i === 'indexUrl' && this.loadHomePage) {
849
+ this.homePage =
850
+ typeof this.loadHomePage === 'string'
851
+ ? this.loadHomePage
852
+ : results[i];
857
853
  if (this.isHomePage && this.homePage) {
858
854
  if (this.menus && this.menus.length) {
859
855
  let ids = null;
@@ -866,7 +862,6 @@ export default {
866
862
  this.setMenu(this.menus);
867
863
  }
868
864
  }
869
- //this.isHomePage && this.handleJump(this.homePage);
870
865
  }
871
866
  if (i === 'doorIndex' && results[i]) {
872
867
  window.open(results[i]);
@@ -902,6 +897,11 @@ export default {
902
897
  if (util.getStorage('mainConfig')) {
903
898
  const results = JSON.parse(util.getStorage('mainConfig'));
904
899
  this.setConfig(results);
900
+ if (this.remote) {
901
+ this.getMenu();
902
+ } else {
903
+ this.renderMenu();
904
+ }
905
905
  return true;
906
906
  }
907
907
  util
@@ -909,6 +909,11 @@ export default {
909
909
  .then((res) => {
910
910
  if (res && res.rCode === 0) {
911
911
  this.setConfig(res.results, 1);
912
+ if (this.remote) {
913
+ this.getMenu();
914
+ } else {
915
+ this.renderMenu();
916
+ }
912
917
  } else {
913
918
  let msg = res.msg || '系统错误,请联系管理员!';
914
919
  this.$message.error(msg);
@@ -156,7 +156,7 @@ export default {
156
156
  }
157
157
  this.menu.forEach((item) => {
158
158
  if (item.id === this.active) {
159
- this.subMenu = item.children;
159
+ this.subMenu = item.children || [];
160
160
  this.headline = this.title ? this.title : item.text;
161
161
  return;
162
162
  }
@@ -180,7 +180,7 @@ export default {
180
180
  }
181
181
  val.forEach((item) => {
182
182
  if (item.id === this.active) {
183
- this.subMenu = item.children;
183
+ this.subMenu = item.children || [];
184
184
  this.headline = this.title ? this.title : item.text;
185
185
  return;
186
186
  }