bm-admin-ui 1.0.0-alpha → 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/es/components/button/index.d.ts +9 -9
- package/es/components/button/index.js +1 -1
- package/es/components/button/src/button.vue.d.ts +9 -9
- 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 +1 -1
- package/es/components/search-filter/index.js +593 -29
- package/es/components/search-filter/src/search-filter.vue.d.ts +1 -1
- 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 +62925 -1235
- package/index.js +63078 -1380
- package/lib/components/button/index.d.ts +9 -9
- package/lib/components/button/index.js +1 -1
- package/lib/components/button/src/button.vue.d.ts +9 -9
- 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 +1 -1
- package/lib/components/search-filter/index.js +592 -28
- package/lib/components/search-filter/src/search-filter.vue.d.ts +1 -1
- 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 +6 -3
- 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 +9 -9
- package/types/components/button/src/button.vue.d.ts +9 -9
- 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 +1 -1
- package/types/components/search-filter/src/search-filter.vue.d.ts +1 -1
- 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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { withInstall } from 'bm-admin-ui/es/utils/with-install';
|
|
2
|
-
import { h, nextTick, createVNode, defineComponent, ref, resolveComponent, openBlock, createElementBlock, createTextVNode, toDisplayString, createBlock, unref, normalizeStyle, createCommentVNode, withCtx,
|
|
2
|
+
import { h, nextTick, createVNode, defineComponent, ref, resolveComponent, openBlock, createElementBlock, createTextVNode, toDisplayString, createBlock, unref, normalizeStyle, createCommentVNode, withCtx, computed, Fragment, renderList, createElementVNode, withModifiers, normalizeClass, reactive, onBeforeUnmount, watch } from 'vue';
|
|
3
3
|
import FormCreateCtr from '@form-create/ant-design-vue';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -852,9 +852,9 @@ function insertCss(css, options) {
|
|
|
852
852
|
return styleElement;
|
|
853
853
|
}
|
|
854
854
|
|
|
855
|
-
function _objectSpread$
|
|
855
|
+
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; }
|
|
856
856
|
|
|
857
|
-
function _defineProperty$
|
|
857
|
+
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; }
|
|
858
858
|
function warn(valid, message) {
|
|
859
859
|
// Support uglify
|
|
860
860
|
if (process.env.NODE_ENV !== 'production' && !valid && console !== undefined) {
|
|
@@ -870,14 +870,14 @@ function isIconDefinition(target) {
|
|
|
870
870
|
}
|
|
871
871
|
function generate(node, key, rootProps) {
|
|
872
872
|
if (!rootProps) {
|
|
873
|
-
return h(node.tag, _objectSpread$
|
|
873
|
+
return h(node.tag, _objectSpread$7({
|
|
874
874
|
key: key
|
|
875
875
|
}, node.attrs), (node.children || []).map(function (child, index) {
|
|
876
876
|
return generate(child, "".concat(key, "-").concat(node.tag, "-").concat(index));
|
|
877
877
|
}));
|
|
878
878
|
}
|
|
879
879
|
|
|
880
|
-
return h(node.tag, _objectSpread$
|
|
880
|
+
return h(node.tag, _objectSpread$7({
|
|
881
881
|
key: key
|
|
882
882
|
}, rootProps, node.attrs), (node.children || []).map(function (child, index) {
|
|
883
883
|
return generate(child, "".concat(key, "-").concat(node.tag, "-").concat(index));
|
|
@@ -917,9 +917,9 @@ function _objectWithoutProperties$1(source, excluded) { if (source == null) retu
|
|
|
917
917
|
|
|
918
918
|
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; }
|
|
919
919
|
|
|
920
|
-
function _objectSpread$
|
|
920
|
+
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; }
|
|
921
921
|
|
|
922
|
-
function _defineProperty$
|
|
922
|
+
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; }
|
|
923
923
|
var twoToneColorPalette = {
|
|
924
924
|
primaryColor: '#333',
|
|
925
925
|
secondaryColor: '#E6E6E6',
|
|
@@ -935,11 +935,11 @@ function setTwoToneColors(_ref) {
|
|
|
935
935
|
}
|
|
936
936
|
|
|
937
937
|
function getTwoToneColors() {
|
|
938
|
-
return _objectSpread$
|
|
938
|
+
return _objectSpread$6({}, twoToneColorPalette);
|
|
939
939
|
}
|
|
940
940
|
|
|
941
941
|
var IconBase = function IconBase(props, context) {
|
|
942
|
-
var _props$context$attrs = _objectSpread$
|
|
942
|
+
var _props$context$attrs = _objectSpread$6({}, props, context.attrs),
|
|
943
943
|
icon = _props$context$attrs.icon,
|
|
944
944
|
primaryColor = _props$context$attrs.primaryColor,
|
|
945
945
|
secondaryColor = _props$context$attrs.secondaryColor,
|
|
@@ -964,12 +964,12 @@ var IconBase = function IconBase(props, context) {
|
|
|
964
964
|
var target = icon;
|
|
965
965
|
|
|
966
966
|
if (target && typeof target.icon === 'function') {
|
|
967
|
-
target = _objectSpread$
|
|
967
|
+
target = _objectSpread$6({}, target, {
|
|
968
968
|
icon: target.icon(colors.primaryColor, colors.secondaryColor)
|
|
969
969
|
});
|
|
970
970
|
}
|
|
971
971
|
|
|
972
|
-
return generate(target.icon, "svg-".concat(target.name), _objectSpread$
|
|
972
|
+
return generate(target.icon, "svg-".concat(target.name), _objectSpread$6({}, restProps, {
|
|
973
973
|
'data-icon': target.name,
|
|
974
974
|
width: '1em',
|
|
975
975
|
height: '1em',
|
|
@@ -1036,9 +1036,9 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
1036
1036
|
|
|
1037
1037
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
1038
1038
|
|
|
1039
|
-
function _objectSpread$
|
|
1039
|
+
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; }
|
|
1040
1040
|
|
|
1041
|
-
function _defineProperty$
|
|
1041
|
+
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; }
|
|
1042
1042
|
|
|
1043
1043
|
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; }
|
|
1044
1044
|
|
|
@@ -1049,7 +1049,7 @@ setTwoToneColor('#1890ff');
|
|
|
1049
1049
|
var Icon = function Icon(props, context) {
|
|
1050
1050
|
var _classObj;
|
|
1051
1051
|
|
|
1052
|
-
var _props$context$attrs = _objectSpread$
|
|
1052
|
+
var _props$context$attrs = _objectSpread$5({}, props, context.attrs),
|
|
1053
1053
|
cls = _props$context$attrs["class"],
|
|
1054
1054
|
icon = _props$context$attrs.icon,
|
|
1055
1055
|
spin = _props$context$attrs.spin,
|
|
@@ -1061,7 +1061,7 @@ var Icon = function Icon(props, context) {
|
|
|
1061
1061
|
|
|
1062
1062
|
var classObj = (_classObj = {
|
|
1063
1063
|
anticon: true
|
|
1064
|
-
}, _defineProperty$
|
|
1064
|
+
}, _defineProperty$5(_classObj, "anticon-".concat(icon.name), Boolean(icon.name)), _defineProperty$5(_classObj, cls, cls), _classObj);
|
|
1065
1065
|
var svgClassString = spin === '' || !!spin || icon.name === 'loading' ? 'anticon-spin' : '';
|
|
1066
1066
|
var iconTabIndex = tabindex;
|
|
1067
1067
|
|
|
@@ -1080,7 +1080,7 @@ var Icon = function Icon(props, context) {
|
|
|
1080
1080
|
primaryColor = _normalizeTwoToneColo2[0],
|
|
1081
1081
|
secondaryColor = _normalizeTwoToneColo2[1];
|
|
1082
1082
|
|
|
1083
|
-
return createVNode("span", _objectSpread$
|
|
1083
|
+
return createVNode("span", _objectSpread$5({
|
|
1084
1084
|
"role": "img",
|
|
1085
1085
|
"aria-label": icon.name
|
|
1086
1086
|
}, restProps, {
|
|
@@ -1107,18 +1107,58 @@ Icon.getTwoToneColor = getTwoToneColor;
|
|
|
1107
1107
|
Icon.setTwoToneColor = setTwoToneColor;
|
|
1108
1108
|
var AntdIcon = Icon;
|
|
1109
1109
|
|
|
1110
|
+
// This icon file is generated automatically.
|
|
1111
|
+
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" };
|
|
1112
|
+
var CloseCircleFilledSvg = CloseCircleFilled$2;
|
|
1113
|
+
|
|
1114
|
+
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; }
|
|
1115
|
+
|
|
1116
|
+
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; }
|
|
1117
|
+
|
|
1118
|
+
var CloseCircleFilled = function CloseCircleFilled(props, context) {
|
|
1119
|
+
var p = _objectSpread$4({}, props, context.attrs);
|
|
1120
|
+
|
|
1121
|
+
return createVNode(AntdIcon, _objectSpread$4({}, p, {
|
|
1122
|
+
"icon": CloseCircleFilledSvg
|
|
1123
|
+
}), null);
|
|
1124
|
+
};
|
|
1125
|
+
|
|
1126
|
+
CloseCircleFilled.displayName = 'CloseCircleFilled';
|
|
1127
|
+
CloseCircleFilled.inheritAttrs = false;
|
|
1128
|
+
var CloseCircleFilled$1 = CloseCircleFilled;
|
|
1129
|
+
|
|
1130
|
+
// This icon file is generated automatically.
|
|
1131
|
+
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" };
|
|
1132
|
+
var CloseOutlinedSvg = CloseOutlined$2;
|
|
1133
|
+
|
|
1134
|
+
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; }
|
|
1135
|
+
|
|
1136
|
+
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; }
|
|
1137
|
+
|
|
1138
|
+
var CloseOutlined = function CloseOutlined(props, context) {
|
|
1139
|
+
var p = _objectSpread$3({}, props, context.attrs);
|
|
1140
|
+
|
|
1141
|
+
return createVNode(AntdIcon, _objectSpread$3({}, p, {
|
|
1142
|
+
"icon": CloseOutlinedSvg
|
|
1143
|
+
}), null);
|
|
1144
|
+
};
|
|
1145
|
+
|
|
1146
|
+
CloseOutlined.displayName = 'CloseOutlined';
|
|
1147
|
+
CloseOutlined.inheritAttrs = false;
|
|
1148
|
+
var CloseOutlined$1 = CloseOutlined;
|
|
1149
|
+
|
|
1110
1150
|
// This icon file is generated automatically.
|
|
1111
1151
|
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" };
|
|
1112
1152
|
var DownOutlinedSvg = DownOutlined$2;
|
|
1113
1153
|
|
|
1114
|
-
function _objectSpread$
|
|
1154
|
+
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; }
|
|
1115
1155
|
|
|
1116
|
-
function _defineProperty$
|
|
1156
|
+
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; }
|
|
1117
1157
|
|
|
1118
1158
|
var DownOutlined = function DownOutlined(props, context) {
|
|
1119
|
-
var p = _objectSpread$
|
|
1159
|
+
var p = _objectSpread$2({}, props, context.attrs);
|
|
1120
1160
|
|
|
1121
|
-
return createVNode(AntdIcon, _objectSpread$
|
|
1161
|
+
return createVNode(AntdIcon, _objectSpread$2({}, p, {
|
|
1122
1162
|
"icon": DownOutlinedSvg
|
|
1123
1163
|
}), null);
|
|
1124
1164
|
};
|
|
@@ -1127,6 +1167,26 @@ DownOutlined.displayName = 'DownOutlined';
|
|
|
1127
1167
|
DownOutlined.inheritAttrs = false;
|
|
1128
1168
|
var DownOutlined$1 = DownOutlined;
|
|
1129
1169
|
|
|
1170
|
+
// This icon file is generated automatically.
|
|
1171
|
+
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" };
|
|
1172
|
+
var RightOutlinedSvg = RightOutlined$2;
|
|
1173
|
+
|
|
1174
|
+
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; }
|
|
1175
|
+
|
|
1176
|
+
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; }
|
|
1177
|
+
|
|
1178
|
+
var RightOutlined = function RightOutlined(props, context) {
|
|
1179
|
+
var p = _objectSpread$1({}, props, context.attrs);
|
|
1180
|
+
|
|
1181
|
+
return createVNode(AntdIcon, _objectSpread$1({}, p, {
|
|
1182
|
+
"icon": RightOutlinedSvg
|
|
1183
|
+
}), null);
|
|
1184
|
+
};
|
|
1185
|
+
|
|
1186
|
+
RightOutlined.displayName = 'RightOutlined';
|
|
1187
|
+
RightOutlined.inheritAttrs = false;
|
|
1188
|
+
var RightOutlined$1 = RightOutlined;
|
|
1189
|
+
|
|
1130
1190
|
// This icon file is generated automatically.
|
|
1131
1191
|
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" };
|
|
1132
1192
|
var UpOutlinedSvg = UpOutlined$2;
|
|
@@ -1185,10 +1245,10 @@ var _export_sfc = (sfc, props) => {
|
|
|
1185
1245
|
return target;
|
|
1186
1246
|
};
|
|
1187
1247
|
|
|
1188
|
-
const _hoisted_1$
|
|
1189
|
-
const _hoisted_2 = /* @__PURE__ */ createTextVNode("\u67E5\u8BE2");
|
|
1190
|
-
const _hoisted_3 = /* @__PURE__ */ createTextVNode("\u91CD\u7F6E");
|
|
1191
|
-
const _sfc_main$
|
|
1248
|
+
const _hoisted_1$2 = { class: "bm-search-filter-btn" };
|
|
1249
|
+
const _hoisted_2$1 = /* @__PURE__ */ createTextVNode("\u67E5\u8BE2");
|
|
1250
|
+
const _hoisted_3$1 = /* @__PURE__ */ createTextVNode("\u91CD\u7F6E");
|
|
1251
|
+
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
1192
1252
|
props: searchResetBtnProps,
|
|
1193
1253
|
emits: ["submit", "reset", "expand"],
|
|
1194
1254
|
setup(__props, { emit: emits }) {
|
|
@@ -1210,7 +1270,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
1210
1270
|
}
|
|
1211
1271
|
return (_ctx, _cache) => {
|
|
1212
1272
|
const _component_a_button = resolveComponent("a-button");
|
|
1213
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
1273
|
+
return openBlock(), createElementBlock("div", _hoisted_1$2, [
|
|
1214
1274
|
props.showExpandBtn ? (openBlock(), createElementBlock("span", {
|
|
1215
1275
|
key: 0,
|
|
1216
1276
|
class: "expand-btn",
|
|
@@ -1230,13 +1290,513 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
1230
1290
|
onClick: handleSubmit
|
|
1231
1291
|
}, {
|
|
1232
1292
|
default: withCtx(() => [
|
|
1233
|
-
_hoisted_2
|
|
1293
|
+
_hoisted_2$1
|
|
1234
1294
|
]),
|
|
1235
1295
|
_: 1
|
|
1236
1296
|
}),
|
|
1237
1297
|
createVNode(_component_a_button, { onClick: handleReset }, {
|
|
1238
1298
|
default: withCtx(() => [
|
|
1239
|
-
_hoisted_3
|
|
1299
|
+
_hoisted_3$1
|
|
1300
|
+
]),
|
|
1301
|
+
_: 1
|
|
1302
|
+
})
|
|
1303
|
+
]);
|
|
1304
|
+
};
|
|
1305
|
+
}
|
|
1306
|
+
});
|
|
1307
|
+
var SearchResetBtn = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__file", "search-reset-btn.vue"]]);
|
|
1308
|
+
|
|
1309
|
+
const propsConfig = {
|
|
1310
|
+
options: {
|
|
1311
|
+
type: Array,
|
|
1312
|
+
default() {
|
|
1313
|
+
return [];
|
|
1314
|
+
},
|
|
1315
|
+
},
|
|
1316
|
+
modelValue: {
|
|
1317
|
+
type: Array,
|
|
1318
|
+
default() {
|
|
1319
|
+
return [];
|
|
1320
|
+
},
|
|
1321
|
+
},
|
|
1322
|
+
optionValueName: {
|
|
1323
|
+
type: String,
|
|
1324
|
+
default: 'value',
|
|
1325
|
+
},
|
|
1326
|
+
optionLabelName: {
|
|
1327
|
+
type: String,
|
|
1328
|
+
default: 'label',
|
|
1329
|
+
},
|
|
1330
|
+
maxTagCount: {
|
|
1331
|
+
type: Number,
|
|
1332
|
+
default: 1,
|
|
1333
|
+
},
|
|
1334
|
+
placeholder: {
|
|
1335
|
+
type: String,
|
|
1336
|
+
default: '请选择',
|
|
1337
|
+
},
|
|
1338
|
+
allowClear: {
|
|
1339
|
+
type: Boolean,
|
|
1340
|
+
default: true,
|
|
1341
|
+
},
|
|
1342
|
+
};
|
|
1343
|
+
|
|
1344
|
+
const _hoisted_1$1 = { class: "bm-multi-cascader-wrapper" };
|
|
1345
|
+
const _hoisted_2 = { class: "bm-multi-cascader" };
|
|
1346
|
+
const _hoisted_3 = { class: "bm-multi-cascader-inner" };
|
|
1347
|
+
const _hoisted_4 = {
|
|
1348
|
+
key: 0,
|
|
1349
|
+
class: "bm-multi-cascader-tags"
|
|
1350
|
+
};
|
|
1351
|
+
const _hoisted_5 = { class: "bm-multi-cascader-tag-text" };
|
|
1352
|
+
const _hoisted_6 = ["onClick"];
|
|
1353
|
+
const _hoisted_7 = {
|
|
1354
|
+
key: 0,
|
|
1355
|
+
class: "bm-multi-cascader-tag"
|
|
1356
|
+
};
|
|
1357
|
+
const _hoisted_8 = { class: "bm-multi-cascader-tag-text" };
|
|
1358
|
+
const _hoisted_9 = {
|
|
1359
|
+
key: 1,
|
|
1360
|
+
class: "bm-multi-cascader-placeholder"
|
|
1361
|
+
};
|
|
1362
|
+
const _hoisted_10 = { class: "bm-multi-cascader-action" };
|
|
1363
|
+
const _hoisted_11 = {
|
|
1364
|
+
key: 0,
|
|
1365
|
+
class: "bm-multi-cascader-popover"
|
|
1366
|
+
};
|
|
1367
|
+
const _hoisted_12 = { class: "bm-multi-cascader-moduler-container" };
|
|
1368
|
+
const _hoisted_13 = ["onClick"];
|
|
1369
|
+
const _hoisted_14 = /* @__PURE__ */ createElementVNode("span", { class: "bm-multi-cascader-item-desc" }, "\u5168\u9009", -1);
|
|
1370
|
+
const _hoisted_15 = ["onClick"];
|
|
1371
|
+
const _hoisted_16 = { class: "bm-multi-cascader-item-desc" };
|
|
1372
|
+
const _hoisted_17 = { class: "bm-multi-cascader-item-text" };
|
|
1373
|
+
const _hoisted_18 = {
|
|
1374
|
+
key: 1,
|
|
1375
|
+
class: "bm-multi-cascader-popover"
|
|
1376
|
+
};
|
|
1377
|
+
const _hoisted_19 = { class: "bm-multi-cascader-moduler" };
|
|
1378
|
+
const __default__$1 = {
|
|
1379
|
+
name: "BmMultiCascaderCompose"
|
|
1380
|
+
};
|
|
1381
|
+
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
1382
|
+
...__default__$1,
|
|
1383
|
+
props: propsConfig,
|
|
1384
|
+
emits: ["update:modelValue", "change"],
|
|
1385
|
+
setup(__props, { emit: emits }) {
|
|
1386
|
+
const props = __props;
|
|
1387
|
+
const path = ref([]);
|
|
1388
|
+
const optionsMap = computed(() => {
|
|
1389
|
+
let res = {};
|
|
1390
|
+
const getValue = (list) => {
|
|
1391
|
+
list.forEach((row) => {
|
|
1392
|
+
let key = row[props.optionValueName];
|
|
1393
|
+
let value = row[props.optionLabelName];
|
|
1394
|
+
if (!res[key]) {
|
|
1395
|
+
res[key] = {
|
|
1396
|
+
[props.optionValueName]: key,
|
|
1397
|
+
[props.optionLabelName]: value
|
|
1398
|
+
};
|
|
1399
|
+
}
|
|
1400
|
+
if (row.children) {
|
|
1401
|
+
getValue(row.children);
|
|
1402
|
+
}
|
|
1403
|
+
});
|
|
1404
|
+
};
|
|
1405
|
+
getValue(props.options);
|
|
1406
|
+
return res;
|
|
1407
|
+
});
|
|
1408
|
+
const checkedMap = computed(() => {
|
|
1409
|
+
let res = [];
|
|
1410
|
+
props.modelValue.forEach((item) => {
|
|
1411
|
+
let temp = optionsMap.value[item] || {};
|
|
1412
|
+
temp = {
|
|
1413
|
+
[props.optionValueName]: item,
|
|
1414
|
+
[props.optionLabelName]: item,
|
|
1415
|
+
...temp
|
|
1416
|
+
};
|
|
1417
|
+
res.push(temp);
|
|
1418
|
+
});
|
|
1419
|
+
return res;
|
|
1420
|
+
});
|
|
1421
|
+
const checkedHideCount = computed(() => {
|
|
1422
|
+
if (props.maxTagCount && checkedMap.value.length > props.maxTagCount) {
|
|
1423
|
+
return checkedMap.value.length - props.maxTagCount;
|
|
1424
|
+
} else {
|
|
1425
|
+
return 0;
|
|
1426
|
+
}
|
|
1427
|
+
});
|
|
1428
|
+
const checkedShowMap = computed(() => {
|
|
1429
|
+
if (checkedHideCount.value > 0) {
|
|
1430
|
+
return checkedMap.value.slice(0, props.maxTagCount);
|
|
1431
|
+
} else {
|
|
1432
|
+
return checkedMap.value;
|
|
1433
|
+
}
|
|
1434
|
+
});
|
|
1435
|
+
const modulersOptions = computed(() => {
|
|
1436
|
+
let res = [{ children: props.options }];
|
|
1437
|
+
for (let i = 0; i < path.value.length; i++) {
|
|
1438
|
+
let parent = res[res.length - 1];
|
|
1439
|
+
let index = path.value[i].index;
|
|
1440
|
+
let next = parent.children?.[index];
|
|
1441
|
+
next && res.push(next);
|
|
1442
|
+
}
|
|
1443
|
+
return res;
|
|
1444
|
+
});
|
|
1445
|
+
const modulersStatusOptions = computed(() => {
|
|
1446
|
+
let res = [];
|
|
1447
|
+
let parentChecked = false;
|
|
1448
|
+
for (let i = 0; i < modulersOptions.value.length; i++) {
|
|
1449
|
+
let tempRes = [];
|
|
1450
|
+
let tempChildren = modulersOptions.value[i].children;
|
|
1451
|
+
if (tempChildren) {
|
|
1452
|
+
for (let j = 0; j < tempChildren.length; j++) {
|
|
1453
|
+
if (parentChecked) {
|
|
1454
|
+
tempRes.push({ checked: true });
|
|
1455
|
+
} else {
|
|
1456
|
+
let tempRes2 = tempChildren[j];
|
|
1457
|
+
let tempIndex2 = props.modelValue.indexOf(tempRes2[props.optionValueName]);
|
|
1458
|
+
if (tempIndex2 !== -1) {
|
|
1459
|
+
tempRes.push({ checked: true });
|
|
1460
|
+
} else {
|
|
1461
|
+
if (tempRes2.children) {
|
|
1462
|
+
let allSonValues = getAllSonValues(tempRes2.children);
|
|
1463
|
+
let indeterminate = false;
|
|
1464
|
+
for (let k = 0; k < allSonValues.length; k++) {
|
|
1465
|
+
if (props.modelValue.indexOf(allSonValues[k]) !== -1) {
|
|
1466
|
+
indeterminate = true;
|
|
1467
|
+
break;
|
|
1468
|
+
}
|
|
1469
|
+
}
|
|
1470
|
+
tempRes.push({ checked: false, indeterminate });
|
|
1471
|
+
} else {
|
|
1472
|
+
tempRes.push({ checked: false });
|
|
1473
|
+
}
|
|
1474
|
+
}
|
|
1475
|
+
}
|
|
1476
|
+
}
|
|
1477
|
+
}
|
|
1478
|
+
res.push(tempRes);
|
|
1479
|
+
if (!parentChecked) {
|
|
1480
|
+
if (tempChildren) {
|
|
1481
|
+
for (let j = 0; j < tempChildren.length; j++) {
|
|
1482
|
+
let tempRes2 = tempChildren[j];
|
|
1483
|
+
let tempIndex2 = props.modelValue.indexOf(tempRes2[props.optionValueName]);
|
|
1484
|
+
if (path.value[i] && tempRes2[props.optionValueName] === path.value[i][props.optionValueName] && tempIndex2 !== -1) {
|
|
1485
|
+
parentChecked = true;
|
|
1486
|
+
break;
|
|
1487
|
+
}
|
|
1488
|
+
}
|
|
1489
|
+
}
|
|
1490
|
+
}
|
|
1491
|
+
}
|
|
1492
|
+
return res;
|
|
1493
|
+
});
|
|
1494
|
+
const modulersAllStatusOptions = computed(() => {
|
|
1495
|
+
let res = [];
|
|
1496
|
+
for (let i = 0; i < modulersStatusOptions.value.length; i++) {
|
|
1497
|
+
let checked = true;
|
|
1498
|
+
let indeterminate = false;
|
|
1499
|
+
for (let j = 0; j < modulersStatusOptions.value[i].length; j++) {
|
|
1500
|
+
let tempRes2 = modulersStatusOptions.value[i][j];
|
|
1501
|
+
if (!tempRes2.checked) {
|
|
1502
|
+
checked = false;
|
|
1503
|
+
break;
|
|
1504
|
+
}
|
|
1505
|
+
}
|
|
1506
|
+
if (!checked) {
|
|
1507
|
+
for (let k = 0; k < modulersStatusOptions.value[i].length; k++) {
|
|
1508
|
+
let tempRes2 = modulersStatusOptions.value[i][k];
|
|
1509
|
+
if (tempRes2.indeterminate || tempRes2.checked) {
|
|
1510
|
+
indeterminate = true;
|
|
1511
|
+
break;
|
|
1512
|
+
}
|
|
1513
|
+
}
|
|
1514
|
+
}
|
|
1515
|
+
res.push({ checked, indeterminate });
|
|
1516
|
+
}
|
|
1517
|
+
return res;
|
|
1518
|
+
});
|
|
1519
|
+
const handleClick = (option, level, index) => {
|
|
1520
|
+
if (option.children) {
|
|
1521
|
+
path.value.splice(level);
|
|
1522
|
+
path.value[level] = { ...option, index };
|
|
1523
|
+
} else {
|
|
1524
|
+
path.value.splice(level);
|
|
1525
|
+
handleToggle(option, level, index);
|
|
1526
|
+
}
|
|
1527
|
+
};
|
|
1528
|
+
const handleClickCheckbox = (option, level, index) => {
|
|
1529
|
+
if (option.children) {
|
|
1530
|
+
path.value.splice(level);
|
|
1531
|
+
path.value[level] = { ...option, index };
|
|
1532
|
+
} else {
|
|
1533
|
+
path.value.splice(level);
|
|
1534
|
+
}
|
|
1535
|
+
handleToggle(option, level, index);
|
|
1536
|
+
};
|
|
1537
|
+
const handleToggle = (option, level, index) => {
|
|
1538
|
+
let checked = [...props.modelValue];
|
|
1539
|
+
let unChecked = [];
|
|
1540
|
+
let tempOption = modulersOptions.value[level].children?.[index];
|
|
1541
|
+
let tempStatus = modulersStatusOptions.value[level][index];
|
|
1542
|
+
if (tempStatus.checked) {
|
|
1543
|
+
unChecked.push(tempOption?.[props.optionValueName]);
|
|
1544
|
+
if (tempOption?.children) {
|
|
1545
|
+
let allSonValues = getAllSonValues(tempOption.children);
|
|
1546
|
+
unChecked = unChecked.concat(allSonValues);
|
|
1547
|
+
}
|
|
1548
|
+
if (level >= 0) {
|
|
1549
|
+
tempOption = modulersOptions.value[level];
|
|
1550
|
+
}
|
|
1551
|
+
for (let i = level; i >= 0; i--) {
|
|
1552
|
+
let tempOption2 = modulersOptions.value[i];
|
|
1553
|
+
let tempStatus2 = modulersAllStatusOptions.value[i];
|
|
1554
|
+
if (tempStatus2.checked) {
|
|
1555
|
+
let tempValues = tempOption2.children?.map((item) => item[props.optionValueName]).filter((item) => item !== tempOption?.[props.optionValueName]) || [];
|
|
1556
|
+
unChecked.push(tempOption2[props.optionValueName]);
|
|
1557
|
+
checked = checked.concat(tempValues);
|
|
1558
|
+
}
|
|
1559
|
+
tempOption = tempOption2;
|
|
1560
|
+
}
|
|
1561
|
+
} else {
|
|
1562
|
+
checked.push(tempOption?.[props.optionValueName]);
|
|
1563
|
+
if (tempOption?.children) {
|
|
1564
|
+
let allSonValues = getAllSonValues(tempOption.children);
|
|
1565
|
+
allSonValues = allSonValues.filter((item) => item !== tempOption?.[props.optionValueName]);
|
|
1566
|
+
unChecked = unChecked.concat(allSonValues);
|
|
1567
|
+
}
|
|
1568
|
+
for (let i = level; i > 0; i--) {
|
|
1569
|
+
let tempOption2 = modulersOptions.value[i];
|
|
1570
|
+
let allIsChecked = true;
|
|
1571
|
+
tempOption2.children?.forEach((item) => {
|
|
1572
|
+
if (checked.indexOf(item[props.optionValueName]) === -1) {
|
|
1573
|
+
allIsChecked = false;
|
|
1574
|
+
}
|
|
1575
|
+
});
|
|
1576
|
+
if (allIsChecked) {
|
|
1577
|
+
checked.push(tempOption2[props.optionValueName]);
|
|
1578
|
+
if (tempOption2.children) {
|
|
1579
|
+
let allSonValues = getAllSonValues(tempOption2.children);
|
|
1580
|
+
allSonValues = allSonValues.filter((item) => item !== tempOption2[props.optionValueName]);
|
|
1581
|
+
unChecked = unChecked.concat(allSonValues);
|
|
1582
|
+
}
|
|
1583
|
+
}
|
|
1584
|
+
}
|
|
1585
|
+
}
|
|
1586
|
+
unChecked = unChecked.filter((item, index2, arr) => {
|
|
1587
|
+
return item !== void 0 && arr.indexOf(item) === index2;
|
|
1588
|
+
});
|
|
1589
|
+
checked = checked.filter((item, index2, arr) => {
|
|
1590
|
+
return item !== void 0 && arr.indexOf(item) === index2;
|
|
1591
|
+
}).filter((item) => {
|
|
1592
|
+
return unChecked.indexOf(item) === -1;
|
|
1593
|
+
});
|
|
1594
|
+
emits("update:modelValue", checked);
|
|
1595
|
+
emits("change", checked);
|
|
1596
|
+
};
|
|
1597
|
+
const handleClickAll = (level) => {
|
|
1598
|
+
let checked = [...props.modelValue];
|
|
1599
|
+
let unChecked = [];
|
|
1600
|
+
let tempOption = modulersOptions.value[level];
|
|
1601
|
+
let tempStatus = modulersAllStatusOptions.value[level];
|
|
1602
|
+
if (level === 0) {
|
|
1603
|
+
if (tempStatus.checked) {
|
|
1604
|
+
checked = [];
|
|
1605
|
+
} else {
|
|
1606
|
+
checked = modulersOptions.value[level].children?.map((item) => item[props.optionValueName]) || [];
|
|
1607
|
+
}
|
|
1608
|
+
} else {
|
|
1609
|
+
if (tempStatus.checked) {
|
|
1610
|
+
unChecked.push(tempOption[props.optionValueName]);
|
|
1611
|
+
if (tempOption.children) {
|
|
1612
|
+
let allSonValues = getAllSonValues(tempOption.children);
|
|
1613
|
+
unChecked = unChecked.concat(allSonValues);
|
|
1614
|
+
}
|
|
1615
|
+
for (let i = level; i >= 0; i--) {
|
|
1616
|
+
let tempOption2 = modulersOptions.value[i];
|
|
1617
|
+
let tempStatus2 = modulersAllStatusOptions.value[i];
|
|
1618
|
+
if (tempStatus2.checked) {
|
|
1619
|
+
let tempValues = tempOption2.children?.map((item) => item[props.optionValueName]).filter((item) => item !== tempOption[props.optionValueName]) || [];
|
|
1620
|
+
unChecked.push(tempOption2[props.optionValueName]);
|
|
1621
|
+
checked = checked.concat(tempValues);
|
|
1622
|
+
}
|
|
1623
|
+
tempOption = tempOption2;
|
|
1624
|
+
}
|
|
1625
|
+
} else {
|
|
1626
|
+
checked.push(tempOption[props.optionValueName]);
|
|
1627
|
+
if (tempOption.children) {
|
|
1628
|
+
let allSonValues = getAllSonValues(tempOption.children);
|
|
1629
|
+
allSonValues = allSonValues.filter((item) => item !== tempOption[props.optionValueName]);
|
|
1630
|
+
unChecked = unChecked.concat(allSonValues);
|
|
1631
|
+
}
|
|
1632
|
+
for (let i = level; i > 0; i--) {
|
|
1633
|
+
let tempOption2 = modulersOptions.value[i];
|
|
1634
|
+
let allIsChecked = true;
|
|
1635
|
+
tempOption2.children?.forEach((item) => {
|
|
1636
|
+
if (checked.indexOf(item[props.optionValueName]) === -1) {
|
|
1637
|
+
allIsChecked = false;
|
|
1638
|
+
}
|
|
1639
|
+
});
|
|
1640
|
+
if (allIsChecked) {
|
|
1641
|
+
checked.push(tempOption2[props.optionValueName]);
|
|
1642
|
+
if (tempOption2.children) {
|
|
1643
|
+
let allSonValues = getAllSonValues(tempOption2.children);
|
|
1644
|
+
allSonValues = allSonValues.filter((item) => item !== tempOption2[props.optionValueName]);
|
|
1645
|
+
unChecked = unChecked.concat(allSonValues);
|
|
1646
|
+
}
|
|
1647
|
+
}
|
|
1648
|
+
}
|
|
1649
|
+
}
|
|
1650
|
+
}
|
|
1651
|
+
unChecked = unChecked.filter((item, index, arr) => {
|
|
1652
|
+
return item !== void 0 && arr.indexOf(item) === index;
|
|
1653
|
+
});
|
|
1654
|
+
checked = checked.filter((item, index, arr) => {
|
|
1655
|
+
return item !== void 0 && arr.indexOf(item) === index;
|
|
1656
|
+
}).filter((item) => {
|
|
1657
|
+
return unChecked.indexOf(item) === -1;
|
|
1658
|
+
});
|
|
1659
|
+
emits("update:modelValue", checked);
|
|
1660
|
+
emits("change", checked);
|
|
1661
|
+
};
|
|
1662
|
+
const getAllSonValues = (data) => {
|
|
1663
|
+
let res = [];
|
|
1664
|
+
const getValue = (list) => {
|
|
1665
|
+
list.forEach((row) => {
|
|
1666
|
+
if (row.children) {
|
|
1667
|
+
res.push(row[props.optionValueName]);
|
|
1668
|
+
getValue(row.children);
|
|
1669
|
+
} else {
|
|
1670
|
+
res.push(row[props.optionValueName]);
|
|
1671
|
+
}
|
|
1672
|
+
});
|
|
1673
|
+
};
|
|
1674
|
+
getValue(data);
|
|
1675
|
+
return res;
|
|
1676
|
+
};
|
|
1677
|
+
const removeItem = (value) => {
|
|
1678
|
+
let checked = [...props.modelValue];
|
|
1679
|
+
checked = checked.filter((item) => item !== value);
|
|
1680
|
+
emits("update:modelValue", checked);
|
|
1681
|
+
emits("change", checked);
|
|
1682
|
+
};
|
|
1683
|
+
const removeAll = () => {
|
|
1684
|
+
emits("update:modelValue", []);
|
|
1685
|
+
emits("change", []);
|
|
1686
|
+
};
|
|
1687
|
+
return (_ctx, _cache) => {
|
|
1688
|
+
const _component_a_checkbox = resolveComponent("a-checkbox");
|
|
1689
|
+
const _component_a_form_item_rest = resolveComponent("a-form-item-rest");
|
|
1690
|
+
const _component_a_empty = resolveComponent("a-empty");
|
|
1691
|
+
const _component_v_dropdown = resolveComponent("v-dropdown");
|
|
1692
|
+
return openBlock(), createElementBlock("div", _hoisted_1$1, [
|
|
1693
|
+
createVNode(_component_v_dropdown, {
|
|
1694
|
+
placement: "bottom-start",
|
|
1695
|
+
container: false,
|
|
1696
|
+
distance: 2
|
|
1697
|
+
}, {
|
|
1698
|
+
popper: withCtx(() => [
|
|
1699
|
+
props.options.length ? (openBlock(), createElementBlock("div", _hoisted_11, [
|
|
1700
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(modulersOptions), (moduler, level) => {
|
|
1701
|
+
return openBlock(), createElementBlock("div", {
|
|
1702
|
+
key: level,
|
|
1703
|
+
class: "bm-multi-cascader-moduler"
|
|
1704
|
+
}, [
|
|
1705
|
+
createCommentVNode(" container "),
|
|
1706
|
+
createElementVNode("section", _hoisted_12, [
|
|
1707
|
+
moduler.children && moduler.children.length > 0 ? (openBlock(), createElementBlock("div", {
|
|
1708
|
+
key: 0,
|
|
1709
|
+
class: "bm-multi-cascader-item bm-multi-cascader-all",
|
|
1710
|
+
onClick: ($event) => handleClickAll(level)
|
|
1711
|
+
}, [
|
|
1712
|
+
createVNode(_component_a_form_item_rest, null, {
|
|
1713
|
+
default: withCtx(() => [
|
|
1714
|
+
createVNode(_component_a_checkbox, {
|
|
1715
|
+
class: "bm-multi-cascader-item-checkbox",
|
|
1716
|
+
checked: unref(modulersAllStatusOptions)[level].checked,
|
|
1717
|
+
indeterminate: unref(modulersAllStatusOptions)[level].indeterminate,
|
|
1718
|
+
onChange: _cache[0] || (_cache[0] = withModifiers(() => {
|
|
1719
|
+
}, ["stop"]))
|
|
1720
|
+
}, null, 8, ["checked", "indeterminate"])
|
|
1721
|
+
]),
|
|
1722
|
+
_: 2
|
|
1723
|
+
}, 1024),
|
|
1724
|
+
_hoisted_14
|
|
1725
|
+
], 8, _hoisted_13)) : createCommentVNode("v-if", true),
|
|
1726
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(moduler.children, (option, index) => {
|
|
1727
|
+
return openBlock(), createElementBlock("div", {
|
|
1728
|
+
key: index,
|
|
1729
|
+
class: normalizeClass(["bm-multi-cascader-item", {
|
|
1730
|
+
"is-active": path.value.find((item) => option[props.optionValueName] === item[props.optionValueName])
|
|
1731
|
+
}]),
|
|
1732
|
+
onClick: ($event) => handleClick(option, level, index)
|
|
1733
|
+
}, [
|
|
1734
|
+
createVNode(_component_a_form_item_rest, null, {
|
|
1735
|
+
default: withCtx(() => [
|
|
1736
|
+
createVNode(_component_a_checkbox, {
|
|
1737
|
+
class: "bm-multi-cascader-item-checkbox",
|
|
1738
|
+
checked: unref(modulersStatusOptions)[level][index].checked,
|
|
1739
|
+
indeterminate: unref(modulersStatusOptions)[level][index].indeterminate,
|
|
1740
|
+
onClick: withModifiers(($event) => handleClickCheckbox(option, level, index), ["stop"]),
|
|
1741
|
+
onChange: _cache[1] || (_cache[1] = withModifiers(() => {
|
|
1742
|
+
}, ["stop"]))
|
|
1743
|
+
}, null, 8, ["checked", "indeterminate", "onClick"])
|
|
1744
|
+
]),
|
|
1745
|
+
_: 2
|
|
1746
|
+
}, 1024),
|
|
1747
|
+
createElementVNode("span", _hoisted_16, [
|
|
1748
|
+
createElementVNode("span", _hoisted_17, toDisplayString(option[props.optionLabelName]), 1),
|
|
1749
|
+
option.children ? (openBlock(), createBlock(unref(RightOutlined$1), {
|
|
1750
|
+
key: 0,
|
|
1751
|
+
class: "bm-multi-cascader-item-caret"
|
|
1752
|
+
})) : createCommentVNode("v-if", true)
|
|
1753
|
+
])
|
|
1754
|
+
], 10, _hoisted_15);
|
|
1755
|
+
}), 128))
|
|
1756
|
+
])
|
|
1757
|
+
]);
|
|
1758
|
+
}), 128))
|
|
1759
|
+
])) : (openBlock(), createElementBlock("div", _hoisted_18, [
|
|
1760
|
+
createElementVNode("div", _hoisted_19, [
|
|
1761
|
+
createVNode(_component_a_empty, { class: "bm-multi-cascader-popover-empty" })
|
|
1762
|
+
])
|
|
1763
|
+
]))
|
|
1764
|
+
]),
|
|
1765
|
+
default: withCtx(() => [
|
|
1766
|
+
createElementVNode("div", _hoisted_2, [
|
|
1767
|
+
createCommentVNode(" container "),
|
|
1768
|
+
createElementVNode("section", _hoisted_3, [
|
|
1769
|
+
props.modelValue.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_4, [
|
|
1770
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(checkedShowMap), (item, index) => {
|
|
1771
|
+
return openBlock(), createElementBlock("div", {
|
|
1772
|
+
key: index,
|
|
1773
|
+
class: "bm-multi-cascader-tag"
|
|
1774
|
+
}, [
|
|
1775
|
+
createElementVNode("span", _hoisted_5, toDisplayString(item[props.optionLabelName]), 1),
|
|
1776
|
+
createElementVNode("span", {
|
|
1777
|
+
class: "bm-multi-cascader-tag-close",
|
|
1778
|
+
onClick: withModifiers(($event) => removeItem(item[props.optionValueName]), ["stop"])
|
|
1779
|
+
}, [
|
|
1780
|
+
createVNode(unref(CloseOutlined$1), { class: "bm-multi-cascader-tag-close-inner" })
|
|
1781
|
+
], 8, _hoisted_6)
|
|
1782
|
+
]);
|
|
1783
|
+
}), 128)),
|
|
1784
|
+
createCommentVNode(" \u66F4\u591A\u6570\u91CF\u9690\u85CF "),
|
|
1785
|
+
unref(checkedHideCount) ? (openBlock(), createElementBlock("div", _hoisted_7, [
|
|
1786
|
+
createElementVNode("span", _hoisted_8, "+ " + toDisplayString(unref(checkedHideCount)), 1)
|
|
1787
|
+
])) : createCommentVNode("v-if", true)
|
|
1788
|
+
])) : (openBlock(), createElementBlock("div", _hoisted_9, toDisplayString(props.placeholder), 1))
|
|
1789
|
+
]),
|
|
1790
|
+
createElementVNode("div", _hoisted_10, [
|
|
1791
|
+
props.allowClear && props.modelValue.length > 0 ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
1792
|
+
createVNode(unref(DownOutlined$1), { class: "bm-multi-cascader-icon bm-multi-cascader-caret" }),
|
|
1793
|
+
createVNode(unref(CloseCircleFilled$1), {
|
|
1794
|
+
class: "bm-multi-cascader-icon bm-multi-cascader-remove-all",
|
|
1795
|
+
onClick: withModifiers(removeAll, ["stop"])
|
|
1796
|
+
}, null, 8, ["onClick"])
|
|
1797
|
+
], 64)) : (openBlock(), createBlock(unref(DownOutlined$1), { key: 1 }))
|
|
1798
|
+
])
|
|
1799
|
+
])
|
|
1240
1800
|
]),
|
|
1241
1801
|
_: 1
|
|
1242
1802
|
})
|
|
@@ -1244,7 +1804,10 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
1244
1804
|
};
|
|
1245
1805
|
}
|
|
1246
1806
|
});
|
|
1247
|
-
var
|
|
1807
|
+
var MultiCascaderCompose = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__file", "multi-cascader-compose.vue"]]);
|
|
1808
|
+
|
|
1809
|
+
const BmMultiCascaderCompose = withInstall(MultiCascaderCompose);
|
|
1810
|
+
var BmMultiCascaderCompose$1 = BmMultiCascaderCompose;
|
|
1248
1811
|
|
|
1249
1812
|
const _hoisted_1 = { class: "bm-search-filter" };
|
|
1250
1813
|
const __default__ = {
|
|
@@ -1257,6 +1820,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1257
1820
|
setup(__props, { expose, emit: emits }) {
|
|
1258
1821
|
const props = __props;
|
|
1259
1822
|
FormCreateCtr.component("SearchResetBtn", SearchResetBtn);
|
|
1823
|
+
FormCreateCtr.component("BmMultiCascaderCompose", BmMultiCascaderCompose$1);
|
|
1260
1824
|
const isExpand = ref(false);
|
|
1261
1825
|
const searchResetBtnRule = reactive([
|
|
1262
1826
|
{
|
|
@@ -1355,7 +1919,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1355
1919
|
};
|
|
1356
1920
|
}
|
|
1357
1921
|
});
|
|
1358
|
-
var SearchFilter = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "
|
|
1922
|
+
var SearchFilter = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "search-filter.vue"]]);
|
|
1359
1923
|
|
|
1360
1924
|
const BmSearchFilter = withInstall(SearchFilter);
|
|
1361
1925
|
|