@mdsfe/mds-ui 0.3.0-19 → 0.3.0-20

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 (48) hide show
  1. package/dist/anchor.js +2 -2
  2. package/dist/bordershadow.js +2 -2
  3. package/dist/breadcrumb.js +2 -2
  4. package/dist/card.js +2 -2
  5. package/dist/carousel.js +14 -14
  6. package/dist/cascader.js +29 -29
  7. package/dist/cascaderpanel.js +26 -26
  8. package/dist/checkbox.js +6 -6
  9. package/dist/col.js +2 -2
  10. package/dist/collapse.js +2 -2
  11. package/dist/datepicker.js +44 -44
  12. package/dist/divider.js +2 -2
  13. package/dist/drawer.js +9 -9
  14. package/dist/dropdown.js +6 -6
  15. package/dist/empty.js +2 -2
  16. package/dist/form.js +8 -8
  17. package/dist/index.js +1 -1
  18. package/dist/input.js +8 -8
  19. package/dist/inputnumber.js +7 -7
  20. package/dist/list.js +2 -2
  21. package/dist/loading.js +2 -2
  22. package/dist/mds-ui.min.css +1 -1
  23. package/dist/mds-ui.min.js +724 -106
  24. package/dist/menu.js +23 -4
  25. package/dist/message.js +4 -4
  26. package/dist/modal.js +4 -4
  27. package/dist/notification.js +6 -6
  28. package/dist/pagination.js +4 -4
  29. package/dist/popconfirm.js +9 -9
  30. package/dist/popover.js +14 -14
  31. package/dist/radio.js +6 -6
  32. package/dist/rate.js +8 -8
  33. package/dist/row.js +2 -2
  34. package/dist/select.js +28 -28
  35. package/dist/slider.js +2 -2
  36. package/dist/slottable.js +15 -15
  37. package/dist/style/transfer.css +105 -0
  38. package/dist/switch.js +4 -4
  39. package/dist/table.js +32 -32
  40. package/dist/text.js +8 -8
  41. package/dist/timeline.js +2 -2
  42. package/dist/timepicker.js +27 -27
  43. package/dist/tooltip.js +13 -13
  44. package/dist/transfer.js +971 -17
  45. package/dist/tree.js +18 -18
  46. package/dist/typography.js +2 -2
  47. package/dist/upload.js +2 -2
  48. package/package.json +1 -1
package/dist/transfer.js CHANGED
@@ -7,7 +7,7 @@
7
7
  var a = typeof exports === 'object' ? factory(require("./icon"), require("./_mixin/locale"), require("./button"), require("./input"), require("./_util/util"), require("./checkbox")) : factory(root["./icon"], root["./_mixin/locale"], root["./button"], root["./input"], root["./_util/util"], root["./checkbox"]);
8
8
  for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
9
9
  }
10
- })(window, function(__WEBPACK_EXTERNAL_MODULE__7__, __WEBPACK_EXTERNAL_MODULE__9__, __WEBPACK_EXTERNAL_MODULE__14__, __WEBPACK_EXTERNAL_MODULE__18__, __WEBPACK_EXTERNAL_MODULE__21__, __WEBPACK_EXTERNAL_MODULE__35__) {
10
+ })(window, function(__WEBPACK_EXTERNAL_MODULE__7__, __WEBPACK_EXTERNAL_MODULE__9__, __WEBPACK_EXTERNAL_MODULE__13__, __WEBPACK_EXTERNAL_MODULE__17__, __WEBPACK_EXTERNAL_MODULE__22__, __WEBPACK_EXTERNAL_MODULE__28__) {
11
11
  return /******/ (function(modules) { // webpackBootstrap
12
12
  /******/ // The module cache
13
13
  /******/ var installedModules = {};
@@ -91,7 +91,7 @@ return /******/ (function(modules) { // webpackBootstrap
91
91
  /******/
92
92
  /******/
93
93
  /******/ // Load entry module and return exports
94
- /******/ return __webpack_require__(__webpack_require__.s = 115);
94
+ /******/ return __webpack_require__(__webpack_require__.s = 100);
95
95
  /******/ })
96
96
  /************************************************************************/
97
97
  /******/ ({
@@ -203,7 +203,7 @@ function normalizeComponent (
203
203
 
204
204
  /***/ }),
205
205
 
206
- /***/ 115:
206
+ /***/ 100:
207
207
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
208
208
 
209
209
  "use strict";
@@ -216,9 +216,13 @@ var style = __webpack_require__(247);
216
216
  // EXTERNAL MODULE: ./components/transfer/style/panel.less
217
217
  var panel = __webpack_require__(249);
218
218
 
219
+ // EXTERNAL MODULE: ./components/transfer/style/extra.less
220
+ var extra = __webpack_require__(251);
221
+
219
222
  // CONCATENATED MODULE: ./components/transfer/style/index.js
220
223
 
221
224
 
225
+
222
226
  // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./components/transfer/transfer.vue?vue&type=template&id=45345264&lang=html&
223
227
  var render = function () {
224
228
  var _vm = this
@@ -370,7 +374,7 @@ var transferPanelvue_type_template_id_32ae9a30_render = function () {
370
374
  },
371
375
  [
372
376
  _c("mds-icon", {
373
- attrs: { slot: "prefix", type: "line-calendar" },
377
+ attrs: { slot: "prefix", type: "line-search" },
374
378
  slot: "prefix",
375
379
  }),
376
380
  ],
@@ -457,7 +461,7 @@ transferPanelvue_type_template_id_32ae9a30_render._withStripped = true
457
461
  // CONCATENATED MODULE: ./components/transfer/transferPanel.vue?vue&type=template&id=32ae9a30&
458
462
 
459
463
  // EXTERNAL MODULE: external "./input"
460
- var external_input_ = __webpack_require__(18);
464
+ var external_input_ = __webpack_require__(17);
461
465
  var external_input_default = /*#__PURE__*/__webpack_require__.n(external_input_);
462
466
 
463
467
  // EXTERNAL MODULE: external "./icon"
@@ -465,10 +469,10 @@ var external_icon_ = __webpack_require__(7);
465
469
  var external_icon_default = /*#__PURE__*/__webpack_require__.n(external_icon_);
466
470
 
467
471
  // EXTERNAL MODULE: external "./checkbox"
468
- var external_checkbox_ = __webpack_require__(35);
472
+ var external_checkbox_ = __webpack_require__(28);
469
473
 
470
474
  // EXTERNAL MODULE: external "./_util/util"
471
- var util_ = __webpack_require__(21);
475
+ var util_ = __webpack_require__(22);
472
476
 
473
477
  // EXTERNAL MODULE: external "./_mixin/locale"
474
478
  var locale_ = __webpack_require__(9);
@@ -715,7 +719,7 @@ if (false) { var api; }
715
719
  component.options.__file = "components/transfer/transferPanel.vue"
716
720
  /* harmony default export */ var transferPanel = (component.exports);
717
721
  // EXTERNAL MODULE: external "./button"
718
- var external_button_ = __webpack_require__(14);
722
+ var external_button_ = __webpack_require__(13);
719
723
  var external_button_default = /*#__PURE__*/__webpack_require__.n(external_button_);
720
724
 
721
725
  // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./components/transfer/transfer.vue?vue&type=script&lang=js&
@@ -923,36 +927,979 @@ var transfer_component = Object(componentNormalizer["a" /* default */])(
923
927
  if (false) { var transfer_api; }
924
928
  transfer_component.options.__file = "components/transfer/transfer.vue"
925
929
  /* harmony default export */ var transfer = (transfer_component.exports);
930
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./components/transfer/transferExtra.vue?vue&type=template&id=7bf23e3c&
931
+ var transferExtravue_type_template_id_7bf23e3c_render = function () {
932
+ var _vm = this
933
+ var _h = _vm.$createElement
934
+ var _c = _vm._self._c || _h
935
+ return _c(
936
+ "div",
937
+ { staticClass: "mds-transfer-extra", style: { height: _vm.height + "px" } },
938
+ [
939
+ _c(
940
+ "div",
941
+ {
942
+ staticClass: "mds-transfer-extra-left",
943
+ style: { height: _vm.height + "px" },
944
+ },
945
+ [
946
+ _c(
947
+ "div",
948
+ {
949
+ staticClass:
950
+ "mds-transfer-extra-card mds-transfer-extra-left-card",
951
+ },
952
+ [
953
+ _c(
954
+ "div",
955
+ { staticClass: "mds-transfer-extra-header" },
956
+ [
957
+ _c(
958
+ "mds-checkbox",
959
+ {
960
+ attrs: {
961
+ checked: _vm.leftCheckAll,
962
+ indeterminate: _vm.leftIndeterminate,
963
+ },
964
+ on: { change: _vm.toggleLeftCheckAll },
965
+ },
966
+ [_vm._v(_vm._s(_vm.leftTitle))]
967
+ ),
968
+ _c("span", { staticClass: "mds-transfer-extra-count" }, [
969
+ _vm._v(
970
+ "\n " +
971
+ _vm._s(_vm.leftSelected.length) +
972
+ "/" +
973
+ _vm._s(_vm.filteredLeftList.length) +
974
+ "\n "
975
+ ),
976
+ ]),
977
+ ],
978
+ 1
979
+ ),
980
+ _vm.filterable
981
+ ? _c(
982
+ "div",
983
+ { staticClass: "mds-transfer-extra-search" },
984
+ [
985
+ _c(
986
+ "mds-input",
987
+ {
988
+ attrs: {
989
+ placeholder: _vm.filterPlaceholder,
990
+ clearable: "",
991
+ size: "small",
992
+ },
993
+ model: {
994
+ value: _vm.leftSearch,
995
+ callback: function ($$v) {
996
+ _vm.leftSearch = $$v
997
+ },
998
+ expression: "leftSearch",
999
+ },
1000
+ },
1001
+ [
1002
+ _c("mds-icon", {
1003
+ attrs: { slot: "prefix", type: "line-search" },
1004
+ slot: "prefix",
1005
+ }),
1006
+ ],
1007
+ 1
1008
+ ),
1009
+ ],
1010
+ 1
1011
+ )
1012
+ : _vm._e(),
1013
+ _c(
1014
+ "div",
1015
+ {
1016
+ class:
1017
+ _vm.prefixCls +
1018
+ "extra-scroll " +
1019
+ _vm.prefixCls +
1020
+ "panel-body",
1021
+ },
1022
+ [
1023
+ _c(
1024
+ "mds-checkbox-group",
1025
+ {
1026
+ staticClass: "checkbox-group-vertical",
1027
+ model: {
1028
+ value: _vm.leftSelected,
1029
+ callback: function ($$v) {
1030
+ _vm.leftSelected = $$v
1031
+ },
1032
+ expression: "leftSelected",
1033
+ },
1034
+ },
1035
+ _vm._l(_vm.filteredLeftList, function (item) {
1036
+ return _c(
1037
+ "mds-checkbox",
1038
+ {
1039
+ key: item.key,
1040
+ attrs: { value: item.key, disabled: item.disabled },
1041
+ },
1042
+ [
1043
+ _vm.$scopedSlots.default
1044
+ ? [_vm._t("default", null, { option: item })]
1045
+ : [
1046
+ _vm._v(
1047
+ "\n " +
1048
+ _vm._s(item.label) +
1049
+ "\n "
1050
+ ),
1051
+ ],
1052
+ ],
1053
+ 2
1054
+ )
1055
+ }),
1056
+ 1
1057
+ ),
1058
+ ],
1059
+ 1
1060
+ ),
1061
+ ]
1062
+ ),
1063
+ ]
1064
+ ),
1065
+ _c(
1066
+ "div",
1067
+ {
1068
+ staticClass: "mds-transfer-extra-actions-wrapper",
1069
+ style: { height: _vm.height + "px" },
1070
+ },
1071
+ _vm._l(_vm.targets, function (target, index) {
1072
+ return _c(
1073
+ "div",
1074
+ {
1075
+ key: target.key,
1076
+ staticClass: "mds-transfer-extra-actions",
1077
+ class:
1078
+ "mds-transfer-extra-actions-" +
1079
+ (index === 0 ? "top" : "bottom"),
1080
+ style: _vm.getActionStyle(index),
1081
+ },
1082
+ [
1083
+ _c(
1084
+ "div",
1085
+ { staticClass: "mds-transfer-extra-button-item" },
1086
+ [
1087
+ _c(
1088
+ "mds-button",
1089
+ {
1090
+ staticClass: "mds-transfer-extra-btn",
1091
+ attrs: {
1092
+ type: "primary",
1093
+ disabled: _vm.leftSelected.length === 0,
1094
+ },
1095
+ on: {
1096
+ click: function ($event) {
1097
+ return _vm.moveTo(target.key)
1098
+ },
1099
+ },
1100
+ },
1101
+ [_c("mds-icon", { attrs: { type: "line-arrow-right" } })],
1102
+ 1
1103
+ ),
1104
+ ],
1105
+ 1
1106
+ ),
1107
+ _c(
1108
+ "div",
1109
+ [
1110
+ _c(
1111
+ "mds-button",
1112
+ {
1113
+ staticClass: "mds-transfer-extra-btn",
1114
+ attrs: {
1115
+ type: "primary",
1116
+ disabled: _vm.getRightSelected(target.key).length === 0,
1117
+ },
1118
+ on: {
1119
+ click: function ($event) {
1120
+ return _vm.moveBack(target.key)
1121
+ },
1122
+ },
1123
+ },
1124
+ [_c("mds-icon", { attrs: { type: "line-arrow-left" } })],
1125
+ 1
1126
+ ),
1127
+ ],
1128
+ 1
1129
+ ),
1130
+ ]
1131
+ )
1132
+ }),
1133
+ 0
1134
+ ),
1135
+ _c(
1136
+ "div",
1137
+ {
1138
+ staticClass: "mds-transfer-extra-right",
1139
+ style: { height: _vm.height + "px" },
1140
+ },
1141
+ _vm._l(_vm.targets, function (target, index) {
1142
+ return _c(
1143
+ "div",
1144
+ {
1145
+ key: target.key,
1146
+ staticClass:
1147
+ "mds-transfer-extra-card mds-transfer-extra-right-card",
1148
+ style: _vm.getCardStyle(index),
1149
+ },
1150
+ [
1151
+ _c(
1152
+ "div",
1153
+ { staticClass: "mds-transfer-extra-header" },
1154
+ [
1155
+ _c(
1156
+ "mds-checkbox",
1157
+ {
1158
+ attrs: {
1159
+ checked: _vm.rightCheckAll(target.key),
1160
+ indeterminate: _vm.rightIndeterminate(target.key),
1161
+ },
1162
+ on: {
1163
+ change: function (val) {
1164
+ return _vm.toggleRightCheckAll(target.key, val)
1165
+ },
1166
+ },
1167
+ },
1168
+ [_vm._v(_vm._s(_vm.rightTitle[index] || target.title))]
1169
+ ),
1170
+ _c("span", { staticClass: "mds-transfer-extra-count" }, [
1171
+ _vm._v(
1172
+ "\n " +
1173
+ _vm._s(_vm.getRightSelected(target.key).length) +
1174
+ "/" +
1175
+ _vm._s(_vm.getFilteredRightList(target.key).length) +
1176
+ "\n "
1177
+ ),
1178
+ ]),
1179
+ ],
1180
+ 1
1181
+ ),
1182
+ _vm.filterable
1183
+ ? _c(
1184
+ "div",
1185
+ { staticClass: "mds-transfer-extra-search" },
1186
+ [
1187
+ _c(
1188
+ "mds-input",
1189
+ {
1190
+ attrs: {
1191
+ value: _vm.getRightSearch(target.key),
1192
+ placeholder: _vm.filterPlaceholder,
1193
+ clearable: "",
1194
+ size: "small",
1195
+ },
1196
+ on: {
1197
+ input: function ($event) {
1198
+ return _vm.updateRightSearch(target.key, $event)
1199
+ },
1200
+ },
1201
+ },
1202
+ [
1203
+ _c("mds-icon", {
1204
+ attrs: { slot: "prefix", type: "line-search" },
1205
+ slot: "prefix",
1206
+ }),
1207
+ ],
1208
+ 1
1209
+ ),
1210
+ ],
1211
+ 1
1212
+ )
1213
+ : _vm._e(),
1214
+ _c(
1215
+ "div",
1216
+ {
1217
+ class:
1218
+ _vm.prefixCls +
1219
+ "extra-scroll " +
1220
+ _vm.prefixCls +
1221
+ "panel-body",
1222
+ },
1223
+ [
1224
+ _c(
1225
+ "mds-checkbox-group",
1226
+ {
1227
+ staticClass: "checkbox-group-vertical",
1228
+ attrs: { value: _vm.getRightSelected(target.key) },
1229
+ on: {
1230
+ input: function ($event) {
1231
+ return _vm.updateRightSelected(target.key, $event)
1232
+ },
1233
+ },
1234
+ },
1235
+ _vm._l(
1236
+ _vm.getFilteredRightList(target.key),
1237
+ function (item) {
1238
+ return _c(
1239
+ "mds-checkbox",
1240
+ {
1241
+ key: item.key,
1242
+ attrs: { value: item.key, disabled: item.disabled },
1243
+ },
1244
+ [
1245
+ _vm.$scopedSlots.default
1246
+ ? [_vm._t("default", null, { option: item })]
1247
+ : [
1248
+ _vm._v(
1249
+ "\n " +
1250
+ _vm._s(item.label) +
1251
+ "\n "
1252
+ ),
1253
+ ],
1254
+ ],
1255
+ 2
1256
+ )
1257
+ }
1258
+ ),
1259
+ 1
1260
+ ),
1261
+ ],
1262
+ 1
1263
+ ),
1264
+ ]
1265
+ )
1266
+ }),
1267
+ 0
1268
+ ),
1269
+ ]
1270
+ )
1271
+ }
1272
+ var transferExtravue_type_template_id_7bf23e3c_staticRenderFns = []
1273
+ transferExtravue_type_template_id_7bf23e3c_render._withStripped = true
1274
+
1275
+
1276
+ // CONCATENATED MODULE: ./components/transfer/transferExtra.vue?vue&type=template&id=7bf23e3c&
1277
+
1278
+ // EXTERNAL MODULE: external "babel-runtime/helpers/toConsumableArray"
1279
+ var toConsumableArray_ = __webpack_require__(19);
1280
+ var toConsumableArray_default = /*#__PURE__*/__webpack_require__.n(toConsumableArray_);
1281
+
1282
+ // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./components/transfer/transferExtra.vue?vue&type=script&lang=js&
1283
+
1284
+ //
1285
+ //
1286
+ //
1287
+ //
1288
+ //
1289
+ //
1290
+ //
1291
+ //
1292
+ //
1293
+ //
1294
+ //
1295
+ //
1296
+ //
1297
+ //
1298
+ //
1299
+ //
1300
+ //
1301
+ //
1302
+ //
1303
+ //
1304
+ //
1305
+ //
1306
+ //
1307
+ //
1308
+ //
1309
+ //
1310
+ //
1311
+ //
1312
+ //
1313
+ //
1314
+ //
1315
+ //
1316
+ //
1317
+ //
1318
+ //
1319
+ //
1320
+ //
1321
+ //
1322
+ //
1323
+ //
1324
+ //
1325
+ //
1326
+ //
1327
+ //
1328
+ //
1329
+ //
1330
+ //
1331
+ //
1332
+ //
1333
+ //
1334
+ //
1335
+ //
1336
+ //
1337
+ //
1338
+ //
1339
+ //
1340
+ //
1341
+ //
1342
+ //
1343
+ //
1344
+ //
1345
+ //
1346
+ //
1347
+ //
1348
+ //
1349
+ //
1350
+ //
1351
+ //
1352
+ //
1353
+ //
1354
+ //
1355
+ //
1356
+ //
1357
+ //
1358
+ //
1359
+ //
1360
+ //
1361
+ //
1362
+ //
1363
+ //
1364
+ //
1365
+ //
1366
+ //
1367
+ //
1368
+ //
1369
+ //
1370
+ //
1371
+ //
1372
+ //
1373
+ //
1374
+ //
1375
+ //
1376
+ //
1377
+ //
1378
+ //
1379
+ //
1380
+ //
1381
+ //
1382
+ //
1383
+ //
1384
+ //
1385
+ //
1386
+ //
1387
+ //
1388
+ //
1389
+ //
1390
+ //
1391
+ //
1392
+ //
1393
+ //
1394
+ //
1395
+ //
1396
+ //
1397
+ //
1398
+ //
1399
+ //
1400
+ //
1401
+ //
1402
+ //
1403
+ //
1404
+ //
1405
+ //
1406
+ //
1407
+ //
1408
+ //
1409
+ //
1410
+ //
1411
+ //
1412
+ //
1413
+ //
1414
+ //
1415
+
1416
+
1417
+
1418
+
1419
+
1420
+
1421
+
1422
+ /* harmony default export */ var transferExtravue_type_script_lang_js_ = ({
1423
+ name: 'MdsTransferExtra',
1424
+ components: {
1425
+ MdsInput: external_input_default.a,
1426
+ MdsIcon: external_icon_default.a,
1427
+ MdsCheckbox: external_checkbox_["MdsCheckbox"],
1428
+ MdsCheckboxGroup: external_checkbox_["MdsCheckboxGroup"],
1429
+ MdsButton: external_button_default.a
1430
+ },
1431
+ mixins: [locale_default.a],
1432
+ props: {
1433
+ height: {
1434
+ type: [String, Number],
1435
+ default: 600 // 或 '600px'
1436
+ },
1437
+ cardGap: {
1438
+ type: Number,
1439
+ default: 24 // 卡片间距
1440
+ },
1441
+ // 左侧数据源
1442
+ data: {
1443
+ type: Array,
1444
+ default: function _default() {
1445
+ return [];
1446
+ }
1447
+ },
1448
+ prefixCls: {
1449
+ type: String,
1450
+ default: 'mds-transfer-'
1451
+ },
1452
+ // 左侧标题
1453
+ leftTitle: {
1454
+ type: String,
1455
+ default: '数据源'
1456
+ },
1457
+ // 右侧标题
1458
+ rightTitle: {
1459
+ type: Array,
1460
+ default: function _default() {
1461
+ return [];
1462
+ }
1463
+ },
1464
+ // 目标区域配置
1465
+ targets: {
1466
+ type: Array,
1467
+ default: function _default() {
1468
+ return [{ key: 'target1', title: '目标区域1' }, { key: 'target2', title: '目标区域2' }];
1469
+ }
1470
+ },
1471
+ // 初始值
1472
+ value: {
1473
+ type: Object,
1474
+ default: function _default() {
1475
+ return {};
1476
+ }
1477
+ },
1478
+ // 是否可搜索
1479
+ filterable: {
1480
+ type: Boolean,
1481
+ default: false
1482
+ },
1483
+ // 搜索占位符
1484
+ filterPlaceholder: {
1485
+ type: String,
1486
+ default: function _default() {
1487
+ // 优先使用上游传入的值,否则用国际化或默认
1488
+ return this.$t && this.$t('mds.transfer.filterPlaceholder') || '请输入搜索内容';
1489
+ }
1490
+ },
1491
+ // 自定义搜索方法
1492
+ filterMethod: Function,
1493
+ leftDefaultChecked: {
1494
+ type: Array,
1495
+ default: function _default() {
1496
+ return [];
1497
+ }
1498
+ },
1499
+ rightDefaultChecked: {
1500
+ type: Object, // { [targetKey]: [key1, key2] }
1501
+ default: function _default() {
1502
+ return {};
1503
+ }
1504
+ }
1505
+ },
1506
+ data: function data() {
1507
+ return {
1508
+ leftList: [].concat(toConsumableArray_default()(this.data)),
1509
+ rightLists: this.initRightLists(),
1510
+ leftSelected: this.cleanSelectedKeys(this.leftDefaultChecked, this.data),
1511
+ rightSelected: this.initRightSelected(),
1512
+ leftSearch: '',
1513
+ rightSearch: this.initRightSearch()
1514
+ };
1515
+ },
1516
+
1517
+ computed: {
1518
+ cardCount: function cardCount() {
1519
+ return this.targets.length;
1520
+ },
1521
+ cardHeight: function cardHeight() {
1522
+ var h = typeof this.height === 'number' ? this.height : parseInt(this.height);
1523
+ return (h - (this.cardCount - 1) * this.cardGap) / this.cardCount;
1524
+ },
1525
+
1526
+ // 过滤后的左侧列表
1527
+ filteredLeftList: function filteredLeftList() {
1528
+ var _this = this;
1529
+
1530
+ if (!this.filterable || !this.leftSearch.trim()) {
1531
+ return this.leftList;
1532
+ }
1533
+
1534
+ if (this.filterMethod) {
1535
+ return this.leftList.filter(function (item) {
1536
+ return _this.filterMethod(_this.leftSearch, item);
1537
+ });
1538
+ }
1539
+
1540
+ return this.leftList.filter(function (item) {
1541
+ return item.label && item.label.toLowerCase().includes(_this.leftSearch.toLowerCase());
1542
+ });
1543
+ },
1544
+ leftCheckAll: function leftCheckAll() {
1545
+ var _this2 = this;
1546
+
1547
+ var checkable = this.filteredLeftList.filter(function (i) {
1548
+ return !i.disabled;
1549
+ });
1550
+ return checkable.length > 0 && checkable.every(function (i) {
1551
+ return _this2.leftSelected.includes(i.key);
1552
+ });
1553
+ },
1554
+ leftIndeterminate: function leftIndeterminate() {
1555
+ var _this3 = this;
1556
+
1557
+ var checkable = this.filteredLeftList.filter(function (i) {
1558
+ return !i.disabled;
1559
+ });
1560
+ var checked = checkable.filter(function (i) {
1561
+ return _this3.leftSelected.includes(i.key);
1562
+ });
1563
+ return checked.length > 0 && checked.length < checkable.length;
1564
+ }
1565
+ },
1566
+ watch: {
1567
+ data: {
1568
+ handler: function handler(newData) {
1569
+ this.leftList = [].concat(toConsumableArray_default()(newData));
1570
+ this.leftSelected = this.cleanSelectedKeys(this.leftSelected, this.leftList);
1571
+ },
1572
+
1573
+ deep: true
1574
+ },
1575
+ value: {
1576
+ handler: function handler(newValue) {
1577
+ var _this4 = this;
1578
+
1579
+ this.targets.forEach(function (target) {
1580
+ _this4.rightLists[target.key] = newValue[target.key] || [];
1581
+ _this4.$set(_this4.rightSelected, target.key, _this4.cleanSelectedKeys(_this4.getRightSelected(target.key), _this4.getRightList(target.key)));
1582
+ });
1583
+ },
1584
+
1585
+ deep: true
1586
+ // leftDefaultChecked(newVal) {
1587
+ // this.leftSelected = this.cleanSelectedKeys(newVal, this.leftList)
1588
+ // },
1589
+ // rightDefaultChecked: {
1590
+ // handler(newVal) {
1591
+ // this.targets.forEach(target => {
1592
+ // this.$set(
1593
+ // this.rightSelected,
1594
+ // target.key,
1595
+ // this.cleanSelectedKeys(newVal[target.key] ? [...newVal[target.key]] : [], this.getRightList(target.key))
1596
+ // )
1597
+ // })
1598
+ // },
1599
+ // deep: true
1600
+ // }
1601
+ } },
1602
+ methods: {
1603
+ cleanSelectedKeys: function cleanSelectedKeys(selectedKeys, list) {
1604
+ var validKeys = list.map(function (item) {
1605
+ return item.key;
1606
+ });
1607
+ return selectedKeys.filter(function (key) {
1608
+ return validKeys.includes(key);
1609
+ });
1610
+ },
1611
+ getCardStyle: function getCardStyle(index) {
1612
+ return {
1613
+ height: this.cardHeight + 'px',
1614
+ marginBottom: index < this.cardCount - 1 ? this.cardGap + 'px' : '0'
1615
+ };
1616
+ },
1617
+ getActionStyle: function getActionStyle(index) {
1618
+ // 让按钮区和每个右侧卡片垂直居中对齐
1619
+ return {
1620
+ height: this.cardHeight + 'px',
1621
+ display: 'flex',
1622
+ flexDirection: 'column',
1623
+ alignItems: 'center',
1624
+ justifyContent: 'center',
1625
+ marginBottom: index < this.cardCount - 1 ? this.cardGap + 'px' : 0
1626
+ };
1627
+ },
1628
+
1629
+ // 初始化右侧数据
1630
+ initRightLists: function initRightLists() {
1631
+ var _this5 = this;
1632
+
1633
+ var rightLists = {};
1634
+ this.targets.forEach(function (target) {
1635
+ rightLists[target.key] = _this5.value[target.key] || [];
1636
+ });
1637
+ return rightLists;
1638
+ },
1639
+
1640
+
1641
+ // 初始化右侧选中状态
1642
+ initRightSelected: function initRightSelected() {
1643
+ var _this6 = this;
1644
+
1645
+ var rightSelected = {};
1646
+ this.targets.forEach(function (target) {
1647
+ rightSelected[target.key] = _this6.rightDefaultChecked[target.key] ? [].concat(toConsumableArray_default()(_this6.rightDefaultChecked[target.key])) : [];
1648
+ });
1649
+ return rightSelected;
1650
+ },
1651
+
1652
+
1653
+ // 初始化右侧搜索状态
1654
+ initRightSearch: function initRightSearch() {
1655
+ var rightSearch = {};
1656
+ this.targets.forEach(function (target) {
1657
+ rightSearch[target.key] = '';
1658
+ });
1659
+ return rightSearch;
1660
+ },
1661
+
1662
+
1663
+ // 获取右侧列表
1664
+ getRightList: function getRightList(targetKey) {
1665
+ return this.rightLists[targetKey] || [];
1666
+ },
1667
+
1668
+
1669
+ // 获取过滤后的右侧列表
1670
+ getFilteredRightList: function getFilteredRightList(targetKey) {
1671
+ var _this7 = this;
1672
+
1673
+ var list = this.getRightList(targetKey);
1674
+ var search = this.getRightSearch(targetKey);
1675
+
1676
+ if (!this.filterable || !search.trim()) {
1677
+ return list;
1678
+ }
1679
+
1680
+ if (this.filterMethod) {
1681
+ return list.filter(function (item) {
1682
+ return _this7.filterMethod(search, item);
1683
+ });
1684
+ }
1685
+
1686
+ return list.filter(function (item) {
1687
+ return item.label && item.label.toLowerCase().includes(search.toLowerCase());
1688
+ });
1689
+ },
1690
+
1691
+
1692
+ // 获取右侧选中状态
1693
+ getRightSelected: function getRightSelected(targetKey) {
1694
+ if (!this.rightSelected[targetKey]) {
1695
+ this.$set(this.rightSelected, targetKey, []);
1696
+ }
1697
+ return this.rightSelected[targetKey];
1698
+ },
1699
+
1700
+
1701
+ // 获取右侧搜索状态
1702
+ getRightSearch: function getRightSearch(targetKey) {
1703
+ if (!this.rightSearch[targetKey]) {
1704
+ this.$set(this.rightSearch, targetKey, '');
1705
+ }
1706
+ return this.rightSearch[targetKey];
1707
+ },
1708
+
1709
+
1710
+ // 更新右侧选中状态
1711
+ updateRightSelected: function updateRightSelected(targetKey, selectedValues) {
1712
+ this.$set(this.rightSelected, targetKey, selectedValues);
1713
+ },
1714
+
1715
+
1716
+ // 更新右侧搜索状态
1717
+ updateRightSearch: function updateRightSearch(targetKey, searchValue) {
1718
+ this.$set(this.rightSearch, targetKey, searchValue);
1719
+ },
1720
+
1721
+
1722
+ // 移动到右侧
1723
+ moveTo: function moveTo(targetKey) {
1724
+ var _this8 = this,
1725
+ _rightLists$targetKey;
1726
+
1727
+ if (this.leftSelected.length === 0) return;
1728
+
1729
+ var moveItems = this.leftList.filter(function (item) {
1730
+ return _this8.leftSelected.includes(item.key);
1731
+ });
1732
+
1733
+ // 避免重复添加
1734
+ var existingKeys = this.getRightList(targetKey).map(function (item) {
1735
+ return item.key;
1736
+ });
1737
+ var newItems = moveItems.filter(function (item) {
1738
+ return !existingKeys.includes(item.key);
1739
+ });
1740
+
1741
+ if (!this.rightLists[targetKey]) {
1742
+ this.$set(this.rightLists, targetKey, []);
1743
+ }
1744
+ (_rightLists$targetKey = this.rightLists[targetKey]).push.apply(_rightLists$targetKey, toConsumableArray_default()(newItems));
1745
+
1746
+ // 从左侧移除已移动的项
1747
+ this.leftList = this.leftList.filter(function (item) {
1748
+ return !_this8.leftSelected.includes(item.key);
1749
+ });
1750
+ this.leftSelected = this.cleanSelectedKeys(this.leftSelected, this.leftList);
1751
+
1752
+ // 触发更新事件
1753
+ this.emitChange();
1754
+ },
1755
+
1756
+
1757
+ // 移回左侧
1758
+ moveBack: function moveBack(targetKey) {
1759
+ var _leftList;
1760
+
1761
+ var selected = this.getRightSelected(targetKey);
1762
+ if (selected.length === 0) return;
1763
+
1764
+ var moveItems = this.getRightList(targetKey).filter(function (item) {
1765
+ return selected.includes(item.key);
1766
+ });
1767
+
1768
+ // 避免重复添加到左侧
1769
+ var existingKeys = this.leftList.map(function (item) {
1770
+ return item.key;
1771
+ });
1772
+ var newItems = moveItems.filter(function (item) {
1773
+ return !existingKeys.includes(item.key);
1774
+ });
1775
+ (_leftList = this.leftList).push.apply(_leftList, toConsumableArray_default()(newItems));
1776
+
1777
+ // 从右侧移除已移动的项
1778
+ this.$set(this.rightLists, targetKey, this.getRightList(targetKey).filter(function (item) {
1779
+ return !selected.includes(item.key);
1780
+ }));
1781
+ this.$set(this.rightSelected, targetKey, this.cleanSelectedKeys(this.getRightSelected(targetKey), this.getRightList(targetKey)));
1782
+
1783
+ // 触发更新事件
1784
+ this.emitChange();
1785
+ },
1786
+
1787
+
1788
+ // 触发更新事件
1789
+ emitChange: function emitChange() {
1790
+ var _this9 = this;
1791
+
1792
+ var result = {};
1793
+ this.targets.forEach(function (target) {
1794
+ result[target.key] = _this9.getRightList(target.key);
1795
+ });
1796
+ this.$emit('input', result);
1797
+ this.$emit('change', result);
1798
+ },
1799
+ toggleLeftCheckAll: function toggleLeftCheckAll(val) {
1800
+ var checkable = this.filteredLeftList.filter(function (i) {
1801
+ return !i.disabled;
1802
+ }).map(function (i) {
1803
+ return i.key;
1804
+ });
1805
+ this.leftSelected = val ? checkable : [];
1806
+ },
1807
+ rightCheckAll: function rightCheckAll(targetKey) {
1808
+ var _this10 = this;
1809
+
1810
+ var checkable = this.getFilteredRightList(targetKey).filter(function (i) {
1811
+ return !i.disabled;
1812
+ });
1813
+ return checkable.length > 0 && checkable.every(function (i) {
1814
+ return _this10.getRightSelected(targetKey).includes(i.key);
1815
+ });
1816
+ },
1817
+ rightIndeterminate: function rightIndeterminate(targetKey) {
1818
+ var _this11 = this;
1819
+
1820
+ var checkable = this.getFilteredRightList(targetKey).filter(function (i) {
1821
+ return !i.disabled;
1822
+ });
1823
+ var checked = checkable.filter(function (i) {
1824
+ return _this11.getRightSelected(targetKey).includes(i.key);
1825
+ });
1826
+ return checked.length > 0 && checked.length < checkable.length;
1827
+ },
1828
+ toggleRightCheckAll: function toggleRightCheckAll(targetKey, val) {
1829
+ var checkable = this.getFilteredRightList(targetKey).filter(function (i) {
1830
+ return !i.disabled;
1831
+ }).map(function (i) {
1832
+ return i.key;
1833
+ });
1834
+ this.updateRightSelected(targetKey, val ? checkable : []);
1835
+ }
1836
+ }
1837
+ });
1838
+ // CONCATENATED MODULE: ./components/transfer/transferExtra.vue?vue&type=script&lang=js&
1839
+ /* harmony default export */ var transfer_transferExtravue_type_script_lang_js_ = (transferExtravue_type_script_lang_js_);
1840
+ // CONCATENATED MODULE: ./components/transfer/transferExtra.vue
1841
+
1842
+
1843
+
1844
+
1845
+
1846
+ /* normalize component */
1847
+
1848
+ var transferExtra_component = Object(componentNormalizer["a" /* default */])(
1849
+ transfer_transferExtravue_type_script_lang_js_,
1850
+ transferExtravue_type_template_id_7bf23e3c_render,
1851
+ transferExtravue_type_template_id_7bf23e3c_staticRenderFns,
1852
+ false,
1853
+ null,
1854
+ null,
1855
+ null
1856
+
1857
+ )
1858
+
1859
+ /* hot reload */
1860
+ if (false) { var transferExtra_api; }
1861
+ transferExtra_component.options.__file = "components/transfer/transferExtra.vue"
1862
+ /* harmony default export */ var transferExtra = (transferExtra_component.exports);
926
1863
  // CONCATENATED MODULE: ./components/transfer/index.js
927
1864
 
928
1865
 
929
1866
 
1867
+
1868
+ // MdsTransfer.Extra = MdsTransferExtra
930
1869
  transfer.install = function (Vue) {
931
- Vue.component(transfer.name, transfer);
1870
+ Vue.component(transfer.name, transfer);
1871
+ Vue.component(transferExtra.name, transferExtra);
932
1872
  };
933
1873
 
934
1874
  /* harmony default export */ var components_transfer = __webpack_exports__["default"] = (transfer);
935
1875
 
936
1876
  /***/ }),
937
1877
 
938
- /***/ 14:
1878
+ /***/ 13:
1879
+ /***/ (function(module, exports) {
1880
+
1881
+ module.exports = __WEBPACK_EXTERNAL_MODULE__13__;
1882
+
1883
+ /***/ }),
1884
+
1885
+ /***/ 17:
939
1886
  /***/ (function(module, exports) {
940
1887
 
941
- module.exports = __WEBPACK_EXTERNAL_MODULE__14__;
1888
+ module.exports = __WEBPACK_EXTERNAL_MODULE__17__;
942
1889
 
943
1890
  /***/ }),
944
1891
 
945
- /***/ 18:
1892
+ /***/ 19:
946
1893
  /***/ (function(module, exports) {
947
1894
 
948
- module.exports = __WEBPACK_EXTERNAL_MODULE__18__;
1895
+ module.exports = require("babel-runtime/helpers/toConsumableArray");
949
1896
 
950
1897
  /***/ }),
951
1898
 
952
- /***/ 21:
1899
+ /***/ 22:
953
1900
  /***/ (function(module, exports) {
954
1901
 
955
- module.exports = __WEBPACK_EXTERNAL_MODULE__21__;
1902
+ module.exports = __WEBPACK_EXTERNAL_MODULE__22__;
956
1903
 
957
1904
  /***/ }),
958
1905
 
@@ -970,10 +1917,17 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__21__;
970
1917
 
971
1918
  /***/ }),
972
1919
 
973
- /***/ 35:
1920
+ /***/ 251:
1921
+ /***/ (function(module, exports) {
1922
+
1923
+ // removed by extract-text-webpack-plugin
1924
+
1925
+ /***/ }),
1926
+
1927
+ /***/ 28:
974
1928
  /***/ (function(module, exports) {
975
1929
 
976
- module.exports = __WEBPACK_EXTERNAL_MODULE__35__;
1930
+ module.exports = __WEBPACK_EXTERNAL_MODULE__28__;
977
1931
 
978
1932
  /***/ }),
979
1933