bm-admin-ui 1.2.53-alpha → 1.2.55-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/staffs-selector/index.d.ts +1 -0
- package/es/components/staffs-selector/index.js +23 -15
- package/es/components/staffs-selector/src/departmentCmp.vue.d.ts +1 -0
- package/es/components/staffs-selector/src/staffs-selector.vue.d.ts +1 -0
- package/lib/components/staffs-selector/index.d.ts +1 -0
- package/lib/components/staffs-selector/index.js +23 -15
- package/lib/components/staffs-selector/src/departmentCmp.vue.d.ts +1 -0
- package/lib/components/staffs-selector/src/staffs-selector.vue.d.ts +1 -0
- package/package.json +1 -1
- package/types/components/staffs-selector/index.d.ts +1 -0
- package/types/components/staffs-selector/src/departmentCmp.vue.d.ts +1 -0
- package/types/components/staffs-selector/src/staffs-selector.vue.d.ts +1 -0
|
@@ -386,9 +386,19 @@ const _sfc_main$1 = defineComponent({
|
|
|
386
386
|
emptyPic: Empty.PRESENTED_IMAGE_SIMPLE,
|
|
387
387
|
isFulfill: false
|
|
388
388
|
});
|
|
389
|
+
const showTree = ref(true);
|
|
390
|
+
let treeTimeout = null;
|
|
389
391
|
const methods = {
|
|
390
392
|
search() {
|
|
391
393
|
let data = state.searchVal ? { searchVal: state.searchVal } : { searchVal: "" };
|
|
394
|
+
if (!state.searchVal) {
|
|
395
|
+
showTree.value = false;
|
|
396
|
+
if (treeTimeout)
|
|
397
|
+
clearTimeout(treeTimeout);
|
|
398
|
+
treeTimeout = setTimeout(() => {
|
|
399
|
+
showTree.value = true;
|
|
400
|
+
});
|
|
401
|
+
}
|
|
392
402
|
emit("fetchList", {
|
|
393
403
|
...data,
|
|
394
404
|
area: "department"
|
|
@@ -484,14 +494,18 @@ const _sfc_main$1 = defineComponent({
|
|
|
484
494
|
treeRef,
|
|
485
495
|
list,
|
|
486
496
|
...methods,
|
|
487
|
-
realLoadData
|
|
497
|
+
realLoadData,
|
|
498
|
+
showTree
|
|
488
499
|
};
|
|
489
500
|
}
|
|
490
501
|
});
|
|
491
502
|
const _hoisted_1$1 = { class: "multiple-selector" };
|
|
492
503
|
const _hoisted_2$1 = { class: "__selector-modal-panel" };
|
|
493
504
|
const _hoisted_3$1 = { class: "__search-panel" };
|
|
494
|
-
const _hoisted_4$1 = {
|
|
505
|
+
const _hoisted_4$1 = {
|
|
506
|
+
key: 0,
|
|
507
|
+
class: "__selector-modal-options"
|
|
508
|
+
};
|
|
495
509
|
const _hoisted_5$1 = { class: "department-option-item" };
|
|
496
510
|
const _hoisted_6$1 = {
|
|
497
511
|
key: 0,
|
|
@@ -522,7 +536,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
522
536
|
]),
|
|
523
537
|
_: 1
|
|
524
538
|
}, 8, ["value", "onInput"]),
|
|
525
|
-
|
|
539
|
+
_ctx.showTree ? (openBlock(), createElementBlock("div", _hoisted_4$1, [
|
|
526
540
|
createVNode(_component_ATree, {
|
|
527
541
|
ref: "treeRef",
|
|
528
542
|
"checked-keys": _ctx.multipDepartment,
|
|
@@ -531,9 +545,9 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
531
545
|
"load-data": _ctx.realLoadData,
|
|
532
546
|
onCheck: _ctx.changeTreeCheck
|
|
533
547
|
}, {
|
|
534
|
-
title: withCtx(({ title,
|
|
548
|
+
title: withCtx(({ title, description }) => [
|
|
535
549
|
createElementVNode("div", _hoisted_5$1, [
|
|
536
|
-
createElementVNode("span", null, toDisplayString(title)
|
|
550
|
+
createElementVNode("span", null, toDisplayString(title), 1),
|
|
537
551
|
description ? (openBlock(), createElementBlock("p", _hoisted_6$1, toDisplayString(description), 1)) : createCommentVNode("v-if", true)
|
|
538
552
|
])
|
|
539
553
|
]),
|
|
@@ -547,7 +561,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
547
561
|
_: 1
|
|
548
562
|
}, 8, ["image"])
|
|
549
563
|
])) : createCommentVNode("v-if", true)
|
|
550
|
-
])
|
|
564
|
+
])) : createCommentVNode("v-if", true)
|
|
551
565
|
])
|
|
552
566
|
])
|
|
553
567
|
]);
|
|
@@ -609,13 +623,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
609
623
|
props.load({
|
|
610
624
|
departmentName: params.searchVal
|
|
611
625
|
}).then((data) => {
|
|
612
|
-
list.value = data
|
|
613
|
-
...x,
|
|
614
|
-
title: x.name,
|
|
615
|
-
isLeaf: !x.isExistChild,
|
|
616
|
-
key: x.id,
|
|
617
|
-
parent: { key: x.id + Date.now() }
|
|
618
|
-
}));
|
|
626
|
+
list.value = data;
|
|
619
627
|
departNative.value = data;
|
|
620
628
|
});
|
|
621
629
|
selectState.dataMap = flatListFunc(list.value);
|
|
@@ -685,13 +693,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
685
693
|
function getOptionName(key) {
|
|
686
694
|
let data = selectState.dataMap.get(String(key));
|
|
687
695
|
if (data && data.title)
|
|
688
|
-
return `${data.title}
|
|
696
|
+
return `${data.title}`;
|
|
689
697
|
let arr = props.select;
|
|
690
698
|
arr = arr.length ? arr : [];
|
|
691
699
|
let had = arr.find(
|
|
692
700
|
(item) => String(item) === String(key) || String(item?.key) === String(key)
|
|
693
701
|
);
|
|
694
|
-
return had?.title ? `${had.title}
|
|
702
|
+
return had?.title ? `${had.title}` : had;
|
|
695
703
|
}
|
|
696
704
|
function deleteOptions(key) {
|
|
697
705
|
if (props.mode === MODE.MULTIPLE) {
|
|
@@ -390,9 +390,19 @@ const _sfc_main$1 = vue.defineComponent({
|
|
|
390
390
|
emptyPic: antDesignVue.Empty.PRESENTED_IMAGE_SIMPLE,
|
|
391
391
|
isFulfill: false
|
|
392
392
|
});
|
|
393
|
+
const showTree = vue.ref(true);
|
|
394
|
+
let treeTimeout = null;
|
|
393
395
|
const methods = {
|
|
394
396
|
search() {
|
|
395
397
|
let data = state.searchVal ? { searchVal: state.searchVal } : { searchVal: "" };
|
|
398
|
+
if (!state.searchVal) {
|
|
399
|
+
showTree.value = false;
|
|
400
|
+
if (treeTimeout)
|
|
401
|
+
clearTimeout(treeTimeout);
|
|
402
|
+
treeTimeout = setTimeout(() => {
|
|
403
|
+
showTree.value = true;
|
|
404
|
+
});
|
|
405
|
+
}
|
|
396
406
|
emit("fetchList", {
|
|
397
407
|
...data,
|
|
398
408
|
area: "department"
|
|
@@ -488,14 +498,18 @@ const _sfc_main$1 = vue.defineComponent({
|
|
|
488
498
|
treeRef,
|
|
489
499
|
list,
|
|
490
500
|
...methods,
|
|
491
|
-
realLoadData
|
|
501
|
+
realLoadData,
|
|
502
|
+
showTree
|
|
492
503
|
};
|
|
493
504
|
}
|
|
494
505
|
});
|
|
495
506
|
const _hoisted_1$1 = { class: "multiple-selector" };
|
|
496
507
|
const _hoisted_2$1 = { class: "__selector-modal-panel" };
|
|
497
508
|
const _hoisted_3$1 = { class: "__search-panel" };
|
|
498
|
-
const _hoisted_4$1 = {
|
|
509
|
+
const _hoisted_4$1 = {
|
|
510
|
+
key: 0,
|
|
511
|
+
class: "__selector-modal-options"
|
|
512
|
+
};
|
|
499
513
|
const _hoisted_5$1 = { class: "department-option-item" };
|
|
500
514
|
const _hoisted_6$1 = {
|
|
501
515
|
key: 0,
|
|
@@ -526,7 +540,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
526
540
|
]),
|
|
527
541
|
_: 1
|
|
528
542
|
}, 8, ["value", "onInput"]),
|
|
529
|
-
vue.
|
|
543
|
+
_ctx.showTree ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$1, [
|
|
530
544
|
vue.createVNode(_component_ATree, {
|
|
531
545
|
ref: "treeRef",
|
|
532
546
|
"checked-keys": _ctx.multipDepartment,
|
|
@@ -535,9 +549,9 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
535
549
|
"load-data": _ctx.realLoadData,
|
|
536
550
|
onCheck: _ctx.changeTreeCheck
|
|
537
551
|
}, {
|
|
538
|
-
title: vue.withCtx(({ title,
|
|
552
|
+
title: vue.withCtx(({ title, description }) => [
|
|
539
553
|
vue.createElementVNode("div", _hoisted_5$1, [
|
|
540
|
-
vue.createElementVNode("span", null, vue.toDisplayString(title)
|
|
554
|
+
vue.createElementVNode("span", null, vue.toDisplayString(title), 1),
|
|
541
555
|
description ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_6$1, vue.toDisplayString(description), 1)) : vue.createCommentVNode("v-if", true)
|
|
542
556
|
])
|
|
543
557
|
]),
|
|
@@ -551,7 +565,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
551
565
|
_: 1
|
|
552
566
|
}, 8, ["image"])
|
|
553
567
|
])) : vue.createCommentVNode("v-if", true)
|
|
554
|
-
])
|
|
568
|
+
])) : vue.createCommentVNode("v-if", true)
|
|
555
569
|
])
|
|
556
570
|
])
|
|
557
571
|
]);
|
|
@@ -613,13 +627,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
613
627
|
props.load({
|
|
614
628
|
departmentName: params.searchVal
|
|
615
629
|
}).then((data) => {
|
|
616
|
-
list.value = data
|
|
617
|
-
...x,
|
|
618
|
-
title: x.name,
|
|
619
|
-
isLeaf: !x.isExistChild,
|
|
620
|
-
key: x.id,
|
|
621
|
-
parent: { key: x.id + Date.now() }
|
|
622
|
-
}));
|
|
630
|
+
list.value = data;
|
|
623
631
|
departNative.value = data;
|
|
624
632
|
});
|
|
625
633
|
selectState.dataMap = flatListFunc(list.value);
|
|
@@ -689,13 +697,13 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
689
697
|
function getOptionName(key) {
|
|
690
698
|
let data = selectState.dataMap.get(String(key));
|
|
691
699
|
if (data && data.title)
|
|
692
|
-
return `${data.title}
|
|
700
|
+
return `${data.title}`;
|
|
693
701
|
let arr = props.select;
|
|
694
702
|
arr = arr.length ? arr : [];
|
|
695
703
|
let had = arr.find(
|
|
696
704
|
(item) => String(item) === String(key) || String(item?.key) === String(key)
|
|
697
705
|
);
|
|
698
|
-
return had?.title ? `${had.title}
|
|
706
|
+
return had?.title ? `${had.title}` : had;
|
|
699
707
|
}
|
|
700
708
|
function deleteOptions(key) {
|
|
701
709
|
if (props.mode === MODE.MULTIPLE) {
|
package/package.json
CHANGED