@mdsfe/mds-ui 0.2.0 → 0.2.9-rc.1
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 +178 -0
- package/README.md +9 -9
- package/dist/_mixin/popper.js +1 -0
- package/dist/_util/_popper/dom-helper.js +284 -0
- package/dist/_util/_popper/popper-mixin.js +35 -0
- package/dist/_util/_popper/popper.js +1267 -0
- package/dist/_util/_popper/popup/popup-main.js +224 -0
- package/dist/_util/_popper/popup/popup-manager.js +205 -0
- package/dist/_util/_popper/vue-popper.js +204 -0
- package/dist/_util/popup/index.js +1 -1
- package/dist/_util/tree/node.js +2 -0
- package/dist/_util/tree/tree.js +65 -21
- package/dist/_util/util.js +29 -1
- package/dist/affix.js +18 -18
- package/dist/anchor.js +18 -18
- package/dist/avatar.js +17 -17
- package/dist/backtop.js +19 -19
- package/dist/badge.js +21 -21
- package/dist/bordershadow.js +20 -9
- package/dist/breadcrumb.js +18 -18
- package/dist/button.js +21 -21
- package/dist/card.js +18 -18
- package/dist/carousel.js +76 -76
- package/dist/cascader.js +4980 -0
- package/dist/cascaderpanel.js +645 -603
- package/dist/checkbox.js +23 -23
- package/dist/col.js +14 -14
- package/dist/collapse.js +6 -6
- package/dist/color.js +6 -6
- package/dist/datepicker.js +2487 -266
- package/dist/divider.js +19 -19
- package/dist/drawer.js +787 -37
- package/dist/dropdown.js +150 -104
- package/dist/empty.js +19 -19
- package/dist/font/iconfont.28359fa.ttf +0 -0
- package/dist/font/iconfont.486e3d3.woff2 +0 -0
- package/dist/font/iconfont.675049e.woff +0 -0
- package/dist/font.js +6 -6
- package/dist/form.js +28 -26
- package/dist/icon.js +55 -47
- package/dist/index.js +1 -1
- package/dist/input.js +65 -49
- package/dist/inputnumber.js +59 -39
- package/dist/layout.js +25 -25
- package/dist/list.js +17 -17
- package/dist/loading.js +21 -8
- package/dist/mds-ui.min.css +3 -3
- package/dist/mds-ui.min.js +19183 -15407
- package/dist/menu.js +31 -31
- package/dist/message.js +773 -24
- package/dist/modal.js +1146 -307
- package/dist/notification.js +27 -27
- package/dist/pagination.js +78 -55
- package/dist/popconfirm.js +36 -36
- package/dist/popover.js +2778 -48
- package/dist/progress.js +107 -65
- package/dist/radio.js +56 -54
- package/dist/rate.js +67 -59
- package/dist/row.js +14 -14
- package/dist/select.js +847 -503
- package/dist/slider.js +25 -25
- package/dist/slottable.js +2663 -129
- package/dist/steps.js +18 -18
- package/dist/style/affix.css +224 -2
- package/dist/style/anchor.css +224 -2
- package/dist/style/avatar.css +224 -2
- package/dist/style/badge.css +224 -2
- package/dist/style/bordershadow.css +236 -59
- package/dist/style/breadcrumb.css +224 -2
- package/dist/style/button.css +234 -5
- package/dist/style/card.css +224 -2
- package/dist/style/carousel.css +224 -2
- package/dist/style/cascader.css +214 -0
- package/dist/style/cascaderpanel.css +13 -16
- package/dist/style/checkbox.css +230 -8
- package/dist/style/col.css +225 -3
- package/dist/style/collapse.css +224 -2
- package/dist/style/color.css +224 -2
- package/dist/style/datepicker.css +236 -2
- package/dist/style/divider.css +227 -2
- package/dist/style/drawer.css +224 -2
- package/dist/style/dropdown.css +234 -5
- package/dist/style/empty.css +224 -2
- package/dist/style/font.css +226 -4
- package/dist/style/form.css +224 -2
- package/dist/style/icon.css +226 -3
- package/dist/style/input.css +231 -5
- package/dist/style/inputnumber.css +224 -2
- package/dist/style/layout.css +224 -2
- package/dist/style/list.css +224 -2
- package/dist/style/loading.css +2527 -2
- package/dist/style/menu.css +340 -129
- package/dist/style/message.css +1 -4
- package/dist/style/modal.css +247 -25
- package/dist/style/notification.css +224 -2
- package/dist/style/pagination.css +236 -7
- package/dist/style/popconfirm.css +334 -180
- package/dist/style/popover.css +324 -177
- package/dist/style/progress.css +226 -3
- package/dist/style/radio.css +225 -3
- package/dist/style/rate.css +226 -3
- package/dist/style/row.css +225 -3
- package/dist/style/select.css +240 -12
- package/dist/style/slider.css +224 -2
- package/dist/style/slottable.css +350 -149
- package/dist/style/steps.css +224 -2
- package/dist/style/switch.css +224 -2
- package/dist/style/table.css +458 -314
- package/dist/style/tabs.css +225 -18
- package/dist/style/tag.css +224 -2
- package/dist/style/text.css +224 -2
- package/dist/style/timeline.css +224 -2
- package/dist/style/timepicker.css +231 -6
- package/dist/style/tooltip.css +340 -129
- package/dist/style/tree.css +228 -6
- package/dist/style/typography.css +224 -2
- package/dist/style/upload.css +224 -2
- package/dist/switch.js +20 -20
- package/dist/table.js +3071 -201
- package/dist/tabs.js +24 -22
- package/dist/tag.js +17 -23
- package/dist/text.js +38 -22
- package/dist/timeline.js +14 -14
- package/dist/timepicker.js +3063 -172
- package/dist/tooltip.js +2550 -27
- package/dist/transfer.js +28 -28
- package/dist/transition.js +6 -6
- package/dist/tree.js +316 -171
- package/dist/typography.js +6 -6
- package/dist/upload.js +46 -38
- package/package.json +9 -5
package/dist/tree.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
var a = typeof exports === 'object' ? factory(require("./icon"), require("./transition"), require("./checkbox")) : factory(root["./icon"], root["./transition"], root["./checkbox"]);
|
|
8
8
|
for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
|
|
9
9
|
}
|
|
10
|
-
})(window, function(
|
|
10
|
+
})(window, function(__WEBPACK_EXTERNAL_MODULE__8__, __WEBPACK_EXTERNAL_MODULE__11__, __WEBPACK_EXTERNAL_MODULE__36__) {
|
|
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 =
|
|
94
|
+
/******/ return __webpack_require__(__webpack_require__.s = 100);
|
|
95
95
|
/******/ })
|
|
96
96
|
/************************************************************************/
|
|
97
97
|
/******/ ({
|
|
@@ -203,77 +203,7 @@ function normalizeComponent (
|
|
|
203
203
|
|
|
204
204
|
/***/ }),
|
|
205
205
|
|
|
206
|
-
/***/
|
|
207
|
-
/***/ (function(module, exports) {
|
|
208
|
-
|
|
209
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE__13__;
|
|
210
|
-
|
|
211
|
-
/***/ }),
|
|
212
|
-
|
|
213
|
-
/***/ 131:
|
|
214
|
-
/***/ (function(module, exports) {
|
|
215
|
-
|
|
216
|
-
// removed by extract-text-webpack-plugin
|
|
217
|
-
|
|
218
|
-
/***/ }),
|
|
219
|
-
|
|
220
|
-
/***/ 20:
|
|
221
|
-
/***/ (function(module, exports) {
|
|
222
|
-
|
|
223
|
-
module.exports = require("babel-runtime/core-js/get-iterator");
|
|
224
|
-
|
|
225
|
-
/***/ }),
|
|
226
|
-
|
|
227
|
-
/***/ 227:
|
|
228
|
-
/***/ (function(module, exports) {
|
|
229
|
-
|
|
230
|
-
// removed by extract-text-webpack-plugin
|
|
231
|
-
|
|
232
|
-
/***/ }),
|
|
233
|
-
|
|
234
|
-
/***/ 26:
|
|
235
|
-
/***/ (function(module, exports) {
|
|
236
|
-
|
|
237
|
-
module.exports = require("babel-runtime/helpers/classCallCheck");
|
|
238
|
-
|
|
239
|
-
/***/ }),
|
|
240
|
-
|
|
241
|
-
/***/ 27:
|
|
242
|
-
/***/ (function(module, exports) {
|
|
243
|
-
|
|
244
|
-
module.exports = require("babel-runtime/helpers/createClass");
|
|
245
|
-
|
|
246
|
-
/***/ }),
|
|
247
|
-
|
|
248
|
-
/***/ 28:
|
|
249
|
-
/***/ (function(module, exports) {
|
|
250
|
-
|
|
251
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE__28__;
|
|
252
|
-
|
|
253
|
-
/***/ }),
|
|
254
|
-
|
|
255
|
-
/***/ 4:
|
|
256
|
-
/***/ (function(module, exports) {
|
|
257
|
-
|
|
258
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE__4__;
|
|
259
|
-
|
|
260
|
-
/***/ }),
|
|
261
|
-
|
|
262
|
-
/***/ 40:
|
|
263
|
-
/***/ (function(module, exports) {
|
|
264
|
-
|
|
265
|
-
module.exports = require("babel-runtime/core-js/map");
|
|
266
|
-
|
|
267
|
-
/***/ }),
|
|
268
|
-
|
|
269
|
-
/***/ 8:
|
|
270
|
-
/***/ (function(module, exports) {
|
|
271
|
-
|
|
272
|
-
module.exports = require("babel-runtime/helpers/typeof");
|
|
273
|
-
|
|
274
|
-
/***/ }),
|
|
275
|
-
|
|
276
|
-
/***/ 92:
|
|
206
|
+
/***/ 100:
|
|
277
207
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
278
208
|
|
|
279
209
|
"use strict";
|
|
@@ -281,10 +211,10 @@ module.exports = require("babel-runtime/helpers/typeof");
|
|
|
281
211
|
__webpack_require__.r(__webpack_exports__);
|
|
282
212
|
|
|
283
213
|
// EXTERNAL MODULE: ./components/style/index.less
|
|
284
|
-
var style = __webpack_require__(
|
|
214
|
+
var style = __webpack_require__(139);
|
|
285
215
|
|
|
286
216
|
// EXTERNAL MODULE: ./components/tree/style/index.less
|
|
287
|
-
var tree_style = __webpack_require__(
|
|
217
|
+
var tree_style = __webpack_require__(236);
|
|
288
218
|
|
|
289
219
|
// CONCATENATED MODULE: ./components/tree/style/index.js
|
|
290
220
|
|
|
@@ -300,17 +230,41 @@ var render = function () {
|
|
|
300
230
|
[
|
|
301
231
|
_vm._l(_vm.root.childNodes, function (item) {
|
|
302
232
|
return _c("mds-tree-item", {
|
|
233
|
+
directives: [
|
|
234
|
+
{
|
|
235
|
+
name: "show",
|
|
236
|
+
rawName: "v-show",
|
|
237
|
+
value: !_vm.isEmpty,
|
|
238
|
+
expression: "!isEmpty",
|
|
239
|
+
},
|
|
240
|
+
],
|
|
303
241
|
key: _vm.getNodeKey(item),
|
|
304
|
-
attrs: {
|
|
242
|
+
attrs: {
|
|
243
|
+
node: item,
|
|
244
|
+
checkboxDisplay: _vm.checkboxDisplay,
|
|
245
|
+
checkTotalLine: _vm.checkTotalLine,
|
|
246
|
+
},
|
|
305
247
|
})
|
|
306
248
|
}),
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
249
|
+
_c(
|
|
250
|
+
"div",
|
|
251
|
+
{
|
|
252
|
+
directives: [
|
|
253
|
+
{
|
|
254
|
+
name: "show",
|
|
255
|
+
rawName: "v-show",
|
|
256
|
+
value: _vm.isEmpty,
|
|
257
|
+
expression: "isEmpty",
|
|
258
|
+
},
|
|
259
|
+
],
|
|
260
|
+
staticClass: "mds-tree-empty-wrapper",
|
|
261
|
+
},
|
|
262
|
+
[
|
|
263
|
+
_c("div", { staticClass: "mds-tree-empty-text" }, [
|
|
264
|
+
_vm._v(_vm._s(_vm.emptyText)),
|
|
265
|
+
]),
|
|
266
|
+
]
|
|
267
|
+
),
|
|
314
268
|
],
|
|
315
269
|
2
|
|
316
270
|
)
|
|
@@ -322,23 +276,23 @@ render._withStripped = true
|
|
|
322
276
|
// CONCATENATED MODULE: ./components/tree/tree.vue?vue&type=template&id=e2198d78&
|
|
323
277
|
|
|
324
278
|
// EXTERNAL MODULE: external "babel-runtime/core-js/get-iterator"
|
|
325
|
-
var get_iterator_ = __webpack_require__(
|
|
279
|
+
var get_iterator_ = __webpack_require__(23);
|
|
326
280
|
var get_iterator_default = /*#__PURE__*/__webpack_require__.n(get_iterator_);
|
|
327
281
|
|
|
328
282
|
// EXTERNAL MODULE: external "babel-runtime/core-js/map"
|
|
329
|
-
var map_ = __webpack_require__(
|
|
283
|
+
var map_ = __webpack_require__(30);
|
|
330
284
|
var map_default = /*#__PURE__*/__webpack_require__.n(map_);
|
|
331
285
|
|
|
332
286
|
// EXTERNAL MODULE: external "babel-runtime/helpers/typeof"
|
|
333
|
-
var typeof_ = __webpack_require__(
|
|
287
|
+
var typeof_ = __webpack_require__(9);
|
|
334
288
|
var typeof_default = /*#__PURE__*/__webpack_require__.n(typeof_);
|
|
335
289
|
|
|
336
290
|
// EXTERNAL MODULE: external "babel-runtime/helpers/classCallCheck"
|
|
337
|
-
var classCallCheck_ = __webpack_require__(
|
|
291
|
+
var classCallCheck_ = __webpack_require__(34);
|
|
338
292
|
var classCallCheck_default = /*#__PURE__*/__webpack_require__.n(classCallCheck_);
|
|
339
293
|
|
|
340
294
|
// EXTERNAL MODULE: external "babel-runtime/helpers/createClass"
|
|
341
|
-
var createClass_ = __webpack_require__(
|
|
295
|
+
var createClass_ = __webpack_require__(35);
|
|
342
296
|
var createClass_default = /*#__PURE__*/__webpack_require__.n(createClass_);
|
|
343
297
|
|
|
344
298
|
// CONCATENATED MODULE: ./components/_util/tree/node.js
|
|
@@ -360,6 +314,8 @@ var node_Node = function () {
|
|
|
360
314
|
|
|
361
315
|
// 是否显示,用于搜索
|
|
362
316
|
this.visible = true;
|
|
317
|
+
// 搜索关键字,用于标记高亮
|
|
318
|
+
this.searchWords = null;
|
|
363
319
|
|
|
364
320
|
for (var name in options) {
|
|
365
321
|
if (options.hasOwnProperty(name)) {
|
|
@@ -854,7 +810,11 @@ var tree_Tree = function () {
|
|
|
854
810
|
var recursionChildren = function recursionChildren(node) {
|
|
855
811
|
var childNodes = node.root ? node.root.childNodes : node.childNodes;
|
|
856
812
|
childNodes.forEach(function (item) {
|
|
813
|
+
item.searchWords = null;
|
|
857
814
|
item.visible = _this3.searchNodeMethod.call(item, value, item.data, item);
|
|
815
|
+
if (item.visible) {
|
|
816
|
+
item.searchWords = value;
|
|
817
|
+
}
|
|
858
818
|
recursionChildren(item);
|
|
859
819
|
});
|
|
860
820
|
|
|
@@ -872,7 +832,7 @@ var tree_Tree = function () {
|
|
|
872
832
|
}
|
|
873
833
|
|
|
874
834
|
// 节点显示的情况下展开所有子节点
|
|
875
|
-
if (node.visible && !node.isLeaf && !_this3.load) {
|
|
835
|
+
if (node.visible && !node.isLeaf && !_this3.load && value) {
|
|
876
836
|
node.changeExpanded(true);
|
|
877
837
|
}
|
|
878
838
|
};
|
|
@@ -924,18 +884,50 @@ var tree_Tree = function () {
|
|
|
924
884
|
if (!Array.isArray(checkArr)) {
|
|
925
885
|
throw new Error('需要输入一个key数组');
|
|
926
886
|
}
|
|
927
|
-
|
|
928
|
-
_this4.nodesMap.
|
|
929
|
-
|
|
887
|
+
var exec = function exec() {
|
|
888
|
+
_this4.nodesMap.forEach(function (item) {
|
|
889
|
+
item.check = false;
|
|
890
|
+
});
|
|
891
|
+
checkArr.forEach(function (item) {
|
|
892
|
+
_this4.nodesMap.get(item).check = true;
|
|
893
|
+
});
|
|
894
|
+
};
|
|
895
|
+
window.requestAnimationFrame(exec);
|
|
930
896
|
}
|
|
931
897
|
}, {
|
|
932
898
|
key: 'setChecked',
|
|
933
899
|
value: function setChecked(key, checkState) {
|
|
934
|
-
var
|
|
935
|
-
|
|
936
|
-
|
|
900
|
+
var _this5 = this;
|
|
901
|
+
|
|
902
|
+
// 分{key, check}数组和单独传入key两种形式
|
|
903
|
+
var is = function is(val, type) {
|
|
904
|
+
var res = Object.prototype.toString.call(val);
|
|
905
|
+
return res.includes(type);
|
|
906
|
+
};
|
|
907
|
+
|
|
908
|
+
var checkNode = function checkNode(_key, _checkState) {
|
|
909
|
+
var node = _this5.nodesMap.get(_key);
|
|
910
|
+
if (!node) {
|
|
911
|
+
throw new Error('请输入正确的key');
|
|
912
|
+
}
|
|
913
|
+
node.check = _checkState;
|
|
914
|
+
};
|
|
915
|
+
|
|
916
|
+
if (is(key, 'String') && is(checkState, 'Boolean')) {
|
|
917
|
+
checkNode(key, checkState);
|
|
918
|
+
return;
|
|
919
|
+
}
|
|
920
|
+
if (is(key, 'Array') && !checkState) {
|
|
921
|
+
var exec = function exec() {
|
|
922
|
+
key.forEach(function (_ref) {
|
|
923
|
+
var key = _ref.key,
|
|
924
|
+
check = _ref.check;
|
|
925
|
+
|
|
926
|
+
checkNode(key, check);
|
|
927
|
+
});
|
|
928
|
+
};
|
|
929
|
+
window.requestAnimationFrame(exec);
|
|
937
930
|
}
|
|
938
|
-
node.check = checkState;
|
|
939
931
|
}
|
|
940
932
|
}, {
|
|
941
933
|
key: 'getHalfCheckedNodes',
|
|
@@ -1103,14 +1095,14 @@ var tree_Tree = function () {
|
|
|
1103
1095
|
}, {
|
|
1104
1096
|
key: 'getCheckNodeTree',
|
|
1105
1097
|
value: function getCheckNodeTree() {
|
|
1106
|
-
var
|
|
1098
|
+
var _this6 = this;
|
|
1107
1099
|
|
|
1108
1100
|
var root = this.root;
|
|
1109
1101
|
|
|
1110
1102
|
if (Array.isArray(root.data)) {
|
|
1111
1103
|
var newTree = [];
|
|
1112
1104
|
root.indeterminateChildNodes.forEach(function (item) {
|
|
1113
|
-
newTree.push(copyNode(item,
|
|
1105
|
+
newTree.push(copyNode(item, _this6));
|
|
1114
1106
|
});
|
|
1115
1107
|
return newTree;
|
|
1116
1108
|
} else {
|
|
@@ -1135,13 +1127,13 @@ var tree_Tree = function () {
|
|
|
1135
1127
|
}
|
|
1136
1128
|
}
|
|
1137
1129
|
}, {
|
|
1138
|
-
key: '
|
|
1139
|
-
value: function
|
|
1140
|
-
var
|
|
1130
|
+
key: 'deleteNodeByKey',
|
|
1131
|
+
value: function deleteNodeByKey(keys) {
|
|
1132
|
+
var _this7 = this;
|
|
1141
1133
|
|
|
1142
1134
|
if (Array.isArray(keys)) {
|
|
1143
1135
|
keys.forEach(function (item) {
|
|
1144
|
-
var node =
|
|
1136
|
+
var node = _this7.nodesMap.get(item);
|
|
1145
1137
|
if (node) node.remove();
|
|
1146
1138
|
});
|
|
1147
1139
|
} else {
|
|
@@ -1149,6 +1141,14 @@ var tree_Tree = function () {
|
|
|
1149
1141
|
node.remove();
|
|
1150
1142
|
}
|
|
1151
1143
|
}
|
|
1144
|
+
}, {
|
|
1145
|
+
key: 'clearCheckNode',
|
|
1146
|
+
value: function clearCheckNode() {
|
|
1147
|
+
this.nodesMap.forEach(function (item) {
|
|
1148
|
+
item.checked = false;
|
|
1149
|
+
item.indeterminate = false;
|
|
1150
|
+
});
|
|
1151
|
+
}
|
|
1152
1152
|
}]);
|
|
1153
1153
|
|
|
1154
1154
|
return Tree;
|
|
@@ -1177,6 +1177,7 @@ var copyNode = function copyNode(node, tree) {
|
|
|
1177
1177
|
});
|
|
1178
1178
|
return newData;
|
|
1179
1179
|
};
|
|
1180
|
+
|
|
1180
1181
|
// const deepCopy = function(o) {
|
|
1181
1182
|
// if (o instanceof Array) {
|
|
1182
1183
|
// let n = []
|
|
@@ -1201,23 +1202,27 @@ var tree_itemvue_type_template_id_7faeb42c_render = function () {
|
|
|
1201
1202
|
var _c = _vm._self._c || _h
|
|
1202
1203
|
return _c(
|
|
1203
1204
|
"div",
|
|
1204
|
-
{
|
|
1205
|
+
{
|
|
1206
|
+
directives: [
|
|
1207
|
+
{
|
|
1208
|
+
name: "show",
|
|
1209
|
+
rawName: "v-show",
|
|
1210
|
+
value: _vm.node.visible,
|
|
1211
|
+
expression: "node.visible",
|
|
1212
|
+
},
|
|
1213
|
+
],
|
|
1214
|
+
staticClass: "mds-tree-item",
|
|
1215
|
+
on: { click: _vm.handleCheckTotalLine },
|
|
1216
|
+
},
|
|
1205
1217
|
[
|
|
1206
1218
|
_c(
|
|
1207
1219
|
"div",
|
|
1208
1220
|
{
|
|
1209
|
-
directives: [
|
|
1210
|
-
{
|
|
1211
|
-
name: "show",
|
|
1212
|
-
rawName: "v-show",
|
|
1213
|
-
value: _vm.node.visible,
|
|
1214
|
-
expression: "node.visible",
|
|
1215
|
-
},
|
|
1216
|
-
],
|
|
1217
1221
|
class: {
|
|
1218
1222
|
"mds-tree-content": true,
|
|
1219
|
-
"mds-tree-active": _vm.node.selected,
|
|
1223
|
+
"mds-tree-active": this.checkTotalLine ? false : _vm.node.selected,
|
|
1220
1224
|
},
|
|
1225
|
+
style: { "padding-left": (_vm.node.level - 1) * 15 + "px" },
|
|
1221
1226
|
on: {
|
|
1222
1227
|
mouseenter: _vm.contentEnter,
|
|
1223
1228
|
mouseleave: _vm.contentLeave,
|
|
@@ -1247,13 +1252,19 @@ var tree_itemvue_type_template_id_7faeb42c_render = function () {
|
|
|
1247
1252
|
},
|
|
1248
1253
|
[
|
|
1249
1254
|
!_vm.node.isLeaf
|
|
1250
|
-
? _c(
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1255
|
+
? _c(
|
|
1256
|
+
"span",
|
|
1257
|
+
{ staticClass: "mds-tree-expand-content" },
|
|
1258
|
+
[
|
|
1259
|
+
_c("mds-icon", {
|
|
1260
|
+
class: { "mds-tree-trans": !_vm.node.expanded },
|
|
1261
|
+
attrs: { type: "fill-solid-down" },
|
|
1262
|
+
}),
|
|
1263
|
+
],
|
|
1264
|
+
1
|
|
1265
|
+
)
|
|
1254
1266
|
: _vm._e(),
|
|
1255
|
-
]
|
|
1256
|
-
1
|
|
1267
|
+
]
|
|
1257
1268
|
),
|
|
1258
1269
|
_c("mds-icon", {
|
|
1259
1270
|
directives: [
|
|
@@ -1267,53 +1278,64 @@ var tree_itemvue_type_template_id_7faeb42c_render = function () {
|
|
|
1267
1278
|
staticClass: "mds-tree-loading",
|
|
1268
1279
|
attrs: { type: "line-sync", spin: "" },
|
|
1269
1280
|
}),
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1281
|
+
_vm.checkboxDisplay
|
|
1282
|
+
? [
|
|
1283
|
+
_c(
|
|
1284
|
+
"label",
|
|
1285
|
+
{ staticClass: "mds-tree-checkbox" },
|
|
1286
|
+
[
|
|
1287
|
+
_c("mds-checkbox", {
|
|
1288
|
+
attrs: {
|
|
1289
|
+
indeterminate: _vm.node.indeterminate,
|
|
1290
|
+
disabled: _vm.node.disabled,
|
|
1291
|
+
},
|
|
1292
|
+
on: { change: _vm.handleCheck },
|
|
1293
|
+
nativeOn: {
|
|
1294
|
+
click: function ($event) {
|
|
1295
|
+
$event.stopPropagation()
|
|
1296
|
+
},
|
|
1297
|
+
},
|
|
1298
|
+
model: {
|
|
1299
|
+
value: _vm.node.check,
|
|
1300
|
+
callback: function ($$v) {
|
|
1301
|
+
_vm.$set(_vm.node, "check", $$v)
|
|
1302
|
+
},
|
|
1303
|
+
expression: "node.check",
|
|
1304
|
+
},
|
|
1305
|
+
}),
|
|
1306
|
+
],
|
|
1307
|
+
1
|
|
1308
|
+
),
|
|
1309
|
+
_c(
|
|
1310
|
+
"div",
|
|
1311
|
+
{ staticClass: "mds-tree-label-wrapper" },
|
|
1312
|
+
[
|
|
1313
|
+
_c(
|
|
1314
|
+
"label-content",
|
|
1315
|
+
_vm._b({}, "label-content", _vm.$props, false)
|
|
1316
|
+
),
|
|
1317
|
+
],
|
|
1318
|
+
1
|
|
1319
|
+
),
|
|
1320
|
+
]
|
|
1321
|
+
: [
|
|
1322
|
+
_c(
|
|
1323
|
+
"div",
|
|
1324
|
+
{
|
|
1325
|
+
staticClass: "mds-tree-label-wrapper",
|
|
1326
|
+
on: { click: _vm.handleCheck },
|
|
1302
1327
|
},
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
[_c("label-content", { attrs: { node: _vm.node } })],
|
|
1313
|
-
1
|
|
1314
|
-
),
|
|
1328
|
+
[
|
|
1329
|
+
_c(
|
|
1330
|
+
"label-content",
|
|
1331
|
+
_vm._b({}, "label-content", _vm.$props, false)
|
|
1332
|
+
),
|
|
1333
|
+
],
|
|
1334
|
+
1
|
|
1335
|
+
),
|
|
1336
|
+
],
|
|
1315
1337
|
],
|
|
1316
|
-
|
|
1338
|
+
2
|
|
1317
1339
|
),
|
|
1318
1340
|
_c("div", {
|
|
1319
1341
|
class: {
|
|
@@ -1336,6 +1358,7 @@ var tree_itemvue_type_template_id_7faeb42c_render = function () {
|
|
|
1336
1358
|
attrs: {
|
|
1337
1359
|
checkboxDisplay: _vm.checkboxDisplay,
|
|
1338
1360
|
node: item,
|
|
1361
|
+
checkTotalLine: _vm.checkTotalLine,
|
|
1339
1362
|
},
|
|
1340
1363
|
})
|
|
1341
1364
|
}),
|
|
@@ -1356,15 +1379,15 @@ tree_itemvue_type_template_id_7faeb42c_render._withStripped = true
|
|
|
1356
1379
|
// CONCATENATED MODULE: ./components/tree/tree-item.vue?vue&type=template&id=7faeb42c&
|
|
1357
1380
|
|
|
1358
1381
|
// EXTERNAL MODULE: external "./icon"
|
|
1359
|
-
var external_icon_ = __webpack_require__(
|
|
1382
|
+
var external_icon_ = __webpack_require__(8);
|
|
1360
1383
|
var external_icon_default = /*#__PURE__*/__webpack_require__.n(external_icon_);
|
|
1361
1384
|
|
|
1362
1385
|
// EXTERNAL MODULE: external "./checkbox"
|
|
1363
|
-
var external_checkbox_ = __webpack_require__(
|
|
1386
|
+
var external_checkbox_ = __webpack_require__(36);
|
|
1364
1387
|
var external_checkbox_default = /*#__PURE__*/__webpack_require__.n(external_checkbox_);
|
|
1365
1388
|
|
|
1366
1389
|
// EXTERNAL MODULE: external "./transition"
|
|
1367
|
-
var external_transition_ = __webpack_require__(
|
|
1390
|
+
var external_transition_ = __webpack_require__(11);
|
|
1368
1391
|
var external_transition_default = /*#__PURE__*/__webpack_require__.n(external_transition_);
|
|
1369
1392
|
|
|
1370
1393
|
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./components/tree/tree-item.vue?vue&type=script&lang=js&
|
|
@@ -1432,6 +1455,18 @@ var external_transition_default = /*#__PURE__*/__webpack_require__.n(external_tr
|
|
|
1432
1455
|
//
|
|
1433
1456
|
//
|
|
1434
1457
|
//
|
|
1458
|
+
//
|
|
1459
|
+
//
|
|
1460
|
+
//
|
|
1461
|
+
//
|
|
1462
|
+
//
|
|
1463
|
+
//
|
|
1464
|
+
//
|
|
1465
|
+
//
|
|
1466
|
+
//
|
|
1467
|
+
//
|
|
1468
|
+
//
|
|
1469
|
+
//
|
|
1435
1470
|
|
|
1436
1471
|
|
|
1437
1472
|
|
|
@@ -1445,7 +1480,34 @@ var external_transition_default = /*#__PURE__*/__webpack_require__.n(external_tr
|
|
|
1445
1480
|
MdsCheckbox: external_checkbox_default.a,
|
|
1446
1481
|
MdsTransition: external_transition_default.a,
|
|
1447
1482
|
labelContent: {
|
|
1448
|
-
props: ['node'],
|
|
1483
|
+
props: ['node', 'checkTotalLine'],
|
|
1484
|
+
methods: {
|
|
1485
|
+
highlightLabel: function highlightLabel() {
|
|
1486
|
+
var h = this.$createElement;
|
|
1487
|
+
var _node = this.node,
|
|
1488
|
+
searchWords = _node.searchWords,
|
|
1489
|
+
label = _node.label;
|
|
1490
|
+
|
|
1491
|
+
var index = label.indexOf(searchWords);
|
|
1492
|
+
if (index > -1) {
|
|
1493
|
+
var reg = new RegExp('(' + searchWords + ')', 'g');
|
|
1494
|
+
var tempArr = label.split(reg);
|
|
1495
|
+
return tempArr.map(function (el) {
|
|
1496
|
+
if (el === searchWords) {
|
|
1497
|
+
return h(
|
|
1498
|
+
'span',
|
|
1499
|
+
{ 'class': 'mds-tree-label-highlight' },
|
|
1500
|
+
[el]
|
|
1501
|
+
);
|
|
1502
|
+
} else {
|
|
1503
|
+
return el;
|
|
1504
|
+
}
|
|
1505
|
+
});
|
|
1506
|
+
} else {
|
|
1507
|
+
return this.node.label;
|
|
1508
|
+
}
|
|
1509
|
+
}
|
|
1510
|
+
},
|
|
1449
1511
|
render: function render() {
|
|
1450
1512
|
var h = arguments[0];
|
|
1451
1513
|
|
|
@@ -1454,15 +1516,16 @@ var external_transition_default = /*#__PURE__*/__webpack_require__.n(external_tr
|
|
|
1454
1516
|
if (slot) {
|
|
1455
1517
|
return slot(node);
|
|
1456
1518
|
}
|
|
1519
|
+
|
|
1457
1520
|
return h(
|
|
1458
1521
|
'label',
|
|
1459
1522
|
{
|
|
1460
1523
|
'class': {
|
|
1461
1524
|
'mds-tree-label': true,
|
|
1462
|
-
'mds-tree-active-label': node.selected
|
|
1525
|
+
'mds-tree-active-label': this.checkTotalLine ? false : node.selected
|
|
1463
1526
|
}
|
|
1464
1527
|
},
|
|
1465
|
-
[node.label]
|
|
1528
|
+
[node.searchWords ? this.highlightLabel() : node.label]
|
|
1466
1529
|
);
|
|
1467
1530
|
}
|
|
1468
1531
|
}
|
|
@@ -1472,7 +1535,8 @@ var external_transition_default = /*#__PURE__*/__webpack_require__.n(external_tr
|
|
|
1472
1535
|
type: Object,
|
|
1473
1536
|
required: true
|
|
1474
1537
|
},
|
|
1475
|
-
checkboxDisplay: Boolean
|
|
1538
|
+
checkboxDisplay: Boolean,
|
|
1539
|
+
checkTotalLine: Boolean
|
|
1476
1540
|
},
|
|
1477
1541
|
data: function data() {
|
|
1478
1542
|
return {
|
|
@@ -1488,6 +1552,13 @@ var external_transition_default = /*#__PURE__*/__webpack_require__.n(external_tr
|
|
|
1488
1552
|
}
|
|
1489
1553
|
},
|
|
1490
1554
|
methods: {
|
|
1555
|
+
// 处理有checkbox时需要选中整行的情况
|
|
1556
|
+
handleCheckTotalLine: function handleCheckTotalLine() {
|
|
1557
|
+
if (this.checkTotalLine) {
|
|
1558
|
+
this.node.check = !this.node.check;
|
|
1559
|
+
this.handleCheck(this.node.check);
|
|
1560
|
+
}
|
|
1561
|
+
},
|
|
1491
1562
|
expanded: function expanded() {
|
|
1492
1563
|
this.node.changeExpanded(!this.node.expanded);
|
|
1493
1564
|
var expandOrCollapse = void 0;
|
|
@@ -1511,6 +1582,7 @@ var external_transition_default = /*#__PURE__*/__webpack_require__.n(external_tr
|
|
|
1511
1582
|
handleClick: function handleClick() {
|
|
1512
1583
|
this.node.tree.handleSelectedChange(this.node.key);
|
|
1513
1584
|
this.$tree.$emit('node-click', this.node.data, this.node, this.node.getPath(), this.node.getPath(true));
|
|
1585
|
+
this.handleCheckTotalLine();
|
|
1514
1586
|
},
|
|
1515
1587
|
handleContextMenu: function handleContextMenu(e) {
|
|
1516
1588
|
this.$tree.$emit('node-contextmenu', e, this.node.data, this.node, this.node.getPath(), this.node.getPath(true));
|
|
@@ -1687,6 +1759,8 @@ component.options.__file = "components/tree/tree-item.vue"
|
|
|
1687
1759
|
//
|
|
1688
1760
|
//
|
|
1689
1761
|
//
|
|
1762
|
+
//
|
|
1763
|
+
//
|
|
1690
1764
|
|
|
1691
1765
|
|
|
1692
1766
|
|
|
@@ -1729,7 +1803,8 @@ component.options.__file = "components/tree/tree-item.vue"
|
|
|
1729
1803
|
emptyText: {
|
|
1730
1804
|
type: String,
|
|
1731
1805
|
default: '暂无数据'
|
|
1732
|
-
}
|
|
1806
|
+
},
|
|
1807
|
+
checkTotalLine: Boolean // 有checkbox时是否点击整行元素都响应
|
|
1733
1808
|
},
|
|
1734
1809
|
computed: {
|
|
1735
1810
|
isEmpty: function isEmpty() {
|
|
@@ -1860,6 +1935,76 @@ tree.install = function (Vue) {
|
|
|
1860
1935
|
};
|
|
1861
1936
|
/* harmony default export */ var components_tree = __webpack_exports__["default"] = (tree);
|
|
1862
1937
|
|
|
1938
|
+
/***/ }),
|
|
1939
|
+
|
|
1940
|
+
/***/ 11:
|
|
1941
|
+
/***/ (function(module, exports) {
|
|
1942
|
+
|
|
1943
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__11__;
|
|
1944
|
+
|
|
1945
|
+
/***/ }),
|
|
1946
|
+
|
|
1947
|
+
/***/ 139:
|
|
1948
|
+
/***/ (function(module, exports) {
|
|
1949
|
+
|
|
1950
|
+
// removed by extract-text-webpack-plugin
|
|
1951
|
+
|
|
1952
|
+
/***/ }),
|
|
1953
|
+
|
|
1954
|
+
/***/ 23:
|
|
1955
|
+
/***/ (function(module, exports) {
|
|
1956
|
+
|
|
1957
|
+
module.exports = require("babel-runtime/core-js/get-iterator");
|
|
1958
|
+
|
|
1959
|
+
/***/ }),
|
|
1960
|
+
|
|
1961
|
+
/***/ 236:
|
|
1962
|
+
/***/ (function(module, exports) {
|
|
1963
|
+
|
|
1964
|
+
// removed by extract-text-webpack-plugin
|
|
1965
|
+
|
|
1966
|
+
/***/ }),
|
|
1967
|
+
|
|
1968
|
+
/***/ 30:
|
|
1969
|
+
/***/ (function(module, exports) {
|
|
1970
|
+
|
|
1971
|
+
module.exports = require("babel-runtime/core-js/map");
|
|
1972
|
+
|
|
1973
|
+
/***/ }),
|
|
1974
|
+
|
|
1975
|
+
/***/ 34:
|
|
1976
|
+
/***/ (function(module, exports) {
|
|
1977
|
+
|
|
1978
|
+
module.exports = require("babel-runtime/helpers/classCallCheck");
|
|
1979
|
+
|
|
1980
|
+
/***/ }),
|
|
1981
|
+
|
|
1982
|
+
/***/ 35:
|
|
1983
|
+
/***/ (function(module, exports) {
|
|
1984
|
+
|
|
1985
|
+
module.exports = require("babel-runtime/helpers/createClass");
|
|
1986
|
+
|
|
1987
|
+
/***/ }),
|
|
1988
|
+
|
|
1989
|
+
/***/ 36:
|
|
1990
|
+
/***/ (function(module, exports) {
|
|
1991
|
+
|
|
1992
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__36__;
|
|
1993
|
+
|
|
1994
|
+
/***/ }),
|
|
1995
|
+
|
|
1996
|
+
/***/ 8:
|
|
1997
|
+
/***/ (function(module, exports) {
|
|
1998
|
+
|
|
1999
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__8__;
|
|
2000
|
+
|
|
2001
|
+
/***/ }),
|
|
2002
|
+
|
|
2003
|
+
/***/ 9:
|
|
2004
|
+
/***/ (function(module, exports) {
|
|
2005
|
+
|
|
2006
|
+
module.exports = require("babel-runtime/helpers/typeof");
|
|
2007
|
+
|
|
1863
2008
|
/***/ })
|
|
1864
2009
|
|
|
1865
2010
|
/******/ });
|