bm-admin-ui 0.1.1-8 → 1.0.1-alpha
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/.pnpm-debug.log +16 -0
- package/es/components/button/index.d.ts +48 -26
- package/es/components/button/index.js +18 -9
- package/es/components/button/src/button.d.ts +10 -1
- package/es/components/button/src/button.vue.d.ts +54 -30
- package/es/components/float-table/index.d.ts +5 -0
- package/es/components/float-table/index.js +448 -0
- package/es/components/float-table/src/float-table.vue.d.ts +500 -0
- package/es/components/flow-designer/index.js +1 -1
- package/es/components/form-designer/index.js +1 -1
- package/es/components/index.d.ts +7 -0
- package/es/components/index.js +7 -0
- package/es/components/multi-cascader-compose/index.d.ts +135 -0
- package/es/components/multi-cascader-compose/index.js +1699 -0
- package/es/components/multi-cascader-compose/src/multi-cascader-compose.vue.d.ts +135 -0
- package/es/components/multi-cascader-compose/src/props.d.ts +32 -0
- package/es/components/multi-cascader-compose/types.d.ts +10 -0
- package/es/components/over-tooltips/index.d.ts +35 -0
- package/es/components/over-tooltips/index.js +117 -0
- package/es/components/over-tooltips/src/over-tooltips.vue.d.ts +34 -0
- package/es/components/search-filter/index.d.ts +23 -5249
- package/es/components/search-filter/index.js +599 -33
- package/es/components/search-filter/src/search-filter.vue.d.ts +23 -5250
- package/es/components/search-filter/src/search-reset-btn.vue.d.ts +0 -270
- package/es/components/search-filter/src/serach-filter.d.ts +3 -4
- package/es/components/shops-filter/index.d.ts +99 -0
- package/es/components/shops-filter/index.js +1614 -0
- package/es/components/shops-filter/src/shops-filter.d.ts +25 -0
- package/es/components/shops-filter/src/shops-filter.vue.d.ts +98 -0
- package/es/components/staffs-selector/index.d.ts +82 -0
- package/es/components/staffs-selector/index.js +1991 -0
- package/es/components/staffs-selector/src/multipleCmp.vue.d.ts +79 -0
- package/es/components/staffs-selector/src/radioCmp.vue.d.ts +31 -0
- package/es/components/staffs-selector/src/staffs-selector.vue.d.ts +81 -0
- package/es/components/staffs-selector/src/variedCmp.vue.d.ts +62 -0
- package/es/components/timeline/index.d.ts +93 -0
- package/es/components/timeline/index.js +164 -0
- package/es/components/timeline/src/props.d.ts +20 -0
- package/es/components/timeline/src/timeline-item.vue.d.ts +51 -0
- package/es/components/timeline/src/timeline.vue.d.ts +42 -0
- package/es/components/upload/index.d.ts +126 -0
- package/es/components/upload/index.js +1839 -0
- package/es/components/upload/src/icons.d.ts +13 -0
- package/es/components/upload/src/upload.vue.d.ts +125 -0
- package/es/components/upload/utils/index.d.ts +7 -0
- package/index.esm.js +62465 -4061
- package/index.js +62573 -4161
- package/lib/components/button/index.d.ts +48 -26
- package/lib/components/button/index.js +17 -8
- package/lib/components/button/src/button.d.ts +10 -1
- package/lib/components/button/src/button.vue.d.ts +54 -30
- package/lib/components/float-table/index.d.ts +5 -0
- package/lib/components/float-table/index.js +459 -0
- package/lib/components/float-table/src/float-table.vue.d.ts +500 -0
- package/lib/components/flow-designer/index.js +1 -1
- package/lib/components/form-designer/index.js +1 -1
- package/lib/components/index.d.ts +7 -0
- package/lib/components/index.js +49 -0
- package/lib/components/multi-cascader-compose/index.d.ts +135 -0
- package/lib/components/multi-cascader-compose/index.js +1704 -0
- package/lib/components/multi-cascader-compose/src/multi-cascader-compose.vue.d.ts +135 -0
- package/lib/components/multi-cascader-compose/src/props.d.ts +32 -0
- package/lib/components/multi-cascader-compose/types.d.ts +10 -0
- package/lib/components/over-tooltips/index.d.ts +35 -0
- package/lib/components/over-tooltips/index.js +122 -0
- package/lib/components/over-tooltips/src/over-tooltips.vue.d.ts +34 -0
- package/lib/components/search-filter/index.d.ts +23 -5249
- package/lib/components/search-filter/index.js +598 -32
- package/lib/components/search-filter/src/search-filter.vue.d.ts +23 -5250
- package/lib/components/search-filter/src/search-reset-btn.vue.d.ts +0 -270
- package/lib/components/search-filter/src/serach-filter.d.ts +3 -4
- package/lib/components/shops-filter/index.d.ts +99 -0
- package/lib/components/shops-filter/index.js +1626 -0
- package/lib/components/shops-filter/src/shops-filter.d.ts +25 -0
- package/lib/components/shops-filter/src/shops-filter.vue.d.ts +98 -0
- package/lib/components/staffs-selector/index.d.ts +82 -0
- package/lib/components/staffs-selector/index.js +2005 -0
- package/lib/components/staffs-selector/src/multipleCmp.vue.d.ts +79 -0
- package/lib/components/staffs-selector/src/radioCmp.vue.d.ts +31 -0
- package/lib/components/staffs-selector/src/staffs-selector.vue.d.ts +81 -0
- package/lib/components/staffs-selector/src/variedCmp.vue.d.ts +62 -0
- package/lib/components/timeline/index.d.ts +93 -0
- package/lib/components/timeline/index.js +170 -0
- package/lib/components/timeline/src/props.d.ts +20 -0
- package/lib/components/timeline/src/timeline-item.vue.d.ts +51 -0
- package/lib/components/timeline/src/timeline.vue.d.ts +42 -0
- package/lib/components/upload/index.d.ts +126 -0
- package/lib/components/upload/index.js +1844 -0
- package/lib/components/upload/src/icons.d.ts +13 -0
- package/lib/components/upload/src/upload.vue.d.ts +125 -0
- package/lib/components/upload/utils/index.d.ts +7 -0
- package/package.json +8 -5
- package/theme-chalk/button.css +1 -1
- package/theme-chalk/float-table.css +1 -0
- package/theme-chalk/floating-vue.css +1 -0
- package/theme-chalk/flow-designer.css +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/multi-cascader-compose.css +1 -0
- package/theme-chalk/over-tooltips.css +1 -0
- package/theme-chalk/search-filter.css +1 -1
- package/theme-chalk/shops-filter.css +1 -0
- package/theme-chalk/staffs-selector.css +1 -0
- package/theme-chalk/timeline.css +1 -0
- package/theme-chalk/upload.css +1 -0
- package/types/components/button/index.d.ts +48 -26
- package/types/components/button/src/button.d.ts +10 -1
- package/types/components/button/src/button.vue.d.ts +54 -30
- package/types/components/float-table/index.d.ts +5 -0
- package/types/components/float-table/src/float-table.vue.d.ts +500 -0
- package/types/components/index.d.ts +7 -0
- package/types/components/multi-cascader-compose/index.d.ts +135 -0
- package/types/components/multi-cascader-compose/src/multi-cascader-compose.vue.d.ts +135 -0
- package/types/components/multi-cascader-compose/src/props.d.ts +32 -0
- package/types/components/multi-cascader-compose/types.d.ts +10 -0
- package/types/components/over-tooltips/index.d.ts +35 -0
- package/types/components/over-tooltips/src/over-tooltips.vue.d.ts +34 -0
- package/types/components/search-filter/index.d.ts +23 -5249
- package/types/components/search-filter/src/search-filter.vue.d.ts +23 -5250
- package/types/components/search-filter/src/search-reset-btn.vue.d.ts +0 -270
- package/types/components/search-filter/src/serach-filter.d.ts +3 -4
- package/types/components/shops-filter/index.d.ts +99 -0
- package/types/components/shops-filter/src/shops-filter.d.ts +25 -0
- package/types/components/shops-filter/src/shops-filter.vue.d.ts +98 -0
- package/types/components/staffs-selector/index.d.ts +82 -0
- package/types/components/staffs-selector/src/multipleCmp.vue.d.ts +79 -0
- package/types/components/staffs-selector/src/radioCmp.vue.d.ts +31 -0
- package/types/components/staffs-selector/src/staffs-selector.vue.d.ts +81 -0
- package/types/components/staffs-selector/src/variedCmp.vue.d.ts +62 -0
- package/types/components/timeline/index.d.ts +93 -0
- package/types/components/timeline/src/props.d.ts +20 -0
- package/types/components/timeline/src/timeline-item.vue.d.ts +51 -0
- package/types/components/timeline/src/timeline.vue.d.ts +42 -0
- package/types/components/upload/index.d.ts +126 -0
- package/types/components/upload/src/icons.d.ts +13 -0
- package/types/components/upload/src/upload.vue.d.ts +125 -0
- package/types/components/upload/utils/index.d.ts +7 -0
|
@@ -5,7 +5,6 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var withInstall = require('bm-admin-ui/lib/utils/with-install');
|
|
6
6
|
var vue = require('vue');
|
|
7
7
|
var FormCreateCtr = require('@form-create/ant-design-vue');
|
|
8
|
-
var antDesignVue = require('ant-design-vue');
|
|
9
8
|
|
|
10
9
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
11
10
|
|
|
@@ -861,9 +860,9 @@ function insertCss(css, options) {
|
|
|
861
860
|
return styleElement;
|
|
862
861
|
}
|
|
863
862
|
|
|
864
|
-
function _objectSpread$
|
|
863
|
+
function _objectSpread$7(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? Object(arguments[i]) : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty$7(target, key, source[key]); }); } return target; }
|
|
865
864
|
|
|
866
|
-
function _defineProperty$
|
|
865
|
+
function _defineProperty$7(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
867
866
|
function warn(valid, message) {
|
|
868
867
|
// Support uglify
|
|
869
868
|
if (process.env.NODE_ENV !== 'production' && !valid && console !== undefined) {
|
|
@@ -879,14 +878,14 @@ function isIconDefinition(target) {
|
|
|
879
878
|
}
|
|
880
879
|
function generate(node, key, rootProps) {
|
|
881
880
|
if (!rootProps) {
|
|
882
|
-
return vue.h(node.tag, _objectSpread$
|
|
881
|
+
return vue.h(node.tag, _objectSpread$7({
|
|
883
882
|
key: key
|
|
884
883
|
}, node.attrs), (node.children || []).map(function (child, index) {
|
|
885
884
|
return generate(child, "".concat(key, "-").concat(node.tag, "-").concat(index));
|
|
886
885
|
}));
|
|
887
886
|
}
|
|
888
887
|
|
|
889
|
-
return vue.h(node.tag, _objectSpread$
|
|
888
|
+
return vue.h(node.tag, _objectSpread$7({
|
|
890
889
|
key: key
|
|
891
890
|
}, rootProps, node.attrs), (node.children || []).map(function (child, index) {
|
|
892
891
|
return generate(child, "".concat(key, "-").concat(node.tag, "-").concat(index));
|
|
@@ -926,9 +925,9 @@ function _objectWithoutProperties$1(source, excluded) { if (source == null) retu
|
|
|
926
925
|
|
|
927
926
|
function _objectWithoutPropertiesLoose$1(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
928
927
|
|
|
929
|
-
function _objectSpread$
|
|
928
|
+
function _objectSpread$6(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? Object(arguments[i]) : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty$6(target, key, source[key]); }); } return target; }
|
|
930
929
|
|
|
931
|
-
function _defineProperty$
|
|
930
|
+
function _defineProperty$6(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
932
931
|
var twoToneColorPalette = {
|
|
933
932
|
primaryColor: '#333',
|
|
934
933
|
secondaryColor: '#E6E6E6',
|
|
@@ -944,11 +943,11 @@ function setTwoToneColors(_ref) {
|
|
|
944
943
|
}
|
|
945
944
|
|
|
946
945
|
function getTwoToneColors() {
|
|
947
|
-
return _objectSpread$
|
|
946
|
+
return _objectSpread$6({}, twoToneColorPalette);
|
|
948
947
|
}
|
|
949
948
|
|
|
950
949
|
var IconBase = function IconBase(props, context) {
|
|
951
|
-
var _props$context$attrs = _objectSpread$
|
|
950
|
+
var _props$context$attrs = _objectSpread$6({}, props, context.attrs),
|
|
952
951
|
icon = _props$context$attrs.icon,
|
|
953
952
|
primaryColor = _props$context$attrs.primaryColor,
|
|
954
953
|
secondaryColor = _props$context$attrs.secondaryColor,
|
|
@@ -973,12 +972,12 @@ var IconBase = function IconBase(props, context) {
|
|
|
973
972
|
var target = icon;
|
|
974
973
|
|
|
975
974
|
if (target && typeof target.icon === 'function') {
|
|
976
|
-
target = _objectSpread$
|
|
975
|
+
target = _objectSpread$6({}, target, {
|
|
977
976
|
icon: target.icon(colors.primaryColor, colors.secondaryColor)
|
|
978
977
|
});
|
|
979
978
|
}
|
|
980
979
|
|
|
981
|
-
return generate(target.icon, "svg-".concat(target.name), _objectSpread$
|
|
980
|
+
return generate(target.icon, "svg-".concat(target.name), _objectSpread$6({}, restProps, {
|
|
982
981
|
'data-icon': target.name,
|
|
983
982
|
width: '1em',
|
|
984
983
|
height: '1em',
|
|
@@ -1045,9 +1044,9 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
1045
1044
|
|
|
1046
1045
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
1047
1046
|
|
|
1048
|
-
function _objectSpread$
|
|
1047
|
+
function _objectSpread$5(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? Object(arguments[i]) : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty$5(target, key, source[key]); }); } return target; }
|
|
1049
1048
|
|
|
1050
|
-
function _defineProperty$
|
|
1049
|
+
function _defineProperty$5(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
1051
1050
|
|
|
1052
1051
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
1053
1052
|
|
|
@@ -1058,7 +1057,7 @@ setTwoToneColor('#1890ff');
|
|
|
1058
1057
|
var Icon = function Icon(props, context) {
|
|
1059
1058
|
var _classObj;
|
|
1060
1059
|
|
|
1061
|
-
var _props$context$attrs = _objectSpread$
|
|
1060
|
+
var _props$context$attrs = _objectSpread$5({}, props, context.attrs),
|
|
1062
1061
|
cls = _props$context$attrs["class"],
|
|
1063
1062
|
icon = _props$context$attrs.icon,
|
|
1064
1063
|
spin = _props$context$attrs.spin,
|
|
@@ -1070,7 +1069,7 @@ var Icon = function Icon(props, context) {
|
|
|
1070
1069
|
|
|
1071
1070
|
var classObj = (_classObj = {
|
|
1072
1071
|
anticon: true
|
|
1073
|
-
}, _defineProperty$
|
|
1072
|
+
}, _defineProperty$5(_classObj, "anticon-".concat(icon.name), Boolean(icon.name)), _defineProperty$5(_classObj, cls, cls), _classObj);
|
|
1074
1073
|
var svgClassString = spin === '' || !!spin || icon.name === 'loading' ? 'anticon-spin' : '';
|
|
1075
1074
|
var iconTabIndex = tabindex;
|
|
1076
1075
|
|
|
@@ -1089,7 +1088,7 @@ var Icon = function Icon(props, context) {
|
|
|
1089
1088
|
primaryColor = _normalizeTwoToneColo2[0],
|
|
1090
1089
|
secondaryColor = _normalizeTwoToneColo2[1];
|
|
1091
1090
|
|
|
1092
|
-
return vue.createVNode("span", _objectSpread$
|
|
1091
|
+
return vue.createVNode("span", _objectSpread$5({
|
|
1093
1092
|
"role": "img",
|
|
1094
1093
|
"aria-label": icon.name
|
|
1095
1094
|
}, restProps, {
|
|
@@ -1116,18 +1115,58 @@ Icon.getTwoToneColor = getTwoToneColor;
|
|
|
1116
1115
|
Icon.setTwoToneColor = setTwoToneColor;
|
|
1117
1116
|
var AntdIcon = Icon;
|
|
1118
1117
|
|
|
1118
|
+
// This icon file is generated automatically.
|
|
1119
|
+
var CloseCircleFilled$2 = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 01-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z" } }] }, "name": "close-circle", "theme": "filled" };
|
|
1120
|
+
var CloseCircleFilledSvg = CloseCircleFilled$2;
|
|
1121
|
+
|
|
1122
|
+
function _objectSpread$4(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? Object(arguments[i]) : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty$4(target, key, source[key]); }); } return target; }
|
|
1123
|
+
|
|
1124
|
+
function _defineProperty$4(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
1125
|
+
|
|
1126
|
+
var CloseCircleFilled = function CloseCircleFilled(props, context) {
|
|
1127
|
+
var p = _objectSpread$4({}, props, context.attrs);
|
|
1128
|
+
|
|
1129
|
+
return vue.createVNode(AntdIcon, _objectSpread$4({}, p, {
|
|
1130
|
+
"icon": CloseCircleFilledSvg
|
|
1131
|
+
}), null);
|
|
1132
|
+
};
|
|
1133
|
+
|
|
1134
|
+
CloseCircleFilled.displayName = 'CloseCircleFilled';
|
|
1135
|
+
CloseCircleFilled.inheritAttrs = false;
|
|
1136
|
+
var CloseCircleFilled$1 = CloseCircleFilled;
|
|
1137
|
+
|
|
1138
|
+
// This icon file is generated automatically.
|
|
1139
|
+
var CloseOutlined$2 = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0 00203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z" } }] }, "name": "close", "theme": "outlined" };
|
|
1140
|
+
var CloseOutlinedSvg = CloseOutlined$2;
|
|
1141
|
+
|
|
1142
|
+
function _objectSpread$3(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? Object(arguments[i]) : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty$3(target, key, source[key]); }); } return target; }
|
|
1143
|
+
|
|
1144
|
+
function _defineProperty$3(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
1145
|
+
|
|
1146
|
+
var CloseOutlined = function CloseOutlined(props, context) {
|
|
1147
|
+
var p = _objectSpread$3({}, props, context.attrs);
|
|
1148
|
+
|
|
1149
|
+
return vue.createVNode(AntdIcon, _objectSpread$3({}, p, {
|
|
1150
|
+
"icon": CloseOutlinedSvg
|
|
1151
|
+
}), null);
|
|
1152
|
+
};
|
|
1153
|
+
|
|
1154
|
+
CloseOutlined.displayName = 'CloseOutlined';
|
|
1155
|
+
CloseOutlined.inheritAttrs = false;
|
|
1156
|
+
var CloseOutlined$1 = CloseOutlined;
|
|
1157
|
+
|
|
1119
1158
|
// This icon file is generated automatically.
|
|
1120
1159
|
var DownOutlined$2 = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z" } }] }, "name": "down", "theme": "outlined" };
|
|
1121
1160
|
var DownOutlinedSvg = DownOutlined$2;
|
|
1122
1161
|
|
|
1123
|
-
function _objectSpread$
|
|
1162
|
+
function _objectSpread$2(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? Object(arguments[i]) : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty$2(target, key, source[key]); }); } return target; }
|
|
1124
1163
|
|
|
1125
|
-
function _defineProperty$
|
|
1164
|
+
function _defineProperty$2(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
1126
1165
|
|
|
1127
1166
|
var DownOutlined = function DownOutlined(props, context) {
|
|
1128
|
-
var p = _objectSpread$
|
|
1167
|
+
var p = _objectSpread$2({}, props, context.attrs);
|
|
1129
1168
|
|
|
1130
|
-
return vue.createVNode(AntdIcon, _objectSpread$
|
|
1169
|
+
return vue.createVNode(AntdIcon, _objectSpread$2({}, p, {
|
|
1131
1170
|
"icon": DownOutlinedSvg
|
|
1132
1171
|
}), null);
|
|
1133
1172
|
};
|
|
@@ -1136,6 +1175,26 @@ DownOutlined.displayName = 'DownOutlined';
|
|
|
1136
1175
|
DownOutlined.inheritAttrs = false;
|
|
1137
1176
|
var DownOutlined$1 = DownOutlined;
|
|
1138
1177
|
|
|
1178
|
+
// This icon file is generated automatically.
|
|
1179
|
+
var RightOutlined$2 = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z" } }] }, "name": "right", "theme": "outlined" };
|
|
1180
|
+
var RightOutlinedSvg = RightOutlined$2;
|
|
1181
|
+
|
|
1182
|
+
function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? Object(arguments[i]) : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty$1(target, key, source[key]); }); } return target; }
|
|
1183
|
+
|
|
1184
|
+
function _defineProperty$1(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
1185
|
+
|
|
1186
|
+
var RightOutlined = function RightOutlined(props, context) {
|
|
1187
|
+
var p = _objectSpread$1({}, props, context.attrs);
|
|
1188
|
+
|
|
1189
|
+
return vue.createVNode(AntdIcon, _objectSpread$1({}, p, {
|
|
1190
|
+
"icon": RightOutlinedSvg
|
|
1191
|
+
}), null);
|
|
1192
|
+
};
|
|
1193
|
+
|
|
1194
|
+
RightOutlined.displayName = 'RightOutlined';
|
|
1195
|
+
RightOutlined.inheritAttrs = false;
|
|
1196
|
+
var RightOutlined$1 = RightOutlined;
|
|
1197
|
+
|
|
1139
1198
|
// This icon file is generated automatically.
|
|
1140
1199
|
var UpOutlined$2 = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z" } }] }, "name": "up", "theme": "outlined" };
|
|
1141
1200
|
var UpOutlinedSvg = UpOutlined$2;
|
|
@@ -1176,7 +1235,9 @@ const searchFilterProps = Object.assign({ userRule: {
|
|
|
1176
1235
|
},
|
|
1177
1236
|
}, value: {
|
|
1178
1237
|
type: Object,
|
|
1179
|
-
|
|
1238
|
+
default() {
|
|
1239
|
+
return {};
|
|
1240
|
+
},
|
|
1180
1241
|
}, ruleSpan: {
|
|
1181
1242
|
type: Object,
|
|
1182
1243
|
default() {
|
|
@@ -1192,10 +1253,10 @@ var _export_sfc = (sfc, props) => {
|
|
|
1192
1253
|
return target;
|
|
1193
1254
|
};
|
|
1194
1255
|
|
|
1195
|
-
const _hoisted_1$
|
|
1196
|
-
const _hoisted_2 = /* @__PURE__ */ vue.createTextVNode("\u67E5\u8BE2");
|
|
1197
|
-
const _hoisted_3 = /* @__PURE__ */ vue.createTextVNode("\u91CD\u7F6E");
|
|
1198
|
-
const _sfc_main$
|
|
1256
|
+
const _hoisted_1$2 = { class: "bm-search-filter-btn" };
|
|
1257
|
+
const _hoisted_2$1 = /* @__PURE__ */ vue.createTextVNode("\u67E5\u8BE2");
|
|
1258
|
+
const _hoisted_3$1 = /* @__PURE__ */ vue.createTextVNode("\u91CD\u7F6E");
|
|
1259
|
+
const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
|
|
1199
1260
|
props: searchResetBtnProps,
|
|
1200
1261
|
emits: ["submit", "reset", "expand"],
|
|
1201
1262
|
setup(__props, { emit: emits }) {
|
|
@@ -1216,7 +1277,8 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
1216
1277
|
emits("reset");
|
|
1217
1278
|
}
|
|
1218
1279
|
return (_ctx, _cache) => {
|
|
1219
|
-
|
|
1280
|
+
const _component_a_button = vue.resolveComponent("a-button");
|
|
1281
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$2, [
|
|
1220
1282
|
props.showExpandBtn ? (vue.openBlock(), vue.createElementBlock("span", {
|
|
1221
1283
|
key: 0,
|
|
1222
1284
|
class: "expand-btn",
|
|
@@ -1231,18 +1293,18 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
1231
1293
|
style: vue.normalizeStyle(Object.assign(expandBtnStyle))
|
|
1232
1294
|
}, null, 8, ["style"]))
|
|
1233
1295
|
])) : vue.createCommentVNode("v-if", true),
|
|
1234
|
-
vue.createVNode(
|
|
1296
|
+
vue.createVNode(_component_a_button, {
|
|
1235
1297
|
type: "primary",
|
|
1236
1298
|
onClick: handleSubmit
|
|
1237
1299
|
}, {
|
|
1238
1300
|
default: vue.withCtx(() => [
|
|
1239
|
-
_hoisted_2
|
|
1301
|
+
_hoisted_2$1
|
|
1240
1302
|
]),
|
|
1241
1303
|
_: 1
|
|
1242
1304
|
}),
|
|
1243
|
-
vue.createVNode(
|
|
1305
|
+
vue.createVNode(_component_a_button, { onClick: handleReset }, {
|
|
1244
1306
|
default: vue.withCtx(() => [
|
|
1245
|
-
_hoisted_3
|
|
1307
|
+
_hoisted_3$1
|
|
1246
1308
|
]),
|
|
1247
1309
|
_: 1
|
|
1248
1310
|
})
|
|
@@ -1250,7 +1312,510 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
1250
1312
|
};
|
|
1251
1313
|
}
|
|
1252
1314
|
});
|
|
1253
|
-
var SearchResetBtn = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1315
|
+
var SearchResetBtn = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__file", "search-reset-btn.vue"]]);
|
|
1316
|
+
|
|
1317
|
+
const propsConfig = {
|
|
1318
|
+
options: {
|
|
1319
|
+
type: Array,
|
|
1320
|
+
default() {
|
|
1321
|
+
return [];
|
|
1322
|
+
},
|
|
1323
|
+
},
|
|
1324
|
+
modelValue: {
|
|
1325
|
+
type: Array,
|
|
1326
|
+
default() {
|
|
1327
|
+
return [];
|
|
1328
|
+
},
|
|
1329
|
+
},
|
|
1330
|
+
optionValueName: {
|
|
1331
|
+
type: String,
|
|
1332
|
+
default: 'value',
|
|
1333
|
+
},
|
|
1334
|
+
optionLabelName: {
|
|
1335
|
+
type: String,
|
|
1336
|
+
default: 'label',
|
|
1337
|
+
},
|
|
1338
|
+
maxTagCount: {
|
|
1339
|
+
type: Number,
|
|
1340
|
+
default: 1,
|
|
1341
|
+
},
|
|
1342
|
+
placeholder: {
|
|
1343
|
+
type: String,
|
|
1344
|
+
default: '请选择',
|
|
1345
|
+
},
|
|
1346
|
+
allowClear: {
|
|
1347
|
+
type: Boolean,
|
|
1348
|
+
default: true,
|
|
1349
|
+
},
|
|
1350
|
+
};
|
|
1351
|
+
|
|
1352
|
+
const _hoisted_1$1 = { class: "bm-multi-cascader-wrapper" };
|
|
1353
|
+
const _hoisted_2 = { class: "bm-multi-cascader" };
|
|
1354
|
+
const _hoisted_3 = { class: "bm-multi-cascader-inner" };
|
|
1355
|
+
const _hoisted_4 = {
|
|
1356
|
+
key: 0,
|
|
1357
|
+
class: "bm-multi-cascader-tags"
|
|
1358
|
+
};
|
|
1359
|
+
const _hoisted_5 = { class: "bm-multi-cascader-tag-text" };
|
|
1360
|
+
const _hoisted_6 = ["onClick"];
|
|
1361
|
+
const _hoisted_7 = {
|
|
1362
|
+
key: 0,
|
|
1363
|
+
class: "bm-multi-cascader-tag"
|
|
1364
|
+
};
|
|
1365
|
+
const _hoisted_8 = { class: "bm-multi-cascader-tag-text" };
|
|
1366
|
+
const _hoisted_9 = {
|
|
1367
|
+
key: 1,
|
|
1368
|
+
class: "bm-multi-cascader-placeholder"
|
|
1369
|
+
};
|
|
1370
|
+
const _hoisted_10 = { class: "bm-multi-cascader-action" };
|
|
1371
|
+
const _hoisted_11 = {
|
|
1372
|
+
key: 0,
|
|
1373
|
+
class: "bm-multi-cascader-popover"
|
|
1374
|
+
};
|
|
1375
|
+
const _hoisted_12 = { class: "bm-multi-cascader-moduler-container" };
|
|
1376
|
+
const _hoisted_13 = ["onClick"];
|
|
1377
|
+
const _hoisted_14 = /* @__PURE__ */ vue.createElementVNode("span", { class: "bm-multi-cascader-item-desc" }, "\u5168\u9009", -1);
|
|
1378
|
+
const _hoisted_15 = ["onClick"];
|
|
1379
|
+
const _hoisted_16 = { class: "bm-multi-cascader-item-desc" };
|
|
1380
|
+
const _hoisted_17 = { class: "bm-multi-cascader-item-text" };
|
|
1381
|
+
const _hoisted_18 = {
|
|
1382
|
+
key: 1,
|
|
1383
|
+
class: "bm-multi-cascader-popover"
|
|
1384
|
+
};
|
|
1385
|
+
const _hoisted_19 = { class: "bm-multi-cascader-moduler" };
|
|
1386
|
+
const __default__$1 = {
|
|
1387
|
+
name: "BmMultiCascaderCompose"
|
|
1388
|
+
};
|
|
1389
|
+
const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
1390
|
+
...__default__$1,
|
|
1391
|
+
props: propsConfig,
|
|
1392
|
+
emits: ["update:modelValue", "change"],
|
|
1393
|
+
setup(__props, { emit: emits }) {
|
|
1394
|
+
const props = __props;
|
|
1395
|
+
const path = vue.ref([]);
|
|
1396
|
+
const optionsMap = vue.computed(() => {
|
|
1397
|
+
let res = {};
|
|
1398
|
+
const getValue = (list) => {
|
|
1399
|
+
list.forEach((row) => {
|
|
1400
|
+
let key = row[props.optionValueName];
|
|
1401
|
+
let value = row[props.optionLabelName];
|
|
1402
|
+
if (!res[key]) {
|
|
1403
|
+
res[key] = {
|
|
1404
|
+
[props.optionValueName]: key,
|
|
1405
|
+
[props.optionLabelName]: value
|
|
1406
|
+
};
|
|
1407
|
+
}
|
|
1408
|
+
if (row.children) {
|
|
1409
|
+
getValue(row.children);
|
|
1410
|
+
}
|
|
1411
|
+
});
|
|
1412
|
+
};
|
|
1413
|
+
getValue(props.options);
|
|
1414
|
+
return res;
|
|
1415
|
+
});
|
|
1416
|
+
const checkedMap = vue.computed(() => {
|
|
1417
|
+
let res = [];
|
|
1418
|
+
props.modelValue.forEach((item) => {
|
|
1419
|
+
let temp = optionsMap.value[item] || {};
|
|
1420
|
+
temp = {
|
|
1421
|
+
[props.optionValueName]: item,
|
|
1422
|
+
[props.optionLabelName]: item,
|
|
1423
|
+
...temp
|
|
1424
|
+
};
|
|
1425
|
+
res.push(temp);
|
|
1426
|
+
});
|
|
1427
|
+
return res;
|
|
1428
|
+
});
|
|
1429
|
+
const checkedHideCount = vue.computed(() => {
|
|
1430
|
+
if (props.maxTagCount && checkedMap.value.length > props.maxTagCount) {
|
|
1431
|
+
return checkedMap.value.length - props.maxTagCount;
|
|
1432
|
+
} else {
|
|
1433
|
+
return 0;
|
|
1434
|
+
}
|
|
1435
|
+
});
|
|
1436
|
+
const checkedShowMap = vue.computed(() => {
|
|
1437
|
+
if (checkedHideCount.value > 0) {
|
|
1438
|
+
return checkedMap.value.slice(0, props.maxTagCount);
|
|
1439
|
+
} else {
|
|
1440
|
+
return checkedMap.value;
|
|
1441
|
+
}
|
|
1442
|
+
});
|
|
1443
|
+
const modulersOptions = vue.computed(() => {
|
|
1444
|
+
let res = [{ children: props.options }];
|
|
1445
|
+
for (let i = 0; i < path.value.length; i++) {
|
|
1446
|
+
let parent = res[res.length - 1];
|
|
1447
|
+
let index = path.value[i].index;
|
|
1448
|
+
let next = parent.children?.[index];
|
|
1449
|
+
next && res.push(next);
|
|
1450
|
+
}
|
|
1451
|
+
return res;
|
|
1452
|
+
});
|
|
1453
|
+
const modulersStatusOptions = vue.computed(() => {
|
|
1454
|
+
let res = [];
|
|
1455
|
+
let parentChecked = false;
|
|
1456
|
+
for (let i = 0; i < modulersOptions.value.length; i++) {
|
|
1457
|
+
let tempRes = [];
|
|
1458
|
+
let tempChildren = modulersOptions.value[i].children;
|
|
1459
|
+
if (tempChildren) {
|
|
1460
|
+
for (let j = 0; j < tempChildren.length; j++) {
|
|
1461
|
+
if (parentChecked) {
|
|
1462
|
+
tempRes.push({ checked: true });
|
|
1463
|
+
} else {
|
|
1464
|
+
let tempRes2 = tempChildren[j];
|
|
1465
|
+
let tempIndex2 = props.modelValue.indexOf(tempRes2[props.optionValueName]);
|
|
1466
|
+
if (tempIndex2 !== -1) {
|
|
1467
|
+
tempRes.push({ checked: true });
|
|
1468
|
+
} else {
|
|
1469
|
+
if (tempRes2.children) {
|
|
1470
|
+
let allSonValues = getAllSonValues(tempRes2.children);
|
|
1471
|
+
let indeterminate = false;
|
|
1472
|
+
for (let k = 0; k < allSonValues.length; k++) {
|
|
1473
|
+
if (props.modelValue.indexOf(allSonValues[k]) !== -1) {
|
|
1474
|
+
indeterminate = true;
|
|
1475
|
+
break;
|
|
1476
|
+
}
|
|
1477
|
+
}
|
|
1478
|
+
tempRes.push({ checked: false, indeterminate });
|
|
1479
|
+
} else {
|
|
1480
|
+
tempRes.push({ checked: false });
|
|
1481
|
+
}
|
|
1482
|
+
}
|
|
1483
|
+
}
|
|
1484
|
+
}
|
|
1485
|
+
}
|
|
1486
|
+
res.push(tempRes);
|
|
1487
|
+
if (!parentChecked) {
|
|
1488
|
+
if (tempChildren) {
|
|
1489
|
+
for (let j = 0; j < tempChildren.length; j++) {
|
|
1490
|
+
let tempRes2 = tempChildren[j];
|
|
1491
|
+
let tempIndex2 = props.modelValue.indexOf(tempRes2[props.optionValueName]);
|
|
1492
|
+
if (path.value[i] && tempRes2[props.optionValueName] === path.value[i][props.optionValueName] && tempIndex2 !== -1) {
|
|
1493
|
+
parentChecked = true;
|
|
1494
|
+
break;
|
|
1495
|
+
}
|
|
1496
|
+
}
|
|
1497
|
+
}
|
|
1498
|
+
}
|
|
1499
|
+
}
|
|
1500
|
+
return res;
|
|
1501
|
+
});
|
|
1502
|
+
const modulersAllStatusOptions = vue.computed(() => {
|
|
1503
|
+
let res = [];
|
|
1504
|
+
for (let i = 0; i < modulersStatusOptions.value.length; i++) {
|
|
1505
|
+
let checked = true;
|
|
1506
|
+
let indeterminate = false;
|
|
1507
|
+
for (let j = 0; j < modulersStatusOptions.value[i].length; j++) {
|
|
1508
|
+
let tempRes2 = modulersStatusOptions.value[i][j];
|
|
1509
|
+
if (!tempRes2.checked) {
|
|
1510
|
+
checked = false;
|
|
1511
|
+
break;
|
|
1512
|
+
}
|
|
1513
|
+
}
|
|
1514
|
+
if (!checked) {
|
|
1515
|
+
for (let k = 0; k < modulersStatusOptions.value[i].length; k++) {
|
|
1516
|
+
let tempRes2 = modulersStatusOptions.value[i][k];
|
|
1517
|
+
if (tempRes2.indeterminate || tempRes2.checked) {
|
|
1518
|
+
indeterminate = true;
|
|
1519
|
+
break;
|
|
1520
|
+
}
|
|
1521
|
+
}
|
|
1522
|
+
}
|
|
1523
|
+
res.push({ checked, indeterminate });
|
|
1524
|
+
}
|
|
1525
|
+
return res;
|
|
1526
|
+
});
|
|
1527
|
+
const handleClick = (option, level, index) => {
|
|
1528
|
+
if (option.children) {
|
|
1529
|
+
path.value.splice(level);
|
|
1530
|
+
path.value[level] = { ...option, index };
|
|
1531
|
+
} else {
|
|
1532
|
+
path.value.splice(level);
|
|
1533
|
+
handleToggle(option, level, index);
|
|
1534
|
+
}
|
|
1535
|
+
};
|
|
1536
|
+
const handleClickCheckbox = (option, level, index) => {
|
|
1537
|
+
if (option.children) {
|
|
1538
|
+
path.value.splice(level);
|
|
1539
|
+
path.value[level] = { ...option, index };
|
|
1540
|
+
} else {
|
|
1541
|
+
path.value.splice(level);
|
|
1542
|
+
}
|
|
1543
|
+
handleToggle(option, level, index);
|
|
1544
|
+
};
|
|
1545
|
+
const handleToggle = (option, level, index) => {
|
|
1546
|
+
let checked = [...props.modelValue];
|
|
1547
|
+
let unChecked = [];
|
|
1548
|
+
let tempOption = modulersOptions.value[level].children?.[index];
|
|
1549
|
+
let tempStatus = modulersStatusOptions.value[level][index];
|
|
1550
|
+
if (tempStatus.checked) {
|
|
1551
|
+
unChecked.push(tempOption?.[props.optionValueName]);
|
|
1552
|
+
if (tempOption?.children) {
|
|
1553
|
+
let allSonValues = getAllSonValues(tempOption.children);
|
|
1554
|
+
unChecked = unChecked.concat(allSonValues);
|
|
1555
|
+
}
|
|
1556
|
+
if (level >= 0) {
|
|
1557
|
+
tempOption = modulersOptions.value[level];
|
|
1558
|
+
}
|
|
1559
|
+
for (let i = level; i >= 0; i--) {
|
|
1560
|
+
let tempOption2 = modulersOptions.value[i];
|
|
1561
|
+
let tempStatus2 = modulersAllStatusOptions.value[i];
|
|
1562
|
+
if (tempStatus2.checked) {
|
|
1563
|
+
let tempValues = tempOption2.children?.map((item) => item[props.optionValueName]).filter((item) => item !== tempOption?.[props.optionValueName]) || [];
|
|
1564
|
+
unChecked.push(tempOption2[props.optionValueName]);
|
|
1565
|
+
checked = checked.concat(tempValues);
|
|
1566
|
+
}
|
|
1567
|
+
tempOption = tempOption2;
|
|
1568
|
+
}
|
|
1569
|
+
} else {
|
|
1570
|
+
checked.push(tempOption?.[props.optionValueName]);
|
|
1571
|
+
if (tempOption?.children) {
|
|
1572
|
+
let allSonValues = getAllSonValues(tempOption.children);
|
|
1573
|
+
allSonValues = allSonValues.filter((item) => item !== tempOption?.[props.optionValueName]);
|
|
1574
|
+
unChecked = unChecked.concat(allSonValues);
|
|
1575
|
+
}
|
|
1576
|
+
for (let i = level; i > 0; i--) {
|
|
1577
|
+
let tempOption2 = modulersOptions.value[i];
|
|
1578
|
+
let allIsChecked = true;
|
|
1579
|
+
tempOption2.children?.forEach((item) => {
|
|
1580
|
+
if (checked.indexOf(item[props.optionValueName]) === -1) {
|
|
1581
|
+
allIsChecked = false;
|
|
1582
|
+
}
|
|
1583
|
+
});
|
|
1584
|
+
if (allIsChecked) {
|
|
1585
|
+
checked.push(tempOption2[props.optionValueName]);
|
|
1586
|
+
if (tempOption2.children) {
|
|
1587
|
+
let allSonValues = getAllSonValues(tempOption2.children);
|
|
1588
|
+
allSonValues = allSonValues.filter((item) => item !== tempOption2[props.optionValueName]);
|
|
1589
|
+
unChecked = unChecked.concat(allSonValues);
|
|
1590
|
+
}
|
|
1591
|
+
}
|
|
1592
|
+
}
|
|
1593
|
+
}
|
|
1594
|
+
unChecked = unChecked.filter((item, index2, arr) => {
|
|
1595
|
+
return item !== void 0 && arr.indexOf(item) === index2;
|
|
1596
|
+
});
|
|
1597
|
+
checked = checked.filter((item, index2, arr) => {
|
|
1598
|
+
return item !== void 0 && arr.indexOf(item) === index2;
|
|
1599
|
+
}).filter((item) => {
|
|
1600
|
+
return unChecked.indexOf(item) === -1;
|
|
1601
|
+
});
|
|
1602
|
+
emits("update:modelValue", checked);
|
|
1603
|
+
emits("change", checked);
|
|
1604
|
+
};
|
|
1605
|
+
const handleClickAll = (level) => {
|
|
1606
|
+
let checked = [...props.modelValue];
|
|
1607
|
+
let unChecked = [];
|
|
1608
|
+
let tempOption = modulersOptions.value[level];
|
|
1609
|
+
let tempStatus = modulersAllStatusOptions.value[level];
|
|
1610
|
+
if (level === 0) {
|
|
1611
|
+
if (tempStatus.checked) {
|
|
1612
|
+
checked = [];
|
|
1613
|
+
} else {
|
|
1614
|
+
checked = modulersOptions.value[level].children?.map((item) => item[props.optionValueName]) || [];
|
|
1615
|
+
}
|
|
1616
|
+
} else {
|
|
1617
|
+
if (tempStatus.checked) {
|
|
1618
|
+
unChecked.push(tempOption[props.optionValueName]);
|
|
1619
|
+
if (tempOption.children) {
|
|
1620
|
+
let allSonValues = getAllSonValues(tempOption.children);
|
|
1621
|
+
unChecked = unChecked.concat(allSonValues);
|
|
1622
|
+
}
|
|
1623
|
+
for (let i = level; i >= 0; i--) {
|
|
1624
|
+
let tempOption2 = modulersOptions.value[i];
|
|
1625
|
+
let tempStatus2 = modulersAllStatusOptions.value[i];
|
|
1626
|
+
if (tempStatus2.checked) {
|
|
1627
|
+
let tempValues = tempOption2.children?.map((item) => item[props.optionValueName]).filter((item) => item !== tempOption[props.optionValueName]) || [];
|
|
1628
|
+
unChecked.push(tempOption2[props.optionValueName]);
|
|
1629
|
+
checked = checked.concat(tempValues);
|
|
1630
|
+
}
|
|
1631
|
+
tempOption = tempOption2;
|
|
1632
|
+
}
|
|
1633
|
+
} else {
|
|
1634
|
+
checked.push(tempOption[props.optionValueName]);
|
|
1635
|
+
if (tempOption.children) {
|
|
1636
|
+
let allSonValues = getAllSonValues(tempOption.children);
|
|
1637
|
+
allSonValues = allSonValues.filter((item) => item !== tempOption[props.optionValueName]);
|
|
1638
|
+
unChecked = unChecked.concat(allSonValues);
|
|
1639
|
+
}
|
|
1640
|
+
for (let i = level; i > 0; i--) {
|
|
1641
|
+
let tempOption2 = modulersOptions.value[i];
|
|
1642
|
+
let allIsChecked = true;
|
|
1643
|
+
tempOption2.children?.forEach((item) => {
|
|
1644
|
+
if (checked.indexOf(item[props.optionValueName]) === -1) {
|
|
1645
|
+
allIsChecked = false;
|
|
1646
|
+
}
|
|
1647
|
+
});
|
|
1648
|
+
if (allIsChecked) {
|
|
1649
|
+
checked.push(tempOption2[props.optionValueName]);
|
|
1650
|
+
if (tempOption2.children) {
|
|
1651
|
+
let allSonValues = getAllSonValues(tempOption2.children);
|
|
1652
|
+
allSonValues = allSonValues.filter((item) => item !== tempOption2[props.optionValueName]);
|
|
1653
|
+
unChecked = unChecked.concat(allSonValues);
|
|
1654
|
+
}
|
|
1655
|
+
}
|
|
1656
|
+
}
|
|
1657
|
+
}
|
|
1658
|
+
}
|
|
1659
|
+
unChecked = unChecked.filter((item, index, arr) => {
|
|
1660
|
+
return item !== void 0 && arr.indexOf(item) === index;
|
|
1661
|
+
});
|
|
1662
|
+
checked = checked.filter((item, index, arr) => {
|
|
1663
|
+
return item !== void 0 && arr.indexOf(item) === index;
|
|
1664
|
+
}).filter((item) => {
|
|
1665
|
+
return unChecked.indexOf(item) === -1;
|
|
1666
|
+
});
|
|
1667
|
+
emits("update:modelValue", checked);
|
|
1668
|
+
emits("change", checked);
|
|
1669
|
+
};
|
|
1670
|
+
const getAllSonValues = (data) => {
|
|
1671
|
+
let res = [];
|
|
1672
|
+
const getValue = (list) => {
|
|
1673
|
+
list.forEach((row) => {
|
|
1674
|
+
if (row.children) {
|
|
1675
|
+
res.push(row[props.optionValueName]);
|
|
1676
|
+
getValue(row.children);
|
|
1677
|
+
} else {
|
|
1678
|
+
res.push(row[props.optionValueName]);
|
|
1679
|
+
}
|
|
1680
|
+
});
|
|
1681
|
+
};
|
|
1682
|
+
getValue(data);
|
|
1683
|
+
return res;
|
|
1684
|
+
};
|
|
1685
|
+
const removeItem = (value) => {
|
|
1686
|
+
let checked = [...props.modelValue];
|
|
1687
|
+
checked = checked.filter((item) => item !== value);
|
|
1688
|
+
emits("update:modelValue", checked);
|
|
1689
|
+
emits("change", checked);
|
|
1690
|
+
};
|
|
1691
|
+
const removeAll = () => {
|
|
1692
|
+
emits("update:modelValue", []);
|
|
1693
|
+
emits("change", []);
|
|
1694
|
+
};
|
|
1695
|
+
return (_ctx, _cache) => {
|
|
1696
|
+
const _component_a_checkbox = vue.resolveComponent("a-checkbox");
|
|
1697
|
+
const _component_a_form_item_rest = vue.resolveComponent("a-form-item-rest");
|
|
1698
|
+
const _component_a_empty = vue.resolveComponent("a-empty");
|
|
1699
|
+
const _component_v_dropdown = vue.resolveComponent("v-dropdown");
|
|
1700
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$1, [
|
|
1701
|
+
vue.createVNode(_component_v_dropdown, {
|
|
1702
|
+
placement: "bottom-start",
|
|
1703
|
+
container: false,
|
|
1704
|
+
distance: 2
|
|
1705
|
+
}, {
|
|
1706
|
+
popper: vue.withCtx(() => [
|
|
1707
|
+
props.options.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_11, [
|
|
1708
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(modulersOptions), (moduler, level) => {
|
|
1709
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
1710
|
+
key: level,
|
|
1711
|
+
class: "bm-multi-cascader-moduler"
|
|
1712
|
+
}, [
|
|
1713
|
+
vue.createCommentVNode(" container "),
|
|
1714
|
+
vue.createElementVNode("section", _hoisted_12, [
|
|
1715
|
+
moduler.children && moduler.children.length > 0 ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
1716
|
+
key: 0,
|
|
1717
|
+
class: "bm-multi-cascader-item bm-multi-cascader-all",
|
|
1718
|
+
onClick: ($event) => handleClickAll(level)
|
|
1719
|
+
}, [
|
|
1720
|
+
vue.createVNode(_component_a_form_item_rest, null, {
|
|
1721
|
+
default: vue.withCtx(() => [
|
|
1722
|
+
vue.createVNode(_component_a_checkbox, {
|
|
1723
|
+
class: "bm-multi-cascader-item-checkbox",
|
|
1724
|
+
checked: vue.unref(modulersAllStatusOptions)[level].checked,
|
|
1725
|
+
indeterminate: vue.unref(modulersAllStatusOptions)[level].indeterminate,
|
|
1726
|
+
onChange: _cache[0] || (_cache[0] = vue.withModifiers(() => {
|
|
1727
|
+
}, ["stop"]))
|
|
1728
|
+
}, null, 8, ["checked", "indeterminate"])
|
|
1729
|
+
]),
|
|
1730
|
+
_: 2
|
|
1731
|
+
}, 1024),
|
|
1732
|
+
_hoisted_14
|
|
1733
|
+
], 8, _hoisted_13)) : vue.createCommentVNode("v-if", true),
|
|
1734
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(moduler.children, (option, index) => {
|
|
1735
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
1736
|
+
key: index,
|
|
1737
|
+
class: vue.normalizeClass(["bm-multi-cascader-item", {
|
|
1738
|
+
"is-active": path.value.find((item) => option[props.optionValueName] === item[props.optionValueName])
|
|
1739
|
+
}]),
|
|
1740
|
+
onClick: ($event) => handleClick(option, level, index)
|
|
1741
|
+
}, [
|
|
1742
|
+
vue.createVNode(_component_a_form_item_rest, null, {
|
|
1743
|
+
default: vue.withCtx(() => [
|
|
1744
|
+
vue.createVNode(_component_a_checkbox, {
|
|
1745
|
+
class: "bm-multi-cascader-item-checkbox",
|
|
1746
|
+
checked: vue.unref(modulersStatusOptions)[level][index].checked,
|
|
1747
|
+
indeterminate: vue.unref(modulersStatusOptions)[level][index].indeterminate,
|
|
1748
|
+
onClick: vue.withModifiers(($event) => handleClickCheckbox(option, level, index), ["stop"]),
|
|
1749
|
+
onChange: _cache[1] || (_cache[1] = vue.withModifiers(() => {
|
|
1750
|
+
}, ["stop"]))
|
|
1751
|
+
}, null, 8, ["checked", "indeterminate", "onClick"])
|
|
1752
|
+
]),
|
|
1753
|
+
_: 2
|
|
1754
|
+
}, 1024),
|
|
1755
|
+
vue.createElementVNode("span", _hoisted_16, [
|
|
1756
|
+
vue.createElementVNode("span", _hoisted_17, vue.toDisplayString(option[props.optionLabelName]), 1),
|
|
1757
|
+
option.children ? (vue.openBlock(), vue.createBlock(vue.unref(RightOutlined$1), {
|
|
1758
|
+
key: 0,
|
|
1759
|
+
class: "bm-multi-cascader-item-caret"
|
|
1760
|
+
})) : vue.createCommentVNode("v-if", true)
|
|
1761
|
+
])
|
|
1762
|
+
], 10, _hoisted_15);
|
|
1763
|
+
}), 128))
|
|
1764
|
+
])
|
|
1765
|
+
]);
|
|
1766
|
+
}), 128))
|
|
1767
|
+
])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_18, [
|
|
1768
|
+
vue.createElementVNode("div", _hoisted_19, [
|
|
1769
|
+
vue.createVNode(_component_a_empty, { class: "bm-multi-cascader-popover-empty" })
|
|
1770
|
+
])
|
|
1771
|
+
]))
|
|
1772
|
+
]),
|
|
1773
|
+
default: vue.withCtx(() => [
|
|
1774
|
+
vue.createElementVNode("div", _hoisted_2, [
|
|
1775
|
+
vue.createCommentVNode(" container "),
|
|
1776
|
+
vue.createElementVNode("section", _hoisted_3, [
|
|
1777
|
+
props.modelValue.length > 0 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4, [
|
|
1778
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(checkedShowMap), (item, index) => {
|
|
1779
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
1780
|
+
key: index,
|
|
1781
|
+
class: "bm-multi-cascader-tag"
|
|
1782
|
+
}, [
|
|
1783
|
+
vue.createElementVNode("span", _hoisted_5, vue.toDisplayString(item[props.optionLabelName]), 1),
|
|
1784
|
+
vue.createElementVNode("span", {
|
|
1785
|
+
class: "bm-multi-cascader-tag-close",
|
|
1786
|
+
onClick: vue.withModifiers(($event) => removeItem(item[props.optionValueName]), ["stop"])
|
|
1787
|
+
}, [
|
|
1788
|
+
vue.createVNode(vue.unref(CloseOutlined$1), { class: "bm-multi-cascader-tag-close-inner" })
|
|
1789
|
+
], 8, _hoisted_6)
|
|
1790
|
+
]);
|
|
1791
|
+
}), 128)),
|
|
1792
|
+
vue.createCommentVNode(" \u66F4\u591A\u6570\u91CF\u9690\u85CF "),
|
|
1793
|
+
vue.unref(checkedHideCount) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_7, [
|
|
1794
|
+
vue.createElementVNode("span", _hoisted_8, "+ " + vue.toDisplayString(vue.unref(checkedHideCount)), 1)
|
|
1795
|
+
])) : vue.createCommentVNode("v-if", true)
|
|
1796
|
+
])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_9, vue.toDisplayString(props.placeholder), 1))
|
|
1797
|
+
]),
|
|
1798
|
+
vue.createElementVNode("div", _hoisted_10, [
|
|
1799
|
+
props.allowClear && props.modelValue.length > 0 ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
|
|
1800
|
+
vue.createVNode(vue.unref(DownOutlined$1), { class: "bm-multi-cascader-icon bm-multi-cascader-caret" }),
|
|
1801
|
+
vue.createVNode(vue.unref(CloseCircleFilled$1), {
|
|
1802
|
+
class: "bm-multi-cascader-icon bm-multi-cascader-remove-all",
|
|
1803
|
+
onClick: vue.withModifiers(removeAll, ["stop"])
|
|
1804
|
+
}, null, 8, ["onClick"])
|
|
1805
|
+
], 64)) : (vue.openBlock(), vue.createBlock(vue.unref(DownOutlined$1), { key: 1 }))
|
|
1806
|
+
])
|
|
1807
|
+
])
|
|
1808
|
+
]),
|
|
1809
|
+
_: 1
|
|
1810
|
+
})
|
|
1811
|
+
]);
|
|
1812
|
+
};
|
|
1813
|
+
}
|
|
1814
|
+
});
|
|
1815
|
+
var MultiCascaderCompose = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__file", "multi-cascader-compose.vue"]]);
|
|
1816
|
+
|
|
1817
|
+
const BmMultiCascaderCompose = withInstall.withInstall(MultiCascaderCompose);
|
|
1818
|
+
var BmMultiCascaderCompose$1 = BmMultiCascaderCompose;
|
|
1254
1819
|
|
|
1255
1820
|
const _hoisted_1 = { class: "bm-search-filter" };
|
|
1256
1821
|
const __default__ = {
|
|
@@ -1263,6 +1828,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
1263
1828
|
setup(__props, { expose, emit: emits }) {
|
|
1264
1829
|
const props = __props;
|
|
1265
1830
|
FormCreateCtr__default["default"].component("SearchResetBtn", SearchResetBtn);
|
|
1831
|
+
FormCreateCtr__default["default"].component("BmMultiCascaderCompose", BmMultiCascaderCompose$1);
|
|
1266
1832
|
const isExpand = vue.ref(false);
|
|
1267
1833
|
const searchResetBtnRule = vue.reactive([
|
|
1268
1834
|
{
|
|
@@ -1361,7 +1927,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
1361
1927
|
};
|
|
1362
1928
|
}
|
|
1363
1929
|
});
|
|
1364
|
-
var SearchFilter = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "
|
|
1930
|
+
var SearchFilter = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "search-filter.vue"]]);
|
|
1365
1931
|
|
|
1366
1932
|
const BmSearchFilter = withInstall.withInstall(SearchFilter);
|
|
1367
1933
|
|