eoss-ui 0.5.64 → 0.5.66

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 (52) hide show
  1. package/CHANGELOG.md +929 -0
  2. package/lib/button-group.js +209 -44
  3. package/lib/button.js +65 -37
  4. package/lib/calendar.js +18 -6
  5. package/lib/data-table.js +116 -31
  6. package/lib/eoss-ui.common.js +1143 -719
  7. package/lib/form.js +22 -7
  8. package/lib/index.js +1 -1
  9. package/lib/login.js +11 -2
  10. package/lib/main.js +183 -121
  11. package/lib/selector.js +469 -429
  12. package/lib/theme-chalk/base.css +1 -1
  13. package/lib/theme-chalk/button-group.css +1 -1
  14. package/lib/theme-chalk/button.css +1 -1
  15. package/lib/theme-chalk/calendar.css +1 -1
  16. package/lib/theme-chalk/index.css +1 -1
  17. package/lib/theme-chalk/main.css +1 -1
  18. package/lib/theme-chalk/menu.css +1 -1
  19. package/lib/theme-chalk/sizer.css +1 -1
  20. package/lib/theme-chalk/tree.css +1 -1
  21. package/lib/theme-chalk/upload.css +1 -1
  22. package/lib/toolbar.js +6 -0
  23. package/lib/upload.js +9 -7
  24. package/package.json +2 -2
  25. package/packages/button/src/main.vue +96 -56
  26. package/packages/button-group/src/main.vue +72 -8
  27. package/packages/calendar/src/main.vue +16 -5
  28. package/packages/data-table/src/children.vue +3 -1
  29. package/packages/data-table/src/column.vue +1 -1
  30. package/packages/data-table/src/main.vue +55 -10
  31. package/packages/form/src/main.vue +19 -5
  32. package/packages/login/src/main.vue +8 -0
  33. package/packages/main/src/main.vue +141 -96
  34. package/packages/selector/src/main.vue +31 -5
  35. package/packages/theme-chalk/lib/base.css +1 -1
  36. package/packages/theme-chalk/lib/button-group.css +1 -1
  37. package/packages/theme-chalk/lib/button.css +1 -1
  38. package/packages/theme-chalk/lib/calendar.css +1 -1
  39. package/packages/theme-chalk/lib/index.css +1 -1
  40. package/packages/theme-chalk/lib/main.css +1 -1
  41. package/packages/theme-chalk/lib/menu.css +1 -1
  42. package/packages/theme-chalk/lib/sizer.css +1 -1
  43. package/packages/theme-chalk/lib/tree.css +1 -1
  44. package/packages/theme-chalk/lib/upload.css +1 -1
  45. package/packages/theme-chalk/src/base.scss +3 -0
  46. package/packages/theme-chalk/src/button-group.scss +149 -0
  47. package/packages/theme-chalk/src/button.scss +6 -0
  48. package/packages/theme-chalk/src/calendar.scss +3 -0
  49. package/packages/theme-chalk/src/tree.scss +1 -0
  50. package/packages/toolbar/src/main.vue +6 -0
  51. package/packages/upload/src/main.vue +4 -2
  52. package/src/index.js +1 -1
@@ -4178,7 +4178,8 @@ export default {
4178
4178
  default() {
4179
4179
  return {};
4180
4180
  }
4181
- }
4181
+ },
4182
+ active: Array
4182
4183
  },
4183
4184
  data() {
4184
4185
  return {
@@ -4393,7 +4394,7 @@ export default {
4393
4394
  if (index === 0) {
4394
4395
  names = item.name || String(index);
4395
4396
  }
4396
- } else {
4397
+ } else if (item.active !== false) {
4397
4398
  names.push(item.name || String(index));
4398
4399
  }
4399
4400
  } else {
@@ -4402,7 +4403,9 @@ export default {
4402
4403
  contents.push(item);
4403
4404
  }
4404
4405
  });
4405
- this.activeNames = names;
4406
+ if (!this.active || (this.active && !this.active.length)) {
4407
+ this.activeNames = names;
4408
+ }
4406
4409
  this.content = contents;
4407
4410
  if (this.content.length === 1) {
4408
4411
  if (
@@ -4492,6 +4495,15 @@ export default {
4492
4495
  },
4493
4496
  readonly() {
4494
4497
  !this.height && this.getHeight();
4498
+ },
4499
+ active: {
4500
+ immediate: true,
4501
+ deep: true,
4502
+ handler(val) {
4503
+ if (val && val.length) {
4504
+ this.activeNames = val;
4505
+ }
4506
+ }
4495
4507
  }
4496
4508
  },
4497
4509
  created() {
@@ -4605,7 +4617,7 @@ export default {
4605
4617
  if (index === 0) {
4606
4618
  names = item.name || String(index);
4607
4619
  }
4608
- } else {
4620
+ } else if (item.active !== false) {
4609
4621
  names.push(item.name || String(index));
4610
4622
  }
4611
4623
  } else {
@@ -4614,7 +4626,9 @@ export default {
4614
4626
  contents.push(util.extend({}, item));
4615
4627
  }
4616
4628
  });
4617
- this.activeNames = names;
4629
+ if (!this.active || (this.active && !this.active.length)) {
4630
+ this.activeNames = names;
4631
+ }
4618
4632
  this.content = contents;
4619
4633
  if (
4620
4634
  this.content.length === 1 &&
@@ -695,6 +695,11 @@ export default {
695
695
  this.loginInfo(val == 3);
696
696
  }
697
697
  },
698
+ identifyingId(val) {
699
+ if (val) {
700
+ this.loginInfo(this.active == 3);
701
+ }
702
+ },
698
703
  appName: {
699
704
  immediate: true,
700
705
  handler(val) {
@@ -1345,6 +1350,9 @@ export default {
1345
1350
  }
1346
1351
  },
1347
1352
  initRequestLoginInfo() {
1353
+ if (this.identifyingId == '') {
1354
+ return false;
1355
+ }
1348
1356
  util
1349
1357
  .ajax({
1350
1358
  method: 'post',
@@ -671,8 +671,9 @@ export default {
671
671
  },
672
672
  created() {
673
673
  let params = util.getParams() || {};
674
- this.homePage =
675
- typeof this.loadHomePage === 'string' ? this.loadHomePage : '';
674
+ if (typeof this.loadHomePage === 'string') {
675
+ this.homePage = this.loadHomePage;
676
+ }
676
677
  this.isHeader = params.header;
677
678
  let sysLogoIco = sessionStorage.getItem('sysLogoIco');
678
679
  sysLogoIco && util.setFavicon(sysLogoIco);
@@ -791,11 +792,7 @@ export default {
791
792
  this.setTitle(ids[0]);
792
793
  }
793
794
  } else if (sessionStorage.getItem('jump') && this.isHistory) {
794
- let ids = this.getId(
795
- this.menus,
796
- sessionStorage.getItem('jump'),
797
- true
798
- );
795
+ let ids = this.getId(this.menus, sessionStorage.getItem('jump'));
799
796
  if (ids) {
800
797
  this.defaultActive = ids;
801
798
  this.navIds = ids;
@@ -807,18 +804,14 @@ export default {
807
804
  hash = hash.split('?')[0];
808
805
  }
809
806
  if (hash !== '#/' && hash !== '#/main') {
810
- let ids = this.getId(this.menus, util.win.location.hash, true);
807
+ let ids = this.getId(this.menus, util.win.location.hash);
811
808
  if (ids) {
812
809
  this.defaultActive = ids;
813
810
  this.navIds = ids;
814
811
  this.setTitle(ids[0]);
815
812
  }
816
813
  } else if (sessionStorage.getItem('jump') && this.isHistory) {
817
- let ids = this.getId(
818
- this.menus,
819
- sessionStorage.getItem('jump'),
820
- true
821
- );
814
+ let ids = this.getId(this.menus, sessionStorage.getItem('jump'));
822
815
  if (ids) {
823
816
  this.defaultActive = ids;
824
817
  this.navIds = ids;
@@ -907,10 +900,10 @@ export default {
907
900
  }
908
901
  let jump = sessionStorage.getItem('jump');
909
902
  if (
910
- !applicationid &&
911
- (!jump || !this.isHistory) &&
912
- hash === '#/' &&
913
- hash === '#/main'
903
+ (!applicationid &&
904
+ (!jump || !this.isHistory) &&
905
+ (hash === '#/' || hash === '#/main')) ||
906
+ jump == results[i]
914
907
  ) {
915
908
  this.homePage =
916
909
  typeof this.loadHomePage === 'string'
@@ -1032,17 +1025,71 @@ export default {
1032
1025
  }
1033
1026
  });
1034
1027
  },
1035
- jumpMenu(res, flag, param) {
1036
- let option = { url: res, flag: flag, param: param };
1028
+ /**
1029
+ * @desc 跳转菜单
1030
+ * @param {Object/String} [res] - 菜单id(多个用,隔开)或url地址或系统菜单数据对象
1031
+ * @param {Boolean} [isUrl] - res是否是url地址
1032
+ * @param {Object} [param] - 拼接地址后的参数
1033
+ */
1034
+ jumpMenu(res, isUrl, path) {
1035
+ let option = { url: res, isUrl: isUrl, path: path };
1037
1036
  if (util.isObject(res)) {
1038
- option = { ...option, ...res };
1037
+ if (res.urlopenmode == 1) {
1038
+ util.win.open(res.url);
1039
+ return;
1040
+ } else if (res.urlopenmode == 2) {
1041
+ location.href = res.url;
1042
+ return;
1043
+ } else {
1044
+ option = { ...option, ...res };
1045
+ }
1039
1046
  }
1040
1047
  let ids;
1041
1048
  if (typeof option.url === 'string') {
1042
- if (option.flag) {
1043
- ids = this.getId(this.menus, option.url, true);
1049
+ if (
1050
+ option.isUrl ||
1051
+ option.url.indexOf('.html') > -1 ||
1052
+ option.url.indexOf('.dhtml') > -1 ||
1053
+ option.url.indexOf('/#/') > -1 ||
1054
+ option.url.indexOf('#/') > -1
1055
+ ) {
1056
+ option.isUrlc = true;
1057
+ ids = this.getId(this.menus, option.url);
1044
1058
  if (!ids) {
1045
- this.$message.error('未在菜单栏中找到此地址');
1059
+ if (
1060
+ option.url.indexOf('.html') === -1 &&
1061
+ option.url.indexOf('#/') === -1
1062
+ ) {
1063
+ this.method = 'iframe';
1064
+ this.refresh = false;
1065
+ this.page = option.url;
1066
+ } else {
1067
+ this.method = 'router';
1068
+ const routes = this.$router.options.routes;
1069
+ if (routes) {
1070
+ let path = this.hasRouter(routes, option.url);
1071
+ if (path) {
1072
+ let params = util.getParams({ url: option.url });
1073
+ this.$router.push({
1074
+ path: path,
1075
+ query: params
1076
+ });
1077
+ } else {
1078
+ if (this.loadWujie === false || (this.downgrade && isIE)) {
1079
+ this.method = 'iframe';
1080
+ this.refresh = false;
1081
+ this.page = option.url;
1082
+ } else {
1083
+ this.method = 'wujie';
1084
+ this.wjName = 'application' + Date.now();
1085
+ this.page = this.host + option.url;
1086
+ }
1087
+ }
1088
+ }
1089
+ }
1090
+ this.$nextTick(() => {
1091
+ this.refresh = true;
1092
+ });
1046
1093
  return;
1047
1094
  }
1048
1095
  } else {
@@ -1053,17 +1100,22 @@ export default {
1053
1100
  }
1054
1101
  this.setDefault(this.menus, ids, option.param);
1055
1102
  },
1056
- getId(arry, res, path) {
1057
- if (!res) {
1103
+ /**
1104
+ * @desc 获取菜单层级id
1105
+ * @param {Array} [menus] - 系统菜单数据对象
1106
+ * @param {String} [url] - 菜单id或url地址
1107
+ */
1108
+ getId(menus, url) {
1109
+ if (!url) {
1058
1110
  return false;
1059
1111
  }
1060
- for (let i = 0; i < arry.length; i++) {
1061
- let item = arry[i];
1112
+ for (let i = 0; i < menus.length; i++) {
1113
+ let item = menus[i];
1062
1114
  if (
1063
1115
  Object.prototype.hasOwnProperty.call(item, 'children') &&
1064
1116
  item.children.length
1065
1117
  ) {
1066
- let id = this.getId(item.children, res, path);
1118
+ let id = this.getId(item.children, url);
1067
1119
  if (id) {
1068
1120
  if (typeof id === 'string') {
1069
1121
  this.isTabs = false;
@@ -1079,7 +1131,7 @@ export default {
1079
1131
  Object.prototype.hasOwnProperty.call(item, 'fourthTabs') &&
1080
1132
  item.fourthTabs.length
1081
1133
  ) {
1082
- let id = this.getId(item.fourthTabs, res, path);
1134
+ let id = this.getId(item.fourthTabs, url);
1083
1135
  if (id) {
1084
1136
  if (typeof id === 'string') {
1085
1137
  this.isTabs = true;
@@ -1091,12 +1143,12 @@ export default {
1091
1143
  }
1092
1144
  return id;
1093
1145
  }
1094
- } else if (item.id === res || item.url == res) {
1146
+ } else if (item.id === url || item.url == url) {
1095
1147
  return item.id;
1096
1148
  } else {
1097
- if (path && item.url) {
1149
+ if (item.url) {
1098
1150
  let url = new URL(item.url, window.location.origin);
1099
- if (url.hash == res) {
1151
+ if (url.hash == url) {
1100
1152
  return item.id;
1101
1153
  }
1102
1154
  }
@@ -1114,54 +1166,6 @@ export default {
1114
1166
  if (res.rCode === 0) {
1115
1167
  if (res.results && res.results.length) {
1116
1168
  this.menus = JSON.parse(JSON.stringify(res.results));
1117
- let applicationid =
1118
- util.getParams('applicationid') ||
1119
- util.getParams('applicationId');
1120
- if (applicationid) {
1121
- let ids = this.getId(this.menus, applicationid);
1122
- if (ids) {
1123
- this.defaultActive = ids;
1124
- }
1125
- } else if (sessionStorage.getItem('jump') && this.isHistory) {
1126
- let ids = this.getId(
1127
- this.menus,
1128
- sessionStorage.getItem('jump'),
1129
- true
1130
- );
1131
- if (ids) {
1132
- this.defaultActive = ids;
1133
- this.navIds = ids;
1134
- this.setTitle(ids[0]);
1135
- }
1136
- } else if (util.win.location.hash) {
1137
- let hash = util.win.location.hash;
1138
- if (hash) {
1139
- hash = hash.split('?')[0];
1140
- }
1141
- if (hash !== '#/' && hash !== '#/main') {
1142
- let ids = this.getId(
1143
- this.menus,
1144
- util.win.location.hash,
1145
- true
1146
- );
1147
- if (ids) {
1148
- this.defaultActive = ids;
1149
- this.navIds = ids;
1150
- this.setTitle(ids[0]);
1151
- }
1152
- } else if (sessionStorage.getItem('jump') && this.isHistory) {
1153
- let ids = this.getId(
1154
- this.menus,
1155
- sessionStorage.getItem('jump'),
1156
- true
1157
- );
1158
- if (ids) {
1159
- this.defaultActive = ids;
1160
- this.navIds = ids;
1161
- this.setTitle(ids[0]);
1162
- }
1163
- }
1164
- }
1165
1169
  this.setTips(this.menus);
1166
1170
  store.set('nav', this.menus);
1167
1171
  this.setMenu(this.menus);
@@ -1181,6 +1185,34 @@ export default {
1181
1185
  },
1182
1186
  //设置默认左侧导航
1183
1187
  setMenu(res) {
1188
+ let applicationid =
1189
+ util.getParams('applicationid') || util.getParams('applicationId');
1190
+ if (applicationid) {
1191
+ let ids = this.getId(this.menus, applicationid);
1192
+ if (ids) {
1193
+ this.defaultActive = ids;
1194
+ }
1195
+ } else if (util.win.location.hash) {
1196
+ let hash = util.win.location.hash;
1197
+ if (hash) {
1198
+ hash = hash.split('?')[0];
1199
+ }
1200
+ if (hash !== '#/' && hash !== '#/main') {
1201
+ let ids = this.getId(this.menus, util.win.location.hash);
1202
+ if (ids) {
1203
+ this.defaultActive = ids;
1204
+ this.navIds = ids;
1205
+ this.setTitle(ids[0]);
1206
+ }
1207
+ }
1208
+ } else if (sessionStorage.getItem('jump') && this.isHistory) {
1209
+ let ids = this.getId(this.menus, sessionStorage.getItem('jump'));
1210
+ if (ids) {
1211
+ this.defaultActive = ids;
1212
+ this.navIds = ids;
1213
+ this.setTitle(ids[0]);
1214
+ }
1215
+ }
1184
1216
  if (this.defaultActive && this.defaultActive.length) {
1185
1217
  this.isDefault = false;
1186
1218
  this.setDefault(res, this.defaultActive);
@@ -1255,11 +1287,24 @@ export default {
1255
1287
  if (id && this.menu[0].id !== id) {
1256
1288
  this.active.push(id);
1257
1289
  } else {
1258
- this.handleJump(
1259
- this.menu[0].url,
1260
- this.menu[0].urlopenmode,
1261
- this.menu[0]
1262
- );
1290
+ let hash = util.win.location.hash;
1291
+ if (hash) {
1292
+ hash = hash.split('?')[0];
1293
+ if (hash !== '#/' && hash !== '#/main') {
1294
+ this.handleJump(hash);
1295
+ return;
1296
+ }
1297
+ }
1298
+ let jump = sessionStorage.getItem('jump');
1299
+ if (jump) {
1300
+ this.handleJump(jump);
1301
+ } else {
1302
+ this.handleJump(
1303
+ this.menu[0].url,
1304
+ this.menu[0].urlopenmode,
1305
+ this.menu[0]
1306
+ );
1307
+ }
1263
1308
  }
1264
1309
  }
1265
1310
  }
@@ -1406,7 +1451,7 @@ export default {
1406
1451
  break;
1407
1452
  }
1408
1453
  }
1409
- } else {
1454
+ } else if (active && active.length) {
1410
1455
  this.navs = [];
1411
1456
  this.subsystem = [];
1412
1457
  this.menu = res;
@@ -1501,12 +1546,12 @@ export default {
1501
1546
  this.active = subNode.id;
1502
1547
  this.navIds = [
1503
1548
  node.id,
1504
- ...this.getId(node.children, subNode.url, true)
1549
+ ...this.getId(node.children, subNode.url)
1505
1550
  ];
1506
1551
  }
1507
1552
  }
1508
1553
  } else {
1509
- this.navIds = this.getId(this.menus, node.url, true);
1554
+ this.navIds = this.getId(this.menus, node.url);
1510
1555
  this.setTitle(this.navIds[0]);
1511
1556
  this.tabsId = fourthTabs ? node.id : '';
1512
1557
  }
@@ -1526,7 +1571,7 @@ export default {
1526
1571
  this.active = subNode.id;
1527
1572
  this.navIds = [
1528
1573
  node.id,
1529
- ...this.getId(node.children, subNode.url, true)
1574
+ ...this.getId(node.children, subNode.url)
1530
1575
  ];
1531
1576
  }
1532
1577
  }
@@ -1546,7 +1591,7 @@ export default {
1546
1591
  let subNode = this.getFirst(node);
1547
1592
  this.active = [node.id];
1548
1593
  if (subNode && node.id !== subNode.id) {
1549
- this.navIds = this.getId(this.menus, subNode.url, true);
1594
+ this.navIds = this.getId(this.menus, subNode.url);
1550
1595
  this.$set(this.active, 1, subNode.id);
1551
1596
  }
1552
1597
  }
@@ -1570,7 +1615,7 @@ export default {
1570
1615
  } else {
1571
1616
  this.active = tab.id;
1572
1617
  }
1573
- this.navIds = this.getId(this.menus, tab.url, true);
1618
+ this.navIds = this.getId(this.menus, tab.url);
1574
1619
  }
1575
1620
  } else {
1576
1621
  let tab = (node.fourthTabs || []).filter((item) => {
@@ -1579,9 +1624,9 @@ export default {
1579
1624
  if (tab) {
1580
1625
  this.tabs = node.fourthTabs;
1581
1626
  this.tabsId = tab.id;
1582
- this.navIds = this.getId(this.menus, tab.url, true);
1627
+ this.navIds = this.getId(this.menus, tab.url);
1583
1628
  } else {
1584
- this.navIds = this.getId(this.menus, node.url, true);
1629
+ this.navIds = this.getId(this.menus, node.url);
1585
1630
  }
1586
1631
  }
1587
1632
  } else {
@@ -1593,7 +1638,7 @@ export default {
1593
1638
  this.tabs[0].urlopenmode,
1594
1639
  this.tabs[0]
1595
1640
  );
1596
- this.navIds = this.getId(this.menus, this.tabs[0].url, true);
1641
+ this.navIds = this.getId(this.menus, this.tabs[0].url);
1597
1642
  }
1598
1643
  }
1599
1644
  } else {
@@ -1606,14 +1651,14 @@ export default {
1606
1651
  } else {
1607
1652
  this.active = subNode.id;
1608
1653
  }
1609
- this.navIds = this.getId(this.menus, subNode.url, true);
1654
+ this.navIds = this.getId(this.menus, subNode.url);
1610
1655
  }
1611
1656
  }
1612
1657
  }
1613
1658
  break;
1614
1659
  case 'tabs':
1615
1660
  this.tabsId = node.id;
1616
- this.navIds = this.getId(this.menus, node.url, true);
1661
+ this.navIds = this.getId(this.menus, node.url);
1617
1662
  break;
1618
1663
  }
1619
1664
  if (node.url) {
@@ -1,11 +1,12 @@
1
1
  <template>
2
2
  <div
3
+ v-if="isRender"
3
4
  class="es-selector"
4
5
  ref="esSelector"
5
6
  :class="{ 'es-pointer': !readonly && !filterable }"
6
7
  v-clickoutside="handleClose"
7
8
  >
8
- <el-button v-if="button" v-bind="button" @click.stop="openDialog"
9
+ <el-button v-if="button" v-bind="button" @click="openDialog"
9
10
  ><slot>选择</slot></el-button
10
11
  >
11
12
  <template v-else>
@@ -105,7 +106,6 @@
105
106
  readonly
106
107
  :name="name"
107
108
  type="text"
108
- wqwq
109
109
  v-show="false"
110
110
  ></el-input>
111
111
  </template>
@@ -188,6 +188,7 @@
188
188
  class="es-selector-dialog"
189
189
  >
190
190
  <es-selector-panel
191
+ v-if="isReset"
191
192
  v-model="selected"
192
193
  v-bind="$attrs"
193
194
  :multiple="multiple"
@@ -329,6 +330,13 @@ export default {
329
330
  emptySerach: {
330
331
  type: Boolean,
331
332
  default: false
333
+ },
334
+ reset: Boolean,
335
+ useCaseCode: String,
336
+ businessData: [String, Array, Object],
337
+ inputHeight: {
338
+ type: Number,
339
+ default: 40
332
340
  }
333
341
  },
334
342
  data() {
@@ -348,6 +356,16 @@ export default {
348
356
  };
349
357
  },
350
358
  computed: {
359
+ isRender() {
360
+ let useCaseCodes = util.getStorage('useCaseCodes');
361
+ if (useCaseCodes && this.useCaseCode) {
362
+ return useCaseCodes.indexOf(this.useCaseCode) > -1;
363
+ }
364
+ return true;
365
+ },
366
+ isReset() {
367
+ return this.reset ? this.visible : true;
368
+ },
351
369
  _elFormItemSize() {
352
370
  return (this.elFormItem || {}).elFormItemSize;
353
371
  },
@@ -413,7 +431,11 @@ export default {
413
431
  selected: {
414
432
  deep: true,
415
433
  handler(val) {
416
- this.$emit('change', Array.isArray(val) ? val : [val]);
434
+ this.$emit(
435
+ 'change',
436
+ Array.isArray(val) ? val : [val],
437
+ this.businessData
438
+ );
417
439
  if (this.multiple) {
418
440
  this.resetInputHeight();
419
441
  }
@@ -551,10 +573,11 @@ export default {
551
573
  this.visible = false;
552
574
  if (util.isObject(res)) {
553
575
  this.$emit('input', [res]);
576
+ this.$emit('confirm', [res], this.businessData);
554
577
  } else {
555
578
  this.$emit('input', res);
579
+ this.$emit('confirm', res, this.businessData);
556
580
  }
557
- this.$emit('confirm', res);
558
581
  let inputChildNodes = this.$refs.reference
559
582
  ? this.$refs.reference.$el.childNodes
560
583
  : null;
@@ -565,6 +588,9 @@ export default {
565
588
  input.focus();
566
589
  input.blur();
567
590
  }
591
+ if (this.reset) {
592
+ this.selected = [];
593
+ }
568
594
  },
569
595
  handleClear() {
570
596
  this.$emit('input', []);
@@ -584,7 +610,7 @@ export default {
584
610
  if (this.collapseTags) return;
585
611
  this.$nextTick(() => {
586
612
  if (!this.$refs.reference) return;
587
- const sizeInMap = this.initialInputHeight || 40;
613
+ const sizeInMap = this.inputHeight;
588
614
  let height = '';
589
615
  if (this.selected !== undefined && this.selected.length === 0) {
590
616
  height = sizeInMap + 'px';