xt-element-ui 2.1.72 → 2.2.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/lib/index.common.js +267 -61
- package/lib/index.css +1 -1
- package/lib/index.umd.js +267 -61
- package/lib/index.umd.min.js +1 -1
- package/lib/xt-badge/demo.html +10 -0
- package/lib/xt-badge/index.js +1 -0
- package/lib/xt-badge/xt-badge.common.js +335 -0
- package/lib/xt-badge/xt-badge.css +1 -0
- package/lib/xt-badge/xt-badge.umd.js +345 -0
- package/lib/xt-badge/xt-badge.umd.min.js +1 -0
- package/lib/xt-button/demo.html +10 -0
- package/lib/xt-button/index.js +1 -0
- package/lib/xt-button/xt-button.common.js +331 -0
- package/lib/xt-button/xt-button.css +1 -0
- package/lib/xt-button/xt-button.umd.js +341 -0
- package/lib/xt-button/xt-button.umd.min.js +1 -0
- package/lib/xt-card/demo.html +10 -0
- package/lib/xt-card/index.js +1 -0
- package/lib/xt-card/xt-card.common.js +325 -0
- package/lib/xt-card/xt-card.css +1 -0
- package/lib/xt-card/xt-card.umd.js +335 -0
- package/lib/xt-card/xt-card.umd.min.js +1 -0
- package/lib/xt-card-item/demo.html +10 -0
- package/lib/xt-card-item/index.js +1 -0
- package/lib/xt-card-item/xt-card-item.common.js +291 -0
- package/lib/xt-card-item/xt-card-item.css +1 -0
- package/lib/xt-card-item/xt-card-item.umd.js +301 -0
- package/lib/xt-card-item/xt-card-item.umd.min.js +1 -0
- package/lib/xt-chart/demo.html +10 -0
- package/lib/xt-chart/index.js +1 -0
- package/lib/xt-chart/xt-chart.common.js +109203 -0
- package/lib/xt-chart/xt-chart.css +1 -0
- package/lib/xt-chart/xt-chart.umd.js +109213 -0
- package/lib/xt-chart/xt-chart.umd.min.js +1 -0
- package/lib/xt-config-provider/demo.html +10 -0
- package/lib/xt-config-provider/index.js +1 -0
- package/lib/xt-config-provider/xt-config-provider.common.js +108388 -0
- package/lib/xt-config-provider/xt-config-provider.css +1 -0
- package/lib/xt-config-provider/xt-config-provider.umd.js +108398 -0
- package/lib/xt-config-provider/xt-config-provider.umd.min.js +1 -0
- package/lib/xt-date-picker/demo.html +10 -0
- package/lib/xt-date-picker/index.js +1 -0
- package/lib/xt-date-picker/xt-date-picker.common.js +768 -0
- package/lib/xt-date-picker/xt-date-picker.css +1 -0
- package/lib/xt-date-picker/xt-date-picker.umd.js +778 -0
- package/lib/xt-date-picker/xt-date-picker.umd.min.js +1 -0
- package/lib/xt-flex-box/demo.html +10 -0
- package/lib/xt-flex-box/index.js +1 -0
- package/lib/xt-flex-box/xt-flex-box.common.js +303 -0
- package/lib/xt-flex-box/xt-flex-box.css +1 -0
- package/lib/xt-flex-box/xt-flex-box.umd.js +313 -0
- package/lib/xt-flex-box/xt-flex-box.umd.min.js +1 -0
- package/lib/xt-form-schema/demo.html +10 -0
- package/lib/xt-form-schema/index.js +1 -0
- package/lib/xt-form-schema/xt-form-schema.common.js +510 -0
- package/lib/xt-form-schema/xt-form-schema.css +1 -0
- package/lib/xt-form-schema/xt-form-schema.umd.js +520 -0
- package/lib/xt-form-schema/xt-form-schema.umd.min.js +1 -0
- package/lib/xt-grid-box/demo.html +10 -0
- package/lib/xt-grid-box/index.js +1 -0
- package/lib/xt-grid-box/xt-grid-box.common.js +404 -0
- package/lib/xt-grid-box/xt-grid-box.css +1 -0
- package/lib/xt-grid-box/xt-grid-box.umd.js +414 -0
- package/lib/xt-grid-box/xt-grid-box.umd.min.js +1 -0
- package/lib/xt-grid-item/demo.html +10 -0
- package/lib/xt-grid-item/index.js +1 -0
- package/lib/xt-grid-item/xt-grid-item.common.js +381 -0
- package/lib/xt-grid-item/xt-grid-item.css +1 -0
- package/lib/xt-grid-item/xt-grid-item.umd.js +391 -0
- package/lib/xt-grid-item/xt-grid-item.umd.min.js +1 -0
- package/lib/xt-icon/demo.html +10 -0
- package/lib/xt-icon/index.js +1 -0
- package/lib/xt-icon/xt-icon.common.js +430 -0
- package/lib/xt-icon/xt-icon.css +1 -0
- package/lib/xt-icon/xt-icon.umd.js +440 -0
- package/lib/xt-icon/xt-icon.umd.min.js +1 -0
- package/lib/xt-input/demo.html +10 -0
- package/lib/xt-input/index.js +1 -0
- package/lib/xt-input/xt-input.common.js +584 -0
- package/lib/xt-input/xt-input.css +1 -0
- package/lib/xt-input/xt-input.umd.js +594 -0
- package/lib/xt-input/xt-input.umd.min.js +1 -0
- package/lib/xt-list/demo.html +10 -0
- package/lib/xt-list/index.js +1 -0
- package/lib/xt-list/xt-list.common.js +714 -0
- package/lib/xt-list/xt-list.css +1 -0
- package/lib/xt-list/xt-list.umd.js +724 -0
- package/lib/xt-list/xt-list.umd.min.js +1 -0
- package/lib/xt-map/demo.html +10 -0
- package/lib/xt-map/index.js +1 -0
- package/lib/xt-map/xt-map.common.js +1951 -0
- package/lib/xt-map/xt-map.css +1 -0
- package/lib/xt-map/xt-map.umd.js +1961 -0
- package/lib/xt-map/xt-map.umd.min.js +1 -0
- package/lib/xt-map-provider/demo.html +10 -0
- package/lib/xt-map-provider/index.js +1 -0
- package/lib/xt-map-provider/xt-map-provider.common.js +644 -0
- package/lib/xt-map-provider/xt-map-provider.css +1 -0
- package/lib/xt-map-provider/xt-map-provider.umd.js +654 -0
- package/lib/xt-map-provider/xt-map-provider.umd.min.js +1 -0
- package/lib/xt-page/demo.html +10 -0
- package/lib/xt-page/index.js +1 -0
- package/lib/xt-page/xt-page.common.js +353 -0
- package/lib/xt-page/xt-page.css +1 -0
- package/lib/xt-page/xt-page.umd.js +363 -0
- package/lib/xt-page/xt-page.umd.min.js +1 -0
- package/lib/xt-progress/demo.html +10 -0
- package/lib/xt-progress/index.js +1 -0
- package/lib/xt-progress/xt-progress.common.js +327 -0
- package/lib/xt-progress/xt-progress.css +1 -0
- package/lib/xt-progress/xt-progress.umd.js +337 -0
- package/lib/xt-progress/xt-progress.umd.min.js +1 -0
- package/lib/xt-scroll-arrow/demo.html +10 -0
- package/lib/xt-scroll-arrow/index.js +1 -0
- package/lib/xt-scroll-arrow/xt-scroll-arrow.common.js +495 -0
- package/lib/xt-scroll-arrow/xt-scroll-arrow.css +1 -0
- package/lib/xt-scroll-arrow/xt-scroll-arrow.umd.js +505 -0
- package/lib/xt-scroll-arrow/xt-scroll-arrow.umd.min.js +1 -0
- package/lib/xt-select-tree/demo.html +10 -0
- package/lib/xt-select-tree/index.js +1 -0
- package/lib/xt-select-tree/xt-select-tree.common.js +1791 -0
- package/lib/xt-select-tree/xt-select-tree.css +1 -0
- package/lib/xt-select-tree/xt-select-tree.umd.js +1801 -0
- package/lib/xt-select-tree/xt-select-tree.umd.min.js +1 -0
- package/lib/xt-step-price/demo.html +10 -0
- package/lib/xt-step-price/index.js +1 -0
- package/lib/xt-step-price/xt-step-price.common.js +800 -0
- package/lib/xt-step-price/xt-step-price.css +1 -0
- package/lib/xt-step-price/xt-step-price.umd.js +810 -0
- package/lib/xt-step-price/xt-step-price.umd.min.js +1 -0
- package/lib/xt-step-price-item/demo.html +10 -0
- package/lib/xt-step-price-item/index.js +1 -0
- package/lib/xt-step-price-item/xt-step-price-item.common.js +417 -0
- package/lib/xt-step-price-item/xt-step-price-item.umd.js +427 -0
- package/lib/xt-step-price-item/xt-step-price-item.umd.min.js +1 -0
- package/lib/xt-tab-pane/demo.html +10 -0
- package/lib/xt-tab-pane/index.js +1 -0
- package/lib/xt-tab-pane/xt-tab-pane.common.js +309 -0
- package/lib/xt-tab-pane/xt-tab-pane.umd.js +319 -0
- package/lib/xt-tab-pane/xt-tab-pane.umd.min.js +1 -0
- package/lib/xt-table/demo.html +10 -0
- package/lib/xt-table/index.js +1 -0
- package/lib/xt-table/xt-table.common.js +1027 -0
- package/lib/xt-table/xt-table.css +1 -0
- package/lib/xt-table/xt-table.umd.js +1037 -0
- package/lib/xt-table/xt-table.umd.min.js +1 -0
- package/lib/xt-tabs/demo.html +10 -0
- package/lib/xt-tabs/index.js +1 -0
- package/lib/xt-tabs/xt-tabs.common.js +463 -0
- package/lib/xt-tabs/xt-tabs.css +1 -0
- package/lib/xt-tabs/xt-tabs.umd.js +473 -0
- package/lib/xt-tabs/xt-tabs.umd.min.js +1 -0
- package/lib/xt-text/demo.html +10 -0
- package/lib/xt-text/index.js +1 -0
- package/lib/xt-text/xt-text.common.js +536 -0
- package/lib/xt-text/xt-text.css +1 -0
- package/lib/xt-text/xt-text.umd.js +546 -0
- package/lib/xt-text/xt-text.umd.min.js +1 -0
- package/lib/xt-time/demo.html +10 -0
- package/lib/xt-time/index.js +1 -0
- package/lib/xt-time/xt-time.common.js +555 -0
- package/lib/xt-time/xt-time.css +1 -0
- package/lib/xt-time/xt-time.umd.js +565 -0
- package/lib/xt-time/xt-time.umd.min.js +1 -0
- package/lib/xt-transfer-tree/demo.html +10 -0
- package/lib/xt-transfer-tree/index.js +1 -0
- package/lib/xt-transfer-tree/xt-transfer-tree.common.js +594 -0
- package/lib/xt-transfer-tree/xt-transfer-tree.css +1 -0
- package/lib/xt-transfer-tree/xt-transfer-tree.umd.js +604 -0
- package/lib/xt-transfer-tree/xt-transfer-tree.umd.min.js +1 -0
- package/lib/xt-upload/demo.html +10 -0
- package/lib/xt-upload/index.js +1 -0
- package/lib/xt-upload/xt-upload.common.js +1292 -0
- package/lib/xt-upload/xt-upload.css +1 -0
- package/lib/xt-upload/xt-upload.umd.js +1302 -0
- package/lib/xt-upload/xt-upload.umd.min.js +1 -0
- package/package.json +4 -2
- package/src/components/xt-badge/index.js +8 -7
- package/src/components/xt-button/index.js +1 -0
- package/src/components/xt-card/index.js +1 -0
- package/src/components/xt-card-item/index.js +1 -0
- package/src/components/xt-config-provider/index.js +1 -0
- package/src/components/xt-flex-box/index.js +1 -0
- package/src/components/xt-grid-box/index.js +1 -0
- package/src/components/xt-icon/index.js +1 -0
- package/src/components/xt-input/index.js +1 -0
- package/src/components/xt-map/index.js +1 -0
- package/src/components/xt-progress/index.js +8 -7
- package/src/components/xt-scroll-arrow/index.js +8 -7
- package/src/components/xt-step-price/index.js +1 -0
- package/src/components/xt-tabs/index.js +9 -8
- package/src/components/xt-text/index.js +1 -0
- package/src/components/xt-time/index.js +1 -0
- package/src/index.js +32 -2
|
@@ -0,0 +1,604 @@
|
|
|
1
|
+
(function webpackUniversalModuleDefinition(root, factory) {
|
|
2
|
+
if(typeof exports === 'object' && typeof module === 'object')
|
|
3
|
+
module.exports = factory();
|
|
4
|
+
else if(typeof define === 'function' && define.amd)
|
|
5
|
+
define([], factory);
|
|
6
|
+
else if(typeof exports === 'object')
|
|
7
|
+
exports["xt-transfer-tree"] = factory();
|
|
8
|
+
else
|
|
9
|
+
root["xt-transfer-tree"] = factory();
|
|
10
|
+
})((typeof self !== 'undefined' ? self : this), function() {
|
|
11
|
+
return /******/ (function(modules) { // webpackBootstrap
|
|
12
|
+
/******/ // The module cache
|
|
13
|
+
/******/ var installedModules = {};
|
|
14
|
+
/******/
|
|
15
|
+
/******/ // The require function
|
|
16
|
+
/******/ function __webpack_require__(moduleId) {
|
|
17
|
+
/******/
|
|
18
|
+
/******/ // Check if module is in cache
|
|
19
|
+
/******/ if(installedModules[moduleId]) {
|
|
20
|
+
/******/ return installedModules[moduleId].exports;
|
|
21
|
+
/******/ }
|
|
22
|
+
/******/ // Create a new module (and put it into the cache)
|
|
23
|
+
/******/ var module = installedModules[moduleId] = {
|
|
24
|
+
/******/ i: moduleId,
|
|
25
|
+
/******/ l: false,
|
|
26
|
+
/******/ exports: {}
|
|
27
|
+
/******/ };
|
|
28
|
+
/******/
|
|
29
|
+
/******/ // Execute the module function
|
|
30
|
+
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
31
|
+
/******/
|
|
32
|
+
/******/ // Flag the module as loaded
|
|
33
|
+
/******/ module.l = true;
|
|
34
|
+
/******/
|
|
35
|
+
/******/ // Return the exports of the module
|
|
36
|
+
/******/ return module.exports;
|
|
37
|
+
/******/ }
|
|
38
|
+
/******/
|
|
39
|
+
/******/
|
|
40
|
+
/******/ // expose the modules object (__webpack_modules__)
|
|
41
|
+
/******/ __webpack_require__.m = modules;
|
|
42
|
+
/******/
|
|
43
|
+
/******/ // expose the module cache
|
|
44
|
+
/******/ __webpack_require__.c = installedModules;
|
|
45
|
+
/******/
|
|
46
|
+
/******/ // define getter function for harmony exports
|
|
47
|
+
/******/ __webpack_require__.d = function(exports, name, getter) {
|
|
48
|
+
/******/ if(!__webpack_require__.o(exports, name)) {
|
|
49
|
+
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
|
50
|
+
/******/ }
|
|
51
|
+
/******/ };
|
|
52
|
+
/******/
|
|
53
|
+
/******/ // define __esModule on exports
|
|
54
|
+
/******/ __webpack_require__.r = function(exports) {
|
|
55
|
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
56
|
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
57
|
+
/******/ }
|
|
58
|
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
59
|
+
/******/ };
|
|
60
|
+
/******/
|
|
61
|
+
/******/ // create a fake namespace object
|
|
62
|
+
/******/ // mode & 1: value is a module id, require it
|
|
63
|
+
/******/ // mode & 2: merge all properties of value into the ns
|
|
64
|
+
/******/ // mode & 4: return value when already ns object
|
|
65
|
+
/******/ // mode & 8|1: behave like require
|
|
66
|
+
/******/ __webpack_require__.t = function(value, mode) {
|
|
67
|
+
/******/ if(mode & 1) value = __webpack_require__(value);
|
|
68
|
+
/******/ if(mode & 8) return value;
|
|
69
|
+
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
|
70
|
+
/******/ var ns = Object.create(null);
|
|
71
|
+
/******/ __webpack_require__.r(ns);
|
|
72
|
+
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
|
73
|
+
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
|
74
|
+
/******/ return ns;
|
|
75
|
+
/******/ };
|
|
76
|
+
/******/
|
|
77
|
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
78
|
+
/******/ __webpack_require__.n = function(module) {
|
|
79
|
+
/******/ var getter = module && module.__esModule ?
|
|
80
|
+
/******/ function getDefault() { return module['default']; } :
|
|
81
|
+
/******/ function getModuleExports() { return module; };
|
|
82
|
+
/******/ __webpack_require__.d(getter, 'a', getter);
|
|
83
|
+
/******/ return getter;
|
|
84
|
+
/******/ };
|
|
85
|
+
/******/
|
|
86
|
+
/******/ // Object.prototype.hasOwnProperty.call
|
|
87
|
+
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
|
88
|
+
/******/
|
|
89
|
+
/******/ // __webpack_public_path__
|
|
90
|
+
/******/ __webpack_require__.p = "";
|
|
91
|
+
/******/
|
|
92
|
+
/******/
|
|
93
|
+
/******/ // Load entry module and return exports
|
|
94
|
+
/******/ return __webpack_require__(__webpack_require__.s = "fb15");
|
|
95
|
+
/******/ })
|
|
96
|
+
/************************************************************************/
|
|
97
|
+
/******/ ({
|
|
98
|
+
|
|
99
|
+
/***/ "d0a8":
|
|
100
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
101
|
+
|
|
102
|
+
// extracted by mini-css-extract-plugin
|
|
103
|
+
|
|
104
|
+
/***/ }),
|
|
105
|
+
|
|
106
|
+
/***/ "d2eb":
|
|
107
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
108
|
+
|
|
109
|
+
"use strict";
|
|
110
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_9_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_9_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_9_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_9_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_561bec94_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("d0a8");
|
|
111
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_9_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_9_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_9_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_9_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_561bec94_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_9_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_9_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_9_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_9_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_561bec94_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
|
|
112
|
+
/* unused harmony reexport * */
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
/***/ }),
|
|
116
|
+
|
|
117
|
+
/***/ "fb15":
|
|
118
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
119
|
+
|
|
120
|
+
"use strict";
|
|
121
|
+
// ESM COMPAT FLAG
|
|
122
|
+
__webpack_require__.r(__webpack_exports__);
|
|
123
|
+
|
|
124
|
+
// EXPORTS
|
|
125
|
+
__webpack_require__.d(__webpack_exports__, "XtTransferTree", function() { return /* reexport */ xt_transfer_tree; });
|
|
126
|
+
|
|
127
|
+
// CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js
|
|
128
|
+
// This file is imported into lib/wc client bundles.
|
|
129
|
+
|
|
130
|
+
if (typeof window !== 'undefined') {
|
|
131
|
+
var currentScript = window.document.currentScript
|
|
132
|
+
if (false) { var getCurrentScript; }
|
|
133
|
+
|
|
134
|
+
var src = currentScript && currentScript.src.match(/(.+\/)[^/]+\.js(\?.*)?$/)
|
|
135
|
+
if (src) {
|
|
136
|
+
__webpack_require__.p = src[1] // eslint-disable-line
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
// Indicate to webpack that this file can be concatenated
|
|
141
|
+
/* harmony default export */ var setPublicPath = (null);
|
|
142
|
+
|
|
143
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"b8cd9b04-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/xt-transfer-tree/index.vue?vue&type=template&id=561bec94&scoped=true
|
|
144
|
+
var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:"xt-transfer-tree"},[_c('div',{staticClass:"xt-transfer-tree__panel xt-transfer-tree__source"},[_c('div',{staticClass:"xt-transfer-tree__header"},[_c('span',{staticClass:"xt-transfer-tree__title"},[_vm._v(_vm._s(_vm.leftTitle))]),_c('span',{staticClass:"xt-transfer-tree__count"},[_vm._v(_vm._s(_vm.leftCheckedCount)+"/"+_vm._s(_vm.leftTotalCount))])]),(_vm.filterable)?_c('div',{staticClass:"xt-transfer-tree__search"},[_c('el-input',{attrs:{"placeholder":"搜索","prefix-icon":"el-icon-search","size":"small"},model:{value:(_vm.leftFilterText),callback:function ($$v) {_vm.leftFilterText=$$v},expression:"leftFilterText"}})],1):_vm._e(),_c('div',{staticClass:"xt-transfer-tree__body"},[_c('el-tree',{ref:"leftTree",attrs:{"data":_vm.sourceData,"props":_vm.treeProps,"default-expand-all":_vm.defaultExpandAll,"filter-node-method":_vm.filterLeftNode,"show-checkbox":_vm.showCheckbox,"check-strictly":!_vm.cascade,"default-checked-keys":_vm.leftCheckedKeys},on:{"check-change":_vm.handleLeftCheckChange,"node-click":_vm.handleLeftNodeClick},scopedSlots:_vm._u([{key:"default",fn:function({ node, data }){return _c('span',{staticClass:"xt-transfer-tree__node"},[_c('span',[_vm._v(_vm._s(node.label))]),(data.children && data.children.length)?_c('span',{staticClass:"xt-transfer-tree__node-count"},[_vm._v(" ("+_vm._s(data.children.length)+") ")]):_vm._e()])}}])})],1)]),_c('div',{staticClass:"xt-transfer-tree__buttons"},[_c('el-button',{attrs:{"type":"primary","disabled":!_vm.leftCheckedCount,"size":_vm.buttonSize},on:{"click":_vm.transferToRight}},[_c('i',{staticClass:"el-icon-arrow-right"})]),_c('el-button',{attrs:{"type":"primary","disabled":!_vm.rightCheckedCount,"size":_vm.buttonSize},on:{"click":_vm.transferToLeft}},[_c('i',{staticClass:"el-icon-arrow-left"})])],1),_c('div',{staticClass:"xt-transfer-tree__panel xt-transfer-tree__target"},[_c('div',{staticClass:"xt-transfer-tree__header"},[_c('span',{staticClass:"xt-transfer-tree__title"},[_vm._v(_vm._s(_vm.rightTitle))]),_c('span',{staticClass:"xt-transfer-tree__count"},[_vm._v(_vm._s(_vm.rightCheckedCount)+"/"+_vm._s(_vm.rightTotalCount))])]),(_vm.filterable)?_c('div',{staticClass:"xt-transfer-tree__search"},[_c('el-input',{attrs:{"placeholder":"搜索","prefix-icon":"el-icon-search","size":"small"},model:{value:(_vm.rightFilterText),callback:function ($$v) {_vm.rightFilterText=$$v},expression:"rightFilterText"}})],1):_vm._e(),_c('div',{staticClass:"xt-transfer-tree__body"},[_c('el-tree',{ref:"rightTree",attrs:{"data":_vm.targetData,"props":_vm.treeProps,"default-expand-all":_vm.defaultExpandAll,"filter-node-method":_vm.filterRightNode,"show-checkbox":_vm.showCheckbox,"check-strictly":!_vm.cascade,"default-checked-keys":_vm.rightCheckedKeys},on:{"check-change":_vm.handleRightCheckChange,"node-click":_vm.handleRightNodeClick},scopedSlots:_vm._u([{key:"default",fn:function({ node, data }){return _c('span',{staticClass:"xt-transfer-tree__node"},[_c('span',[_vm._v(_vm._s(node.label))]),(data.children && data.children.length)?_c('span',{staticClass:"xt-transfer-tree__node-count"},[_vm._v(" ("+_vm._s(data.children.length)+") ")]):_vm._e()])}}])})],1)])])
|
|
145
|
+
}
|
|
146
|
+
var staticRenderFns = []
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
// CONCATENATED MODULE: ./src/components/xt-transfer-tree/index.vue?vue&type=template&id=561bec94&scoped=true
|
|
150
|
+
|
|
151
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/xt-transfer-tree/index.vue?vue&type=script&lang=js
|
|
152
|
+
|
|
153
|
+
/* harmony default export */ var xt_transfer_treevue_type_script_lang_js = ({
|
|
154
|
+
name: 'XtTransferTree',
|
|
155
|
+
|
|
156
|
+
props: {
|
|
157
|
+
data: {
|
|
158
|
+
type: Array,
|
|
159
|
+
default: () => []
|
|
160
|
+
},
|
|
161
|
+
value: {
|
|
162
|
+
type: Array,
|
|
163
|
+
default: () => []
|
|
164
|
+
},
|
|
165
|
+
leftTitle: {
|
|
166
|
+
type: String,
|
|
167
|
+
default: '待选择'
|
|
168
|
+
},
|
|
169
|
+
rightTitle: {
|
|
170
|
+
type: String,
|
|
171
|
+
default: '已选择'
|
|
172
|
+
},
|
|
173
|
+
treeProps: {
|
|
174
|
+
type: Object,
|
|
175
|
+
default: () => ({
|
|
176
|
+
label: 'label',
|
|
177
|
+
children: 'children',
|
|
178
|
+
value: 'id'
|
|
179
|
+
})
|
|
180
|
+
},
|
|
181
|
+
defaultExpandAll: {
|
|
182
|
+
type: Boolean,
|
|
183
|
+
default: true
|
|
184
|
+
},
|
|
185
|
+
filterable: {
|
|
186
|
+
type: Boolean,
|
|
187
|
+
default: false
|
|
188
|
+
},
|
|
189
|
+
showCheckbox: {
|
|
190
|
+
type: Boolean,
|
|
191
|
+
default: true
|
|
192
|
+
},
|
|
193
|
+
cascade: {
|
|
194
|
+
type: Boolean,
|
|
195
|
+
default: true
|
|
196
|
+
},
|
|
197
|
+
transferMode: {
|
|
198
|
+
type: String,
|
|
199
|
+
default: 'single',
|
|
200
|
+
validator: (val) => ['single', 'multiple', 'parent-child'].includes(val)
|
|
201
|
+
},
|
|
202
|
+
buttonSize: {
|
|
203
|
+
type: String,
|
|
204
|
+
default: 'small'
|
|
205
|
+
}
|
|
206
|
+
},
|
|
207
|
+
|
|
208
|
+
data() {
|
|
209
|
+
return {
|
|
210
|
+
leftFilterText: '',
|
|
211
|
+
rightFilterText: '',
|
|
212
|
+
leftCheckedKeys: [],
|
|
213
|
+
rightCheckedKeys: []
|
|
214
|
+
}
|
|
215
|
+
},
|
|
216
|
+
|
|
217
|
+
computed: {
|
|
218
|
+
sourceData() {
|
|
219
|
+
const valueSet = new Set(this.value)
|
|
220
|
+
return this.filterTreeData(this.data, valueSet, true)
|
|
221
|
+
},
|
|
222
|
+
|
|
223
|
+
targetData() {
|
|
224
|
+
const valueSet = new Set(this.value)
|
|
225
|
+
return this.filterTreeData(this.data, valueSet, false)
|
|
226
|
+
},
|
|
227
|
+
|
|
228
|
+
leftTotalCount() {
|
|
229
|
+
return this.countTreeNodes(this.sourceData)
|
|
230
|
+
},
|
|
231
|
+
|
|
232
|
+
rightTotalCount() {
|
|
233
|
+
return this.countTreeNodes(this.targetData)
|
|
234
|
+
},
|
|
235
|
+
|
|
236
|
+
leftCheckedCount() {
|
|
237
|
+
return this.leftCheckedKeys.length
|
|
238
|
+
},
|
|
239
|
+
|
|
240
|
+
rightCheckedCount() {
|
|
241
|
+
return this.rightCheckedKeys.length
|
|
242
|
+
}
|
|
243
|
+
},
|
|
244
|
+
|
|
245
|
+
watch: {
|
|
246
|
+
leftFilterText(val) {
|
|
247
|
+
this.$refs.leftTree && this.$refs.leftTree.filter(val)
|
|
248
|
+
},
|
|
249
|
+
rightFilterText(val) {
|
|
250
|
+
this.$refs.rightTree && this.$refs.rightTree.filter(val)
|
|
251
|
+
}
|
|
252
|
+
},
|
|
253
|
+
|
|
254
|
+
methods: {
|
|
255
|
+
filterTreeData(data, valueSet, exclude) {
|
|
256
|
+
return data
|
|
257
|
+
.map(node => {
|
|
258
|
+
const isTarget = valueSet.has(node[this.treeProps.value])
|
|
259
|
+
if (exclude && isTarget) return null
|
|
260
|
+
if (!exclude && !isTarget) return null
|
|
261
|
+
|
|
262
|
+
const result = { ...node }
|
|
263
|
+
if (node.children && node.children.length) {
|
|
264
|
+
const filteredChildren = this.filterTreeData(node.children, valueSet, exclude)
|
|
265
|
+
if (filteredChildren.length) {
|
|
266
|
+
result.children = filteredChildren
|
|
267
|
+
} else {
|
|
268
|
+
delete result.children
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
return result
|
|
272
|
+
})
|
|
273
|
+
.filter(Boolean)
|
|
274
|
+
},
|
|
275
|
+
|
|
276
|
+
countTreeNodes(data) {
|
|
277
|
+
let count = 0
|
|
278
|
+
data.forEach(node => {
|
|
279
|
+
count++
|
|
280
|
+
if (node.children) {
|
|
281
|
+
count += this.countTreeNodes(node.children)
|
|
282
|
+
}
|
|
283
|
+
})
|
|
284
|
+
return count
|
|
285
|
+
},
|
|
286
|
+
|
|
287
|
+
getAllKeys(node, keys = []) {
|
|
288
|
+
keys.push(node[this.treeProps.value])
|
|
289
|
+
if (node.children) {
|
|
290
|
+
node.children.forEach(child => this.getAllKeys(child, keys))
|
|
291
|
+
}
|
|
292
|
+
return keys
|
|
293
|
+
},
|
|
294
|
+
|
|
295
|
+
getParentKeys(data, key, parentKeys = []) {
|
|
296
|
+
for (const node of data) {
|
|
297
|
+
if (node[this.treeProps.value] === key) {
|
|
298
|
+
return parentKeys
|
|
299
|
+
}
|
|
300
|
+
if (node.children) {
|
|
301
|
+
const result = this.getParentKeys(node.children, key, [...parentKeys, node[this.treeProps.value]])
|
|
302
|
+
if (result.length > 0) return result
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
return []
|
|
306
|
+
},
|
|
307
|
+
|
|
308
|
+
filterLeftNode(value, data) {
|
|
309
|
+
if (!value) return true
|
|
310
|
+
return String(data[this.treeProps.label]).toLowerCase().indexOf(value.toLowerCase()) !== -1
|
|
311
|
+
},
|
|
312
|
+
|
|
313
|
+
filterRightNode(value, data) {
|
|
314
|
+
if (!value) return true
|
|
315
|
+
return String(data[this.treeProps.label]).toLowerCase().indexOf(value.toLowerCase()) !== -1
|
|
316
|
+
},
|
|
317
|
+
|
|
318
|
+
handleLeftCheckChange(data, checked) {
|
|
319
|
+
const key = data[this.treeProps.value]
|
|
320
|
+
if (checked) {
|
|
321
|
+
if (!this.leftCheckedKeys.includes(key)) {
|
|
322
|
+
this.leftCheckedKeys.push(key)
|
|
323
|
+
}
|
|
324
|
+
if (this.cascade && data.children) {
|
|
325
|
+
data.children.forEach(child => {
|
|
326
|
+
const childKey = child[this.treeProps.value]
|
|
327
|
+
if (!this.leftCheckedKeys.includes(childKey)) {
|
|
328
|
+
this.leftCheckedKeys.push(childKey)
|
|
329
|
+
}
|
|
330
|
+
})
|
|
331
|
+
}
|
|
332
|
+
} else {
|
|
333
|
+
this.leftCheckedKeys = this.leftCheckedKeys.filter(k => k !== key)
|
|
334
|
+
if (this.cascade && data.children) {
|
|
335
|
+
data.children.forEach(child => {
|
|
336
|
+
this.leftCheckedKeys = this.leftCheckedKeys.filter(k => k !== child[this.treeProps.value])
|
|
337
|
+
})
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
},
|
|
341
|
+
|
|
342
|
+
handleRightCheckChange(data, checked) {
|
|
343
|
+
const key = data[this.treeProps.value]
|
|
344
|
+
if (checked) {
|
|
345
|
+
if (!this.rightCheckedKeys.includes(key)) {
|
|
346
|
+
this.rightCheckedKeys.push(key)
|
|
347
|
+
}
|
|
348
|
+
if (this.cascade && data.children) {
|
|
349
|
+
data.children.forEach(child => {
|
|
350
|
+
const childKey = child[this.treeProps.value]
|
|
351
|
+
if (!this.rightCheckedKeys.includes(childKey)) {
|
|
352
|
+
this.rightCheckedKeys.push(childKey)
|
|
353
|
+
}
|
|
354
|
+
})
|
|
355
|
+
}
|
|
356
|
+
} else {
|
|
357
|
+
this.rightCheckedKeys = this.rightCheckedKeys.filter(k => k !== key)
|
|
358
|
+
if (this.cascade && data.children) {
|
|
359
|
+
data.children.forEach(child => {
|
|
360
|
+
this.rightCheckedKeys = this.rightCheckedKeys.filter(k => k !== child[this.treeProps.value])
|
|
361
|
+
})
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
},
|
|
365
|
+
|
|
366
|
+
handleLeftNodeClick(data) {
|
|
367
|
+
if (!this.showCheckbox) {
|
|
368
|
+
const key = data[this.treeProps.value]
|
|
369
|
+
const keysToTransfer = this.getTransferKeys(data)
|
|
370
|
+
this.transferKeys(keysToTransfer, true)
|
|
371
|
+
}
|
|
372
|
+
},
|
|
373
|
+
|
|
374
|
+
handleRightNodeClick(data) {
|
|
375
|
+
if (!this.showCheckbox) {
|
|
376
|
+
const key = data[this.treeProps.value]
|
|
377
|
+
const keysToTransfer = this.getTransferKeys(data)
|
|
378
|
+
this.transferKeys(keysToTransfer, false)
|
|
379
|
+
}
|
|
380
|
+
},
|
|
381
|
+
|
|
382
|
+
getTransferKeys(data) {
|
|
383
|
+
const key = data[this.treeProps.value]
|
|
384
|
+
switch (this.transferMode) {
|
|
385
|
+
case 'parent-child':
|
|
386
|
+
return this.getAllKeys(data)
|
|
387
|
+
case 'multiple':
|
|
388
|
+
return [key]
|
|
389
|
+
default:
|
|
390
|
+
return [key]
|
|
391
|
+
}
|
|
392
|
+
},
|
|
393
|
+
|
|
394
|
+
transferToRight() {
|
|
395
|
+
const keys = [...this.leftCheckedKeys]
|
|
396
|
+
this.transferKeys(keys, true)
|
|
397
|
+
this.leftCheckedKeys = []
|
|
398
|
+
},
|
|
399
|
+
|
|
400
|
+
transferToLeft() {
|
|
401
|
+
const keys = [...this.rightCheckedKeys]
|
|
402
|
+
this.transferKeys(keys, false)
|
|
403
|
+
this.rightCheckedKeys = []
|
|
404
|
+
},
|
|
405
|
+
|
|
406
|
+
transferKeys(keys, toRight) {
|
|
407
|
+
const currentValue = [...this.value]
|
|
408
|
+
const newKeys = new Set(currentValue)
|
|
409
|
+
|
|
410
|
+
if (toRight) {
|
|
411
|
+
keys.forEach(k => newKeys.add(k))
|
|
412
|
+
if (this.cascade) {
|
|
413
|
+
keys.forEach(k => {
|
|
414
|
+
const parentKeys = this.getParentKeys(this.data, k)
|
|
415
|
+
parentKeys.forEach(pk => newKeys.add(pk))
|
|
416
|
+
})
|
|
417
|
+
}
|
|
418
|
+
} else {
|
|
419
|
+
keys.forEach(k => newKeys.delete(k))
|
|
420
|
+
if (this.cascade) {
|
|
421
|
+
keys.forEach(k => {
|
|
422
|
+
const allChildKeys = []
|
|
423
|
+
this.findAllChildKeys(this.data, k, allChildKeys)
|
|
424
|
+
allChildKeys.forEach(ck => newKeys.delete(ck))
|
|
425
|
+
})
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
const newValue = Array.from(newKeys)
|
|
430
|
+
this.$emit('update:value', newValue)
|
|
431
|
+
this.$emit('change', {
|
|
432
|
+
value: newValue,
|
|
433
|
+
addedKeys: toRight ? keys : [],
|
|
434
|
+
removedKeys: toRight ? [] : keys
|
|
435
|
+
})
|
|
436
|
+
},
|
|
437
|
+
|
|
438
|
+
findAllChildKeys(data, parentKey, childKeys) {
|
|
439
|
+
for (const node of data) {
|
|
440
|
+
if (node[this.treeProps.value] === parentKey && node.children) {
|
|
441
|
+
node.children.forEach(child => {
|
|
442
|
+
childKeys.push(child[this.treeProps.value])
|
|
443
|
+
if (child.children) {
|
|
444
|
+
this.findAllChildKeys([child], child[this.treeProps.value], childKeys)
|
|
445
|
+
}
|
|
446
|
+
})
|
|
447
|
+
}
|
|
448
|
+
if (node.children) {
|
|
449
|
+
this.findAllChildKeys(node.children, parentKey, childKeys)
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
},
|
|
453
|
+
|
|
454
|
+
clearSelection() {
|
|
455
|
+
this.leftCheckedKeys = []
|
|
456
|
+
this.rightCheckedKeys = []
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
});
|
|
460
|
+
|
|
461
|
+
// CONCATENATED MODULE: ./src/components/xt-transfer-tree/index.vue?vue&type=script&lang=js
|
|
462
|
+
/* harmony default export */ var components_xt_transfer_treevue_type_script_lang_js = (xt_transfer_treevue_type_script_lang_js);
|
|
463
|
+
// EXTERNAL MODULE: ./src/components/xt-transfer-tree/index.vue?vue&type=style&index=0&id=561bec94&prod&lang=scss&scoped=true
|
|
464
|
+
var xt_transfer_treevue_type_style_index_0_id_561bec94_prod_lang_scss_scoped_true = __webpack_require__("d2eb");
|
|
465
|
+
|
|
466
|
+
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
|
|
467
|
+
/* globals __VUE_SSR_CONTEXT__ */
|
|
468
|
+
|
|
469
|
+
// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
|
|
470
|
+
// This module is a runtime utility for cleaner component module output and will
|
|
471
|
+
// be included in the final webpack user bundle.
|
|
472
|
+
|
|
473
|
+
function normalizeComponent(
|
|
474
|
+
scriptExports,
|
|
475
|
+
render,
|
|
476
|
+
staticRenderFns,
|
|
477
|
+
functionalTemplate,
|
|
478
|
+
injectStyles,
|
|
479
|
+
scopeId,
|
|
480
|
+
moduleIdentifier /* server only */,
|
|
481
|
+
shadowMode /* vue-cli only */
|
|
482
|
+
) {
|
|
483
|
+
// Vue.extend constructor export interop
|
|
484
|
+
var options =
|
|
485
|
+
typeof scriptExports === 'function' ? scriptExports.options : scriptExports
|
|
486
|
+
|
|
487
|
+
// render functions
|
|
488
|
+
if (render) {
|
|
489
|
+
options.render = render
|
|
490
|
+
options.staticRenderFns = staticRenderFns
|
|
491
|
+
options._compiled = true
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
// functional template
|
|
495
|
+
if (functionalTemplate) {
|
|
496
|
+
options.functional = true
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
// scopedId
|
|
500
|
+
if (scopeId) {
|
|
501
|
+
options._scopeId = 'data-v-' + scopeId
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
var hook
|
|
505
|
+
if (moduleIdentifier) {
|
|
506
|
+
// server build
|
|
507
|
+
hook = function (context) {
|
|
508
|
+
// 2.3 injection
|
|
509
|
+
context =
|
|
510
|
+
context || // cached call
|
|
511
|
+
(this.$vnode && this.$vnode.ssrContext) || // stateful
|
|
512
|
+
(this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
|
|
513
|
+
// 2.2 with runInNewContext: true
|
|
514
|
+
if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
|
|
515
|
+
context = __VUE_SSR_CONTEXT__
|
|
516
|
+
}
|
|
517
|
+
// inject component styles
|
|
518
|
+
if (injectStyles) {
|
|
519
|
+
injectStyles.call(this, context)
|
|
520
|
+
}
|
|
521
|
+
// register component module identifier for async chunk inferrence
|
|
522
|
+
if (context && context._registeredComponents) {
|
|
523
|
+
context._registeredComponents.add(moduleIdentifier)
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
// used by ssr in case component is cached and beforeCreate
|
|
527
|
+
// never gets called
|
|
528
|
+
options._ssrRegister = hook
|
|
529
|
+
} else if (injectStyles) {
|
|
530
|
+
hook = shadowMode
|
|
531
|
+
? function () {
|
|
532
|
+
injectStyles.call(
|
|
533
|
+
this,
|
|
534
|
+
(options.functional ? this.parent : this).$root.$options.shadowRoot
|
|
535
|
+
)
|
|
536
|
+
}
|
|
537
|
+
: injectStyles
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
if (hook) {
|
|
541
|
+
if (options.functional) {
|
|
542
|
+
// for template-only hot-reload because in that case the render fn doesn't
|
|
543
|
+
// go through the normalizer
|
|
544
|
+
options._injectStyles = hook
|
|
545
|
+
// register for functional component in vue file
|
|
546
|
+
var originalRender = options.render
|
|
547
|
+
options.render = function renderWithStyleInjection(h, context) {
|
|
548
|
+
hook.call(context)
|
|
549
|
+
return originalRender(h, context)
|
|
550
|
+
}
|
|
551
|
+
} else {
|
|
552
|
+
// inject component registration as beforeCreate hook
|
|
553
|
+
var existing = options.beforeCreate
|
|
554
|
+
options.beforeCreate = existing ? [].concat(existing, hook) : [hook]
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
return {
|
|
559
|
+
exports: scriptExports,
|
|
560
|
+
options: options
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
// CONCATENATED MODULE: ./src/components/xt-transfer-tree/index.vue
|
|
565
|
+
|
|
566
|
+
|
|
567
|
+
|
|
568
|
+
|
|
569
|
+
|
|
570
|
+
|
|
571
|
+
/* normalize component */
|
|
572
|
+
|
|
573
|
+
var component = normalizeComponent(
|
|
574
|
+
components_xt_transfer_treevue_type_script_lang_js,
|
|
575
|
+
render,
|
|
576
|
+
staticRenderFns,
|
|
577
|
+
false,
|
|
578
|
+
null,
|
|
579
|
+
"561bec94",
|
|
580
|
+
null
|
|
581
|
+
|
|
582
|
+
)
|
|
583
|
+
|
|
584
|
+
/* harmony default export */ var xt_transfer_tree = (component.exports);
|
|
585
|
+
// CONCATENATED MODULE: ./src/components/xt-transfer-tree/index.js
|
|
586
|
+
|
|
587
|
+
|
|
588
|
+
xt_transfer_tree.install = function (Vue) {
|
|
589
|
+
Vue.component(xt_transfer_tree.name, xt_transfer_tree)
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
/* harmony default export */ var components_xt_transfer_tree = (xt_transfer_tree);
|
|
593
|
+
|
|
594
|
+
// CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/entry-lib.js
|
|
595
|
+
|
|
596
|
+
|
|
597
|
+
/* harmony default export */ var entry_lib = __webpack_exports__["default"] = (components_xt_transfer_tree);
|
|
598
|
+
|
|
599
|
+
|
|
600
|
+
|
|
601
|
+
/***/ })
|
|
602
|
+
|
|
603
|
+
/******/ });
|
|
604
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t():"function"===typeof define&&define.amd?define([],t):"object"===typeof exports?exports["xt-transfer-tree"]=t():e["xt-transfer-tree"]=t()})("undefined"!==typeof self?self:this,(function(){return function(e){var t={};function r(s){if(t[s])return t[s].exports;var n=t[s]={i:s,l:!1,exports:{}};return e[s].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=e,r.c=t,r.d=function(e,t,s){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:s})},r.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var s=Object.create(null);if(r.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(s,n,function(t){return e[t]}.bind(null,n));return s},r.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s="fb15")}({d0a8:function(e,t,r){},d2eb:function(e,t,r){"use strict";r("d0a8")},fb15:function(e,t,r){"use strict";if(r.r(t),r.d(t,"XtTransferTree",(function(){return d})),"undefined"!==typeof window){var s=window.document.currentScript,n=s&&s.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);n&&(r.p=n[1])}var i=function(){var e=this,t=e._self._c;return t("div",{staticClass:"xt-transfer-tree"},[t("div",{staticClass:"xt-transfer-tree__panel xt-transfer-tree__source"},[t("div",{staticClass:"xt-transfer-tree__header"},[t("span",{staticClass:"xt-transfer-tree__title"},[e._v(e._s(e.leftTitle))]),t("span",{staticClass:"xt-transfer-tree__count"},[e._v(e._s(e.leftCheckedCount)+"/"+e._s(e.leftTotalCount))])]),e.filterable?t("div",{staticClass:"xt-transfer-tree__search"},[t("el-input",{attrs:{placeholder:"搜索","prefix-icon":"el-icon-search",size:"small"},model:{value:e.leftFilterText,callback:function(t){e.leftFilterText=t},expression:"leftFilterText"}})],1):e._e(),t("div",{staticClass:"xt-transfer-tree__body"},[t("el-tree",{ref:"leftTree",attrs:{data:e.sourceData,props:e.treeProps,"default-expand-all":e.defaultExpandAll,"filter-node-method":e.filterLeftNode,"show-checkbox":e.showCheckbox,"check-strictly":!e.cascade,"default-checked-keys":e.leftCheckedKeys},on:{"check-change":e.handleLeftCheckChange,"node-click":e.handleLeftNodeClick},scopedSlots:e._u([{key:"default",fn:function({node:r,data:s}){return t("span",{staticClass:"xt-transfer-tree__node"},[t("span",[e._v(e._s(r.label))]),s.children&&s.children.length?t("span",{staticClass:"xt-transfer-tree__node-count"},[e._v(" ("+e._s(s.children.length)+") ")]):e._e()])}}])})],1)]),t("div",{staticClass:"xt-transfer-tree__buttons"},[t("el-button",{attrs:{type:"primary",disabled:!e.leftCheckedCount,size:e.buttonSize},on:{click:e.transferToRight}},[t("i",{staticClass:"el-icon-arrow-right"})]),t("el-button",{attrs:{type:"primary",disabled:!e.rightCheckedCount,size:e.buttonSize},on:{click:e.transferToLeft}},[t("i",{staticClass:"el-icon-arrow-left"})])],1),t("div",{staticClass:"xt-transfer-tree__panel xt-transfer-tree__target"},[t("div",{staticClass:"xt-transfer-tree__header"},[t("span",{staticClass:"xt-transfer-tree__title"},[e._v(e._s(e.rightTitle))]),t("span",{staticClass:"xt-transfer-tree__count"},[e._v(e._s(e.rightCheckedCount)+"/"+e._s(e.rightTotalCount))])]),e.filterable?t("div",{staticClass:"xt-transfer-tree__search"},[t("el-input",{attrs:{placeholder:"搜索","prefix-icon":"el-icon-search",size:"small"},model:{value:e.rightFilterText,callback:function(t){e.rightFilterText=t},expression:"rightFilterText"}})],1):e._e(),t("div",{staticClass:"xt-transfer-tree__body"},[t("el-tree",{ref:"rightTree",attrs:{data:e.targetData,props:e.treeProps,"default-expand-all":e.defaultExpandAll,"filter-node-method":e.filterRightNode,"show-checkbox":e.showCheckbox,"check-strictly":!e.cascade,"default-checked-keys":e.rightCheckedKeys},on:{"check-change":e.handleRightCheckChange,"node-click":e.handleRightNodeClick},scopedSlots:e._u([{key:"default",fn:function({node:r,data:s}){return t("span",{staticClass:"xt-transfer-tree__node"},[t("span",[e._v(e._s(r.label))]),s.children&&s.children.length?t("span",{staticClass:"xt-transfer-tree__node-count"},[e._v(" ("+e._s(s.children.length)+") ")]):e._e()])}}])})],1)])])},a=[],l={name:"XtTransferTree",props:{data:{type:Array,default:()=>[]},value:{type:Array,default:()=>[]},leftTitle:{type:String,default:"待选择"},rightTitle:{type:String,default:"已选择"},treeProps:{type:Object,default:()=>({label:"label",children:"children",value:"id"})},defaultExpandAll:{type:Boolean,default:!0},filterable:{type:Boolean,default:!1},showCheckbox:{type:Boolean,default:!0},cascade:{type:Boolean,default:!0},transferMode:{type:String,default:"single",validator:e=>["single","multiple","parent-child"].includes(e)},buttonSize:{type:String,default:"small"}},data(){return{leftFilterText:"",rightFilterText:"",leftCheckedKeys:[],rightCheckedKeys:[]}},computed:{sourceData(){const e=new Set(this.value);return this.filterTreeData(this.data,e,!0)},targetData(){const e=new Set(this.value);return this.filterTreeData(this.data,e,!1)},leftTotalCount(){return this.countTreeNodes(this.sourceData)},rightTotalCount(){return this.countTreeNodes(this.targetData)},leftCheckedCount(){return this.leftCheckedKeys.length},rightCheckedCount(){return this.rightCheckedKeys.length}},watch:{leftFilterText(e){this.$refs.leftTree&&this.$refs.leftTree.filter(e)},rightFilterText(e){this.$refs.rightTree&&this.$refs.rightTree.filter(e)}},methods:{filterTreeData(e,t,r){return e.map(e=>{const s=t.has(e[this.treeProps.value]);if(r&&s)return null;if(!r&&!s)return null;const n={...e};if(e.children&&e.children.length){const s=this.filterTreeData(e.children,t,r);s.length?n.children=s:delete n.children}return n}).filter(Boolean)},countTreeNodes(e){let t=0;return e.forEach(e=>{t++,e.children&&(t+=this.countTreeNodes(e.children))}),t},getAllKeys(e,t=[]){return t.push(e[this.treeProps.value]),e.children&&e.children.forEach(e=>this.getAllKeys(e,t)),t},getParentKeys(e,t,r=[]){for(const s of e){if(s[this.treeProps.value]===t)return r;if(s.children){const e=this.getParentKeys(s.children,t,[...r,s[this.treeProps.value]]);if(e.length>0)return e}}return[]},filterLeftNode(e,t){return!e||-1!==String(t[this.treeProps.label]).toLowerCase().indexOf(e.toLowerCase())},filterRightNode(e,t){return!e||-1!==String(t[this.treeProps.label]).toLowerCase().indexOf(e.toLowerCase())},handleLeftCheckChange(e,t){const r=e[this.treeProps.value];t?(this.leftCheckedKeys.includes(r)||this.leftCheckedKeys.push(r),this.cascade&&e.children&&e.children.forEach(e=>{const t=e[this.treeProps.value];this.leftCheckedKeys.includes(t)||this.leftCheckedKeys.push(t)})):(this.leftCheckedKeys=this.leftCheckedKeys.filter(e=>e!==r),this.cascade&&e.children&&e.children.forEach(e=>{this.leftCheckedKeys=this.leftCheckedKeys.filter(t=>t!==e[this.treeProps.value])}))},handleRightCheckChange(e,t){const r=e[this.treeProps.value];t?(this.rightCheckedKeys.includes(r)||this.rightCheckedKeys.push(r),this.cascade&&e.children&&e.children.forEach(e=>{const t=e[this.treeProps.value];this.rightCheckedKeys.includes(t)||this.rightCheckedKeys.push(t)})):(this.rightCheckedKeys=this.rightCheckedKeys.filter(e=>e!==r),this.cascade&&e.children&&e.children.forEach(e=>{this.rightCheckedKeys=this.rightCheckedKeys.filter(t=>t!==e[this.treeProps.value])}))},handleLeftNodeClick(e){if(!this.showCheckbox){e[this.treeProps.value];const t=this.getTransferKeys(e);this.transferKeys(t,!0)}},handleRightNodeClick(e){if(!this.showCheckbox){e[this.treeProps.value];const t=this.getTransferKeys(e);this.transferKeys(t,!1)}},getTransferKeys(e){const t=e[this.treeProps.value];switch(this.transferMode){case"parent-child":return this.getAllKeys(e);case"multiple":return[t];default:return[t]}},transferToRight(){const e=[...this.leftCheckedKeys];this.transferKeys(e,!0),this.leftCheckedKeys=[]},transferToLeft(){const e=[...this.rightCheckedKeys];this.transferKeys(e,!1),this.rightCheckedKeys=[]},transferKeys(e,t){const r=[...this.value],s=new Set(r);t?(e.forEach(e=>s.add(e)),this.cascade&&e.forEach(e=>{const t=this.getParentKeys(this.data,e);t.forEach(e=>s.add(e))})):(e.forEach(e=>s.delete(e)),this.cascade&&e.forEach(e=>{const t=[];this.findAllChildKeys(this.data,e,t),t.forEach(e=>s.delete(e))}));const n=Array.from(s);this.$emit("update:value",n),this.$emit("change",{value:n,addedKeys:t?e:[],removedKeys:t?[]:e})},findAllChildKeys(e,t,r){for(const s of e)s[this.treeProps.value]===t&&s.children&&s.children.forEach(e=>{r.push(e[this.treeProps.value]),e.children&&this.findAllChildKeys([e],e[this.treeProps.value],r)}),s.children&&this.findAllChildKeys(s.children,t,r)},clearSelection(){this.leftCheckedKeys=[],this.rightCheckedKeys=[]}}},o=l;r("d2eb");function h(e,t,r,s,n,i,a,l){var o,h="function"===typeof e?e.options:e;if(t&&(h.render=t,h.staticRenderFns=r,h._compiled=!0),s&&(h.functional=!0),i&&(h._scopeId="data-v-"+i),a?(o=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"===typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),n&&n.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(a)},h._ssrRegister=o):n&&(o=l?function(){n.call(this,(h.functional?this.parent:this).$root.$options.shadowRoot)}:n),o)if(h.functional){h._injectStyles=o;var c=h.render;h.render=function(e,t){return o.call(t),c(e,t)}}else{var d=h.beforeCreate;h.beforeCreate=d?[].concat(d,o):[o]}return{exports:e,options:h}}var c=h(o,i,a,!1,null,"561bec94",null),d=c.exports;d.install=function(e){e.component(d.name,d)};var f=d;t["default"]=f}})}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('./xt-upload.common.js');
|