eoss-ui 0.5.30 → 0.5.32

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.
Files changed (57) hide show
  1. package/lib/button-group.js +12 -0
  2. package/lib/button.js +12 -0
  3. package/lib/cascader.js +18 -15
  4. package/lib/checkbox-group.js +31 -8
  5. package/lib/data-table-form.js +12 -0
  6. package/lib/data-table.js +27 -24
  7. package/lib/date-picker.js +12 -0
  8. package/lib/dialog.js +12 -0
  9. package/lib/eoss-ui.common.js +1795 -1809
  10. package/lib/flow-group.js +14 -2
  11. package/lib/flow-list.js +12 -0
  12. package/lib/flow.js +12 -0
  13. package/lib/form.js +42 -11
  14. package/lib/handle-user.js +12 -0
  15. package/lib/handler.js +12 -0
  16. package/lib/index.js +1 -1
  17. package/lib/input-number.js +12 -0
  18. package/lib/input.js +28 -7
  19. package/lib/login.js +37 -123
  20. package/lib/main.js +12 -0
  21. package/lib/nav.js +12 -0
  22. package/lib/page.js +12 -0
  23. package/lib/player.js +12 -0
  24. package/lib/qr-code.js +12 -0
  25. package/lib/radio-group.js +15 -3
  26. package/lib/retrial-auth.js +12 -0
  27. package/lib/select-ganged.js +12 -0
  28. package/lib/select.js +12 -0
  29. package/lib/selector-panel.js +12 -0
  30. package/lib/selector.js +15 -3
  31. package/lib/sizer.js +12 -0
  32. package/lib/steps.js +12 -0
  33. package/lib/switch.js +12 -0
  34. package/lib/table-form.js +12 -0
  35. package/lib/tabs.js +1619 -1568
  36. package/lib/tips.js +12 -0
  37. package/lib/tree-group.js +12 -0
  38. package/lib/tree.js +12 -0
  39. package/lib/upload.js +12 -0
  40. package/lib/utils/util.js +12 -0
  41. package/lib/wujie.js +12 -0
  42. package/lib/wxlogin.js +12 -0
  43. package/package.json +2 -2
  44. package/packages/cascader/src/main.vue +24 -19
  45. package/packages/checkbox-group/src/main.vue +14 -9
  46. package/packages/data-table/src/column.vue +10 -14
  47. package/packages/flow-group/src/main.vue +1 -1
  48. package/packages/form/src/main.vue +8 -1
  49. package/packages/input/src/main.vue +20 -16
  50. package/packages/login/src/main.vue +8 -3
  51. package/packages/login/src/resetPassword.vue +11 -114
  52. package/packages/radio-group/src/main.vue +1 -1
  53. package/packages/selector/src/main.vue +1 -1
  54. package/packages/tabs/src/main.vue +563 -542
  55. package/src/index.js +1 -1
  56. package/src/utils/util.js +12 -0
  57. package/CHANGELOG.md +0 -929
package/lib/tips.js CHANGED
@@ -1915,6 +1915,17 @@ var indexOfObj = function indexOfObj(arry, target, key) {
1915
1915
  return -1;
1916
1916
  };
1917
1917
 
1918
+ /**
1919
+ * isExist
1920
+ * @desc:判断是否存在
1921
+ * @author huangbo
1922
+ * @date 2022年5月7日
1923
+ * @param {Object} [obj] -
1924
+ **/
1925
+ var isExist = function isExist(obj) {
1926
+ return obj !== undefined && obj !== null && obj === '';
1927
+ };
1928
+
1918
1929
  /**
1919
1930
  * isFunction
1920
1931
  * @desc:判断是否是函数
@@ -2939,6 +2950,7 @@ var watermark = function watermark(option) {
2939
2950
  hsvTorgb: hsvTorgb,
2940
2951
  identical: identical,
2941
2952
  indexOfObj: indexOfObj,
2953
+ isExist: isExist,
2942
2954
  isFunction: isFunction,
2943
2955
  isLogged: isLogged,
2944
2956
  isLogined: isLogined,
package/lib/tree-group.js CHANGED
@@ -1915,6 +1915,17 @@ var indexOfObj = function indexOfObj(arry, target, key) {
1915
1915
  return -1;
1916
1916
  };
1917
1917
 
1918
+ /**
1919
+ * isExist
1920
+ * @desc:判断是否存在
1921
+ * @author huangbo
1922
+ * @date 2022年5月7日
1923
+ * @param {Object} [obj] -
1924
+ **/
1925
+ var isExist = function isExist(obj) {
1926
+ return obj !== undefined && obj !== null && obj === '';
1927
+ };
1928
+
1918
1929
  /**
1919
1930
  * isFunction
1920
1931
  * @desc:判断是否是函数
@@ -2939,6 +2950,7 @@ var watermark = function watermark(option) {
2939
2950
  hsvTorgb: hsvTorgb,
2940
2951
  identical: identical,
2941
2952
  indexOfObj: indexOfObj,
2953
+ isExist: isExist,
2942
2954
  isFunction: isFunction,
2943
2955
  isLogged: isLogged,
2944
2956
  isLogined: isLogined,
package/lib/tree.js CHANGED
@@ -1915,6 +1915,17 @@ var indexOfObj = function indexOfObj(arry, target, key) {
1915
1915
  return -1;
1916
1916
  };
1917
1917
 
1918
+ /**
1919
+ * isExist
1920
+ * @desc:判断是否存在
1921
+ * @author huangbo
1922
+ * @date 2022年5月7日
1923
+ * @param {Object} [obj] -
1924
+ **/
1925
+ var isExist = function isExist(obj) {
1926
+ return obj !== undefined && obj !== null && obj === '';
1927
+ };
1928
+
1918
1929
  /**
1919
1930
  * isFunction
1920
1931
  * @desc:判断是否是函数
@@ -2939,6 +2950,7 @@ var watermark = function watermark(option) {
2939
2950
  hsvTorgb: hsvTorgb,
2940
2951
  identical: identical,
2941
2952
  indexOfObj: indexOfObj,
2953
+ isExist: isExist,
2942
2954
  isFunction: isFunction,
2943
2955
  isLogged: isLogged,
2944
2956
  isLogined: isLogined,
package/lib/upload.js CHANGED
@@ -1914,6 +1914,17 @@ var indexOfObj = function indexOfObj(arry, target, key) {
1914
1914
  return -1;
1915
1915
  };
1916
1916
 
1917
+ /**
1918
+ * isExist
1919
+ * @desc:判断是否存在
1920
+ * @author huangbo
1921
+ * @date 2022年5月7日
1922
+ * @param {Object} [obj] -
1923
+ **/
1924
+ var isExist = function isExist(obj) {
1925
+ return obj !== undefined && obj !== null && obj === '';
1926
+ };
1927
+
1917
1928
  /**
1918
1929
  * isFunction
1919
1930
  * @desc:判断是否是函数
@@ -2938,6 +2949,7 @@ var watermark = function watermark(option) {
2938
2949
  hsvTorgb: hsvTorgb,
2939
2950
  identical: identical,
2940
2951
  indexOfObj: indexOfObj,
2952
+ isExist: isExist,
2941
2953
  isFunction: isFunction,
2942
2954
  isLogged: isLogged,
2943
2955
  isLogined: isLogined,
package/lib/utils/util.js CHANGED
@@ -1832,6 +1832,17 @@ var indexOfObj = function indexOfObj(arry, target, key) {
1832
1832
  return -1;
1833
1833
  };
1834
1834
 
1835
+ /**
1836
+ * isExist
1837
+ * @desc:判断是否存在
1838
+ * @author huangbo
1839
+ * @date 2022年5月7日
1840
+ * @param {Object} [obj] -
1841
+ **/
1842
+ var isExist = function isExist(obj) {
1843
+ return obj !== undefined && obj !== null && obj === '';
1844
+ };
1845
+
1835
1846
  /**
1836
1847
  * isFunction
1837
1848
  * @desc:判断是否是函数
@@ -2856,6 +2867,7 @@ exports.default = {
2856
2867
  hsvTorgb: hsvTorgb,
2857
2868
  identical: identical,
2858
2869
  indexOfObj: indexOfObj,
2870
+ isExist: isExist,
2859
2871
  isFunction: isFunction,
2860
2872
  isLogged: isLogged,
2861
2873
  isLogined: isLogined,
package/lib/wujie.js CHANGED
@@ -1915,6 +1915,17 @@ var indexOfObj = function indexOfObj(arry, target, key) {
1915
1915
  return -1;
1916
1916
  };
1917
1917
 
1918
+ /**
1919
+ * isExist
1920
+ * @desc:判断是否存在
1921
+ * @author huangbo
1922
+ * @date 2022年5月7日
1923
+ * @param {Object} [obj] -
1924
+ **/
1925
+ var isExist = function isExist(obj) {
1926
+ return obj !== undefined && obj !== null && obj === '';
1927
+ };
1928
+
1918
1929
  /**
1919
1930
  * isFunction
1920
1931
  * @desc:判断是否是函数
@@ -2939,6 +2950,7 @@ var watermark = function watermark(option) {
2939
2950
  hsvTorgb: hsvTorgb,
2940
2951
  identical: identical,
2941
2952
  indexOfObj: indexOfObj,
2953
+ isExist: isExist,
2942
2954
  isFunction: isFunction,
2943
2955
  isLogged: isLogged,
2944
2956
  isLogined: isLogined,
package/lib/wxlogin.js CHANGED
@@ -1915,6 +1915,17 @@ var indexOfObj = function indexOfObj(arry, target, key) {
1915
1915
  return -1;
1916
1916
  };
1917
1917
 
1918
+ /**
1919
+ * isExist
1920
+ * @desc:判断是否存在
1921
+ * @author huangbo
1922
+ * @date 2022年5月7日
1923
+ * @param {Object} [obj] -
1924
+ **/
1925
+ var isExist = function isExist(obj) {
1926
+ return obj !== undefined && obj !== null && obj === '';
1927
+ };
1928
+
1918
1929
  /**
1919
1930
  * isFunction
1920
1931
  * @desc:判断是否是函数
@@ -2939,6 +2950,7 @@ var watermark = function watermark(option) {
2939
2950
  hsvTorgb: hsvTorgb,
2940
2951
  identical: identical,
2941
2952
  indexOfObj: indexOfObj,
2953
+ isExist: isExist,
2942
2954
  isFunction: isFunction,
2943
2955
  isLogged: isLogged,
2944
2956
  isLogined: isLogined,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eoss-ui",
3
- "version": "0.5.30",
3
+ "version": "0.5.32",
4
4
  "description": "eoss内部业务组件",
5
5
  "main": "lib/eoss-ui.common.js",
6
6
  "files": [
@@ -96,7 +96,7 @@
96
96
  "cp-cli": "^1.0.2",
97
97
  "cross-env": "^3.1.3",
98
98
  "css-loader": "^2.1.0",
99
- "eoss-element": "^0.2.81",
99
+ "eoss-element": "^0.2.82",
100
100
  "es6-promise": "^4.0.5",
101
101
  "eslint": "4.18.2",
102
102
  "eslint-config-elemefe": "0.1.1",
@@ -3,7 +3,7 @@ export default {
3
3
  name: 'EsCascader',
4
4
  inheritAttrs: false,
5
5
  props: {
6
- value: [String, Object, Array],
6
+ value: [String, Array],
7
7
  data: Array,
8
8
  options: Array,
9
9
  hide: {
@@ -96,27 +96,32 @@ export default {
96
96
  render(h) {
97
97
  if (!this.hide) {
98
98
  if (this.readonly) {
99
- const value = this.model
100
- .map(item => {
101
- if (Array.isArray(item)) {
102
- return item
103
- .map(ele => {
104
- if (typeof ele === 'string') {
105
- return ele;
99
+ let value = '';
100
+ if (this.model) {
101
+ value = Array.isArray(this.model)
102
+ ? this.model
103
+ .map((item) => {
104
+ if (Array.isArray(item)) {
105
+ return item
106
+ .map((ele) => {
107
+ if (typeof ele === 'string') {
108
+ return ele;
109
+ } else {
110
+ return ele[this.newProps.label];
111
+ }
112
+ })
113
+ .join(this.separator);
106
114
  } else {
107
- return ele[this.newProps.label];
115
+ if (typeof item === 'string') {
116
+ return item;
117
+ } else {
118
+ return item[this.newProps.label];
119
+ }
108
120
  }
109
121
  })
110
- .join(this.separator);
111
- } else {
112
- if (typeof item === 'string') {
113
- return item;
114
- } else {
115
- return item[this.newProps.label];
116
- }
117
- }
118
- })
119
- .join(this.multiple ? ',' : this.separator);
122
+ .join(this.multiple ? ',' : this.separator)
123
+ : this.model;
124
+ }
120
125
  return h(
121
126
  'div',
122
127
  {
@@ -11,7 +11,7 @@
11
11
  v-else
12
12
  v-show="display"
13
13
  v-model="model"
14
- v-bind="$attrs"
14
+ v-bind="{ valueKey: valKey, labelKey: label, ...$attrs }"
15
15
  v-on="$listeners"
16
16
  >
17
17
  <template v-if="genre === 'button'">
@@ -97,6 +97,10 @@ export default {
97
97
  type: String,
98
98
  default: ''
99
99
  },
100
+ separator: {
101
+ type: String,
102
+ default: '、'
103
+ },
100
104
  display: {
101
105
  type: Boolean,
102
106
  default: true
@@ -158,6 +162,7 @@ export default {
158
162
  return this.value === undefined ? [] : this.value;
159
163
  },
160
164
  set(val) {
165
+ console.log(val);
161
166
  return val;
162
167
  }
163
168
  },
@@ -186,17 +191,17 @@ export default {
186
191
  return item[this.label];
187
192
  }
188
193
  if (util.isObject(this.results[0])) {
189
- return this.results
190
- .map((ele) => {
191
- if (ele[this.valueKey] === item) {
192
- return ele[this.label];
193
- }
194
- })
195
- .join(' ');
194
+ let vals = [];
195
+ this.results.forEach((ele) => {
196
+ if (ele[this.valKey] === item) {
197
+ vals.push(ele[this.label]);
198
+ }
199
+ });
200
+ return vals.join(this.separator);
196
201
  }
197
202
  return item;
198
203
  });
199
- return label.join(' ');
204
+ return label.join(this.separator);
200
205
  }
201
206
  },
202
207
  watch: {
@@ -5,7 +5,6 @@
5
5
  <template v-if="isForm && !isReadOnly(scope)">
6
6
  <el-form-item
7
7
  v-if="!(type === 'handle' && !scope.row.hideHandle)"
8
- label-width="0"
9
8
  :name="name"
10
9
  :prop="field || prop"
11
10
  :rules="isNotRule(scope) ? [] : rules"
@@ -86,12 +85,7 @@
86
85
  </es-cascader>
87
86
  <es-select-ganged
88
87
  v-else-if="type === 'ganged'"
89
- v-bind="
90
- exclAttribute({
91
- data: config,
92
- attrs: ['width', 'url', 'sysCode']
93
- })
94
- "
88
+ v-bind="formOption"
95
89
  v-model="scope.row[field || prop]"
96
90
  :data="init(option, config)"
97
91
  @change="
@@ -730,16 +724,17 @@ export default {
730
724
  } else if (Array.isArray(rows[field])) {
731
725
  const vals = rows[field].map((item) => {
732
726
  if (util.isObject(item)) {
733
- str =
727
+ return (
734
728
  item[this.labelKey] ||
735
729
  item['name'] ||
736
730
  item['label'] ||
737
- item['shortName'];
731
+ item['shortName']
732
+ );
738
733
  } else {
739
734
  if (data && data.length && util.isObject(data[0])) {
740
- str = this.getLabel(data, item);
735
+ return this.getLabel(data, item);
741
736
  }
742
- str = item;
737
+ return item;
743
738
  }
744
739
  });
745
740
  str = vals.join(this.symbol ? this.symbol : '-');
@@ -747,16 +742,17 @@ export default {
747
742
  if (this.valueToString) {
748
743
  const vals = rows[field].split(',').map((item) => {
749
744
  if (data && data.length && util.isObject(data[0])) {
750
- str = this.getLabel(data, item);
745
+ return this.getLabel(data, item);
751
746
  }
752
- str = item;
747
+ return item;
753
748
  });
754
749
  str = vals.join(this.symbol ? this.symbol : '-');
755
750
  } else {
756
751
  if (data && data.length && util.isObject(data[0])) {
757
752
  str = this.getLabel(data, rows[field]);
753
+ } else {
754
+ str = rows[field];
758
755
  }
759
- str = rows[field];
760
756
  }
761
757
  }
762
758
  if (str && flag) {
@@ -604,7 +604,7 @@ export default {
604
604
  handleSuccess() {
605
605
  if (this.closeDialog && this.esDialog) {
606
606
  this.esDialog.handleClose();
607
- }else if (util.win.top.opener) {
607
+ } else if (util.win.top.opener) {
608
608
  util.win.top.close();
609
609
  }
610
610
  if (this.events && this.events.success) {
@@ -4039,7 +4039,8 @@ export default {
4039
4039
  default: 3
4040
4040
  },
4041
4041
  zoom: false,
4042
- showMsg: true
4042
+ showMsg: true,
4043
+ validated: Function
4043
4044
  },
4044
4045
  data() {
4045
4046
  return {
@@ -4871,6 +4872,9 @@ export default {
4871
4872
  handle,
4872
4873
  type
4873
4874
  );
4875
+ if (this.validated && !this.validated(models, validate)) {
4876
+ return reject(err);
4877
+ }
4874
4878
  let param = this.param;
4875
4879
  if (handle.param) {
4876
4880
  param = util.extend({}, this.param, handle.param);
@@ -4949,6 +4953,9 @@ export default {
4949
4953
  handle,
4950
4954
  type
4951
4955
  );
4956
+ if (this.validated && !this.validated(models, validate)) {
4957
+ return reject(err);
4958
+ }
4952
4959
  let param = this.param;
4953
4960
  if (handle.param) {
4954
4961
  param = util.extend({}, this.param, handle.param);
@@ -235,23 +235,27 @@ export default {
235
235
  let cls = [];
236
236
  let doms = [];
237
237
  if (this.readonly) {
238
- let content = this.text;
239
- if (this.model) {
240
- content = this.model.replace(RegExp('\\n', 'g'), '<br/>');
241
- content = content.replace(RegExp(' ', 'g'), '&nbsp;');
238
+ let content = this.model ? this.model : this.text;
239
+ if (this.$attrs.type === 'textarea') {
240
+ if (this.model) {
241
+ content = this.model.replace(RegExp('\\n', 'g'), '<br/>');
242
+ content = content.replace(RegExp(' ', 'g'), '&nbsp;');
243
+ }
244
+ return h('div', {
245
+ class: ['es-textarea__inner ', { 'es-plain': this.plain }],
246
+ domProps: {
247
+ innerHTML: content
248
+ }
249
+ });
250
+ } else {
251
+ return h(
252
+ 'div',
253
+ {
254
+ class: ['es-input__inner', { 'es-plain': this.plain }]
255
+ },
256
+ [content]
257
+ );
242
258
  }
243
- return h(
244
- 'div',
245
- {
246
- class: [
247
- this.$attrs.type === 'textarea'
248
- ? 'es-textarea__inner '
249
- : 'es-input__inner',
250
- { 'es-plain': this.plain }
251
- ]
252
- },
253
- [content]
254
- );
255
259
  }
256
260
  if (this.$slots.prefix) {
257
261
  doms.push(h('template', { slot: 'prefix' }, this.$slots.prefix));
@@ -732,7 +732,7 @@ export default {
732
732
  ipad: '',
733
733
  interval: null,
734
734
  showResetPassword: false,
735
- operationCheckCode:'',
735
+ operationCheckCode: '',
736
736
  showDownLoadApp: false,
737
737
  wechatAppid: null,
738
738
  wechatScope: null,
@@ -1041,7 +1041,8 @@ export default {
1041
1041
  : '') +
1042
1042
  '&heightflag=' +
1043
1043
  Math.random().toString().split('.')[1];
1044
-
1044
+ delete this.formData.identifyingCode;
1045
+ delete this.formData.verificationCode;
1045
1046
  return this.imageCode;
1046
1047
  },
1047
1048
  getCode() {
@@ -1219,6 +1220,10 @@ export default {
1219
1220
  type: 'error',
1220
1221
  duration: 1500,
1221
1222
  onClose: () => {
1223
+ this.btnText = '获取验证码';
1224
+ this.disabled = false;
1225
+ this.countdown = 0;
1226
+ clearInterval(this.timer);
1222
1227
  this.getImgCode();
1223
1228
  }
1224
1229
  });
@@ -1355,7 +1360,7 @@ export default {
1355
1360
  }
1356
1361
  )
1357
1362
  .then(() => {
1358
- this.operationCheckCode = results.checkCode
1363
+ this.operationCheckCode = results.checkCode;
1359
1364
  if (typeof this.forget === 'string') {
1360
1365
  util.win.open(this.forgetUrl);
1361
1366
  } else {
@@ -16,7 +16,9 @@
16
16
  >
17
17
  <el-menu-item index="6">短信验证</el-menu-item>
18
18
  <el-menu-item index="11">邮箱验证</el-menu-item>
19
- <el-menu-item index="0" v-if="this.operationCheckCode">原密码验证</el-menu-item>
19
+ <el-menu-item index="0" v-if="this.operationCheckCode"
20
+ >原密码验证</el-menu-item
21
+ >
20
22
  </el-menu>
21
23
  <es-form
22
24
  ref="pwdForm"
@@ -338,119 +340,6 @@ export default {
338
340
  }
339
341
  ];
340
342
  }
341
- // return [
342
- // this.activeIndex == '6'
343
- // ? {
344
- // type: 'text',
345
- // name: 'target',
346
- // label: '手机号',
347
- // placeholder: '请输入手机号',
348
- // rules: [
349
- // {
350
- // required: true,
351
- // message: '请输入手机号',
352
- // trigger: 'blur'
353
- // },
354
- // {
355
- // ...rules.phone,
356
- // trigger: 'blur'
357
- // }
358
- // ]
359
- // }
360
- // : {
361
- // type: 'text',
362
- // name: 'target',
363
- // label: '邮箱地址',
364
- // placeholder: '请输入邮箱地址',
365
- // rules: [
366
- // {
367
- // required: true,
368
- // message: '请输入邮箱地址',
369
- // trigger: 'blur'
370
- // },
371
- // {
372
- // type: 'email',
373
- // message: '请输入正确的邮箱地址',
374
- // trigger: 'blur'
375
- // }
376
- // ]
377
- // },
378
- // {
379
- // type: 'password',
380
- // name: 'password',
381
- // label: '新密码',
382
- // placeholder: '请输入新密码',
383
- // showPassword: true,
384
- // rules: [
385
- // this.checkPassword
386
- // ? {
387
- // pattern: this.checkPassword,
388
- // message: this.checkPasswordMsg
389
- // ? this.checkPasswordMsg
390
- // : '密码格式不合法',
391
- // trigger: 'blur'
392
- // }
393
- // : {},
394
- // {
395
- // required: true,
396
- // message: '请输入新密码',
397
- // trigger: 'blur'
398
- // }
399
- // ]
400
- // },
401
- // {
402
- // type: 'password',
403
- // name: 'repassword',
404
- // placeholder: '请确认新密码',
405
- // label: '确认新密码',
406
- // showPassword: true,
407
- // rules: [
408
- // this.checkPassword
409
- // ? {
410
- // pattern: this.checkPassword,
411
- // message: this.checkPasswordMsg
412
- // ? this.checkPasswordMsg
413
- // : '密码格式不合法',
414
- // trigger: 'blur'
415
- // }
416
- // : {},
417
- // {
418
- // required: true,
419
- // message: '请输入新密码',
420
- // trigger: 'blur'
421
- // },
422
- // { validator: this.reregExpValidate, trigger: 'blur' }
423
- // ]
424
- // },
425
- // {
426
- // type: 'text',
427
- // name: 'verificationCode',
428
- // placeholder: '请输入验证码',
429
- // label: '验证码',
430
- // append: {
431
- // text: this.btnText,
432
- // attrs: { disabled: this.disabled },
433
- // event: this.getVerificationCode
434
- // },
435
- // rules: [
436
- // {
437
- // required: true,
438
- // message: '请输入验证码',
439
- // trigger: 'blur'
440
- // }
441
- // ]
442
- // },
443
- // {
444
- // type: 'submit',
445
- // contents: [
446
- // {
447
- // type: 'primary',
448
- // text: '提交',
449
- // event: 'confirm'
450
- // }
451
- // ]
452
- // }
453
- // ];
454
343
  },
455
344
  show() {
456
345
  if (this.type) {
@@ -608,6 +497,10 @@ export default {
608
497
  } else {
609
498
  let msg = res.msg || '系统错误,请联系管理员!';
610
499
  this.$message.error(msg);
500
+ this.btnText = '获取验证码';
501
+ this.disabled = false;
502
+ delete this.formData.verificationCode;
503
+ clearInterval(this.timer);
611
504
  }
612
505
  })
613
506
  .catch((err) => {
@@ -634,6 +527,10 @@ export default {
634
527
  this.$emit('success');
635
528
  } else {
636
529
  let msg = res.msg || '系统错误,请联系管理员!';
530
+ this.btnText = '获取验证码';
531
+ this.disabled = false;
532
+ clearInterval(this.timer);
533
+ delete this.formData.verificationCode;
637
534
  this.$message.error(msg);
638
535
  }
639
536
  })
@@ -173,7 +173,7 @@ export default {
173
173
  return this.options ? this.options : this.data;
174
174
  },
175
175
  labelVal() {
176
- if (this.readonly && this.model !== undefined && this.results.length) {
176
+ if (this.readonly && util.isExist(this.model) && this.results.length) {
177
177
  if (typeof this.model !== 'object') {
178
178
  if (util.isObject(this.results[0])) {
179
179
  let val;
@@ -402,7 +402,7 @@ export default {
402
402
  immediate: true,
403
403
  deep: true,
404
404
  handler(val) {
405
- if (val !== '' && val !== undefined) {
405
+ if (util.isExist(val)) {
406
406
  if (util.isObject(val)) {
407
407
  this.selected = [val];
408
408
  } else {