widget.qw 1.1.2 → 1.1.4
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/build/style.css +21 -21
- package/build/widget.qw.es.js +34 -19
- package/build/widget.qw.umd.js +34 -19
- package/package.json +1 -1
- package/src/components/CascaderPicker.vue +30 -14
- package/src/components/CascaderPop.vue +4 -2
- package/src/components/Input.vue +1 -1
- package/src/views/cascaderpicker/userpicker.vue +2 -2
- package/src/views/input/index.vue +1 -1
- package/src/views/userpicker/index.vue +3 -1
package/build/style.css
CHANGED
|
@@ -89,10 +89,10 @@
|
|
|
89
89
|
:root:root {
|
|
90
90
|
--van-popover-action-width: 70vw;
|
|
91
91
|
}
|
|
92
|
-
[data-v-
|
|
92
|
+
[data-v-fcba0e18] .label {
|
|
93
93
|
color: #000 !important;
|
|
94
94
|
}
|
|
95
|
-
[data-v-
|
|
95
|
+
[data-v-fcba0e18] .van-field__control:disabled {
|
|
96
96
|
color: #000 !important;
|
|
97
97
|
cursor: not-allowed;
|
|
98
98
|
opacity: 1;
|
|
@@ -675,25 +675,25 @@
|
|
|
675
675
|
margin:3px;
|
|
676
676
|
}
|
|
677
677
|
|
|
678
|
-
.cascader-pop[data-v-
|
|
678
|
+
.cascader-pop[data-v-1f4b2244] {
|
|
679
679
|
width: 100%;
|
|
680
680
|
overflow: hidden;
|
|
681
681
|
}
|
|
682
|
-
.cascader-selector[data-v-
|
|
682
|
+
.cascader-selector[data-v-1f4b2244] {
|
|
683
683
|
padding: 10px;
|
|
684
684
|
}
|
|
685
|
-
.search-buttons[data-v-
|
|
685
|
+
.search-buttons[data-v-1f4b2244] {
|
|
686
686
|
display: flex;
|
|
687
687
|
gap: 10px;
|
|
688
688
|
}
|
|
689
|
-
.clear-btn[data-v-
|
|
689
|
+
.clear-btn[data-v-1f4b2244] {
|
|
690
690
|
background-color: #f2f3f5;
|
|
691
691
|
border: none;
|
|
692
692
|
border-radius: 4px;
|
|
693
693
|
padding: 4px 8px;
|
|
694
694
|
font-size: 14px;
|
|
695
695
|
}
|
|
696
|
-
.confirm-btn[data-v-
|
|
696
|
+
.confirm-btn[data-v-1f4b2244] {
|
|
697
697
|
background-color: #1989fa;
|
|
698
698
|
color: white;
|
|
699
699
|
border: none;
|
|
@@ -701,19 +701,19 @@
|
|
|
701
701
|
padding: 4px 8px;
|
|
702
702
|
font-size: 14px;
|
|
703
703
|
}
|
|
704
|
-
.no-results[data-v-
|
|
704
|
+
.no-results[data-v-1f4b2244] {
|
|
705
705
|
text-align: center;
|
|
706
706
|
padding: 20px;
|
|
707
707
|
color: #969799;
|
|
708
708
|
}
|
|
709
|
-
.cascader-header[data-v-
|
|
709
|
+
.cascader-header[data-v-1f4b2244] {
|
|
710
710
|
padding: 10px;
|
|
711
711
|
border-bottom: 1px solid #ebedf0;
|
|
712
712
|
display: flex;
|
|
713
713
|
justify-content: space-between;
|
|
714
714
|
align-items: center;
|
|
715
715
|
}
|
|
716
|
-
.current-path[data-v-
|
|
716
|
+
.current-path[data-v-1f4b2244] {
|
|
717
717
|
flex: 1;
|
|
718
718
|
font-size: 14px;
|
|
719
719
|
margin-left: 5px;
|
|
@@ -722,25 +722,25 @@
|
|
|
722
722
|
overflow: hidden;
|
|
723
723
|
text-overflow: ellipsis;
|
|
724
724
|
}
|
|
725
|
-
.header-right[data-v-
|
|
725
|
+
.header-right[data-v-1f4b2244] {
|
|
726
726
|
display: flex;
|
|
727
727
|
gap: 8px;
|
|
728
728
|
margin-left: auto;
|
|
729
729
|
}
|
|
730
|
-
.cancel-btn[data-v-
|
|
730
|
+
.cancel-btn[data-v-1f4b2244] {
|
|
731
731
|
color: #969799;
|
|
732
732
|
margin-right: 5px;
|
|
733
733
|
}
|
|
734
|
-
.scroll-container[data-v-
|
|
734
|
+
.scroll-container[data-v-1f4b2244] {
|
|
735
735
|
height: calc(80vh - 150px);
|
|
736
736
|
overflow-y: auto;
|
|
737
737
|
}
|
|
738
|
-
.cell-content[data-v-
|
|
738
|
+
.cell-content[data-v-1f4b2244] {
|
|
739
739
|
display: flex;
|
|
740
740
|
align-items: center;
|
|
741
741
|
gap: 12px;
|
|
742
742
|
}
|
|
743
|
-
.circle-selector[data-v-
|
|
743
|
+
.circle-selector[data-v-1f4b2244] {
|
|
744
744
|
width: 20px;
|
|
745
745
|
height: 20px;
|
|
746
746
|
border-radius: 50%;
|
|
@@ -750,29 +750,29 @@
|
|
|
750
750
|
transition: all 0.2s;
|
|
751
751
|
flex-shrink: 0;
|
|
752
752
|
}
|
|
753
|
-
.circle-selector.selected[data-v-
|
|
753
|
+
.circle-selector.selected[data-v-1f4b2244] {
|
|
754
754
|
background-color: #1989fa;
|
|
755
755
|
border-color: #1989fa;
|
|
756
756
|
}
|
|
757
|
-
.circle-selector.selected .van-icon[data-v-
|
|
757
|
+
.circle-selector.selected .van-icon[data-v-1f4b2244] {
|
|
758
758
|
color: white;
|
|
759
759
|
font-size: 14px;
|
|
760
760
|
}
|
|
761
|
-
.van-cell__right-icon[data-v-
|
|
761
|
+
.van-cell__right-icon[data-v-1f4b2244] {
|
|
762
762
|
color: #969799;
|
|
763
763
|
font-size: 16px;
|
|
764
764
|
margin-left: 8px;
|
|
765
765
|
}
|
|
766
|
-
.name[data-v-
|
|
766
|
+
.name[data-v-1f4b2244] {
|
|
767
767
|
flex: 1;
|
|
768
768
|
overflow: hidden;
|
|
769
769
|
text-overflow: ellipsis;
|
|
770
770
|
white-space: nowrap;
|
|
771
771
|
}
|
|
772
|
-
.cancel-btn[data-v-
|
|
772
|
+
.cancel-btn[data-v-1f4b2244] {
|
|
773
773
|
color: #969799;
|
|
774
774
|
}
|
|
775
|
-
.search-field[data-v-
|
|
775
|
+
.search-field[data-v-1f4b2244] {
|
|
776
776
|
background: #fff;
|
|
777
777
|
padding: 10px 16px;
|
|
778
778
|
border-bottom: 1px solid #ebedf0;
|
package/build/widget.qw.es.js
CHANGED
|
@@ -17638,7 +17638,7 @@ function useVModel(props2, key, emit2, options = {}) {
|
|
|
17638
17638
|
});
|
|
17639
17639
|
}
|
|
17640
17640
|
}
|
|
17641
|
-
var Input_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => "[data-v-
|
|
17641
|
+
var Input_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => "[data-v-fcba0e18] .label {\n color: #000 !important;\n}\n[data-v-fcba0e18] .van-field__control:disabled {\n color: #000 !important;\n cursor: not-allowed;\n opacity: 1;\n -webkit-text-fill-color: #000;\n}")();
|
|
17642
17642
|
const _hoisted_1$i = {
|
|
17643
17643
|
style: {
|
|
17644
17644
|
"display": "flex",
|
|
@@ -17758,10 +17758,11 @@ const _sfc_main$s = {
|
|
|
17758
17758
|
autosize: props.autosize,
|
|
17759
17759
|
rules: unref(rules)
|
|
17760
17760
|
}, {
|
|
17761
|
-
button: withCtx(() => [
|
|
17761
|
+
button: withCtx(() => [!unref(isGone) && !unref(isReadonly) && !unref(isDisabled) ? (openBlock(), createBlock(_component_van_icon, {
|
|
17762
|
+
key: 0,
|
|
17762
17763
|
name: "plus",
|
|
17763
17764
|
onClick: onCalc
|
|
17764
|
-
})]),
|
|
17765
|
+
})) : createCommentVNode("", true)]),
|
|
17765
17766
|
_: 1
|
|
17766
17767
|
}, 8, ["label", "modelValue", "disabled", "required", "placeholder", "type", "rows", "autosize", "rules"])) : createCommentVNode("", true), createVNode(_component_van_popup, {
|
|
17767
17768
|
show: data.isShowPop,
|
|
@@ -17805,7 +17806,7 @@ const _sfc_main$s = {
|
|
|
17805
17806
|
};
|
|
17806
17807
|
}
|
|
17807
17808
|
};
|
|
17808
|
-
var Input = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["__scopeId", "data-v-
|
|
17809
|
+
var Input = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["__scopeId", "data-v-fcba0e18"]]);
|
|
17809
17810
|
var SinglePicker_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => "[data-v-3ae83b36] .label {\n color: #000 !important;\n}\n[data-v-3ae83b36] .van-field__control:disabled {\n color: #000 !important;\n cursor: not-allowed;\n opacity: 1;\n -webkit-text-fill-color: #000;\n}")();
|
|
17810
17811
|
const _sfc_main$r = {
|
|
17811
17812
|
__name: "SinglePicker",
|
|
@@ -21635,8 +21636,8 @@ const _sfc_main$4 = {
|
|
|
21635
21636
|
}
|
|
21636
21637
|
};
|
|
21637
21638
|
var TreePicker = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-ebc14630"]]);
|
|
21638
|
-
var CascaderPop_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => "\n.cascader-pop[data-v-
|
|
21639
|
-
const _withScopeId = (n) => (pushScopeId("data-v-
|
|
21639
|
+
var CascaderPop_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => "\n.cascader-pop[data-v-1f4b2244] {\r\n width: 100%;\r\n overflow: hidden;\n}\n.cascader-selector[data-v-1f4b2244] {\r\n padding: 10px;\n}\n.search-buttons[data-v-1f4b2244] {\r\n display: flex;\r\n gap: 10px;\n}\n.clear-btn[data-v-1f4b2244] {\r\n background-color: #f2f3f5;\r\n border: none;\r\n border-radius: 4px;\r\n padding: 4px 8px;\r\n font-size: 14px;\n}\n.confirm-btn[data-v-1f4b2244] {\r\n background-color: #1989fa;\r\n color: white;\r\n border: none;\r\n border-radius: 4px;\r\n padding: 4px 8px;\r\n font-size: 14px;\n}\n.no-results[data-v-1f4b2244] {\r\n text-align: center;\r\n padding: 20px;\r\n color: #969799;\n}\n.cascader-header[data-v-1f4b2244] {\r\n padding: 10px;\r\n border-bottom: 1px solid #ebedf0;\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\n}\n.current-path[data-v-1f4b2244] {\r\n flex: 1;\r\n font-size: 14px;\r\n margin-left: 5px;\r\n color: #323233;\r\n white-space: nowrap;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\n}\n.header-right[data-v-1f4b2244] {\r\n display: flex;\r\n gap: 8px;\r\n margin-left: auto;\n}\n.cancel-btn[data-v-1f4b2244] {\r\n color: #969799;\r\n margin-right: 5px;\n}\n.scroll-container[data-v-1f4b2244] {\r\n height: calc(80vh - 150px);\r\n overflow-y: auto;\n}\n.cell-content[data-v-1f4b2244] {\r\n display: flex;\r\n align-items: center;\r\n gap: 12px;\n}\n.circle-selector[data-v-1f4b2244] {\r\n width: 20px;\r\n height: 20px;\r\n border-radius: 50%;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n transition: all 0.2s;\r\n flex-shrink: 0;\n}\n.circle-selector.selected[data-v-1f4b2244] {\r\n background-color: #1989fa;\r\n border-color: #1989fa;\n}\n.circle-selector.selected .van-icon[data-v-1f4b2244] {\r\n color: white;\r\n font-size: 14px;\n}\n.van-cell__right-icon[data-v-1f4b2244] {\r\n color: #969799;\r\n font-size: 16px;\r\n margin-left: 8px;\n}\n.name[data-v-1f4b2244] {\r\n flex: 1;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n white-space: nowrap;\n}\n.cancel-btn[data-v-1f4b2244] {\r\n color: #969799;\n}\n.search-field[data-v-1f4b2244] {\r\n background: #fff;\r\n padding: 10px 16px;\r\n border-bottom: 1px solid #ebedf0;\r\n position: sticky;\r\n top: 0;\r\n z-index: 999;\r\n margin-bottom: 10px;\r\n flex-shrink: 0;\r\n /* \u9632\u6B62\u538B\u7F29 */\n}\r\n")();
|
|
21640
|
+
const _withScopeId = (n) => (pushScopeId("data-v-1f4b2244"), n = n(), popScopeId(), n);
|
|
21640
21641
|
const _hoisted_1$3 = {
|
|
21641
21642
|
class: "cascader-selector"
|
|
21642
21643
|
};
|
|
@@ -21764,7 +21765,8 @@ const _sfc_main$3 = {
|
|
|
21764
21765
|
props2.idQueryNode({
|
|
21765
21766
|
id: parentId,
|
|
21766
21767
|
isReturnParent,
|
|
21767
|
-
hasChildren: true
|
|
21768
|
+
hasChildren: true,
|
|
21769
|
+
hasUsers: true
|
|
21768
21770
|
}, (node) => {
|
|
21769
21771
|
data2.parentNode = node;
|
|
21770
21772
|
});
|
|
@@ -21785,6 +21787,7 @@ const _sfc_main$3 = {
|
|
|
21785
21787
|
params.isReturnParent = true;
|
|
21786
21788
|
params.hasChildren = false;
|
|
21787
21789
|
params.hasPaths = true;
|
|
21790
|
+
params.hasUsers = true;
|
|
21788
21791
|
let selectNode = null;
|
|
21789
21792
|
yield props2.idQueryNode(params, (node) => {
|
|
21790
21793
|
data2.parentNode = node;
|
|
@@ -21828,7 +21831,9 @@ const _sfc_main$3 = {
|
|
|
21828
21831
|
props2.idQueryNode({
|
|
21829
21832
|
id: node.id,
|
|
21830
21833
|
isReturnParent: false,
|
|
21831
|
-
hasChildren: true
|
|
21834
|
+
hasChildren: true,
|
|
21835
|
+
hasPaths: true,
|
|
21836
|
+
hasUsers: true
|
|
21832
21837
|
}, (node2) => {
|
|
21833
21838
|
data2.parentNode = node2;
|
|
21834
21839
|
});
|
|
@@ -21840,6 +21845,7 @@ const _sfc_main$3 = {
|
|
|
21840
21845
|
params.isReturnParent = true;
|
|
21841
21846
|
params.hasChildren = true;
|
|
21842
21847
|
params.hasPaths = true;
|
|
21848
|
+
params.hasUsers = true;
|
|
21843
21849
|
yield props2.idQueryNode(params, (node) => {
|
|
21844
21850
|
data2.parentNode = node;
|
|
21845
21851
|
});
|
|
@@ -21959,7 +21965,7 @@ const _sfc_main$3 = {
|
|
|
21959
21965
|
};
|
|
21960
21966
|
}
|
|
21961
21967
|
};
|
|
21962
|
-
var CascaderPop = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-
|
|
21968
|
+
var CascaderPop = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-1f4b2244"]]);
|
|
21963
21969
|
const _hoisted_1$2 = {
|
|
21964
21970
|
style: {
|
|
21965
21971
|
"display": "flex",
|
|
@@ -22064,21 +22070,30 @@ const _sfc_main$2 = {
|
|
|
22064
22070
|
ids = modelValue2.value;
|
|
22065
22071
|
if (ids.length < 1)
|
|
22066
22072
|
return [];
|
|
22067
|
-
let
|
|
22073
|
+
let res = [];
|
|
22074
|
+
let receivedNodes = [];
|
|
22075
|
+
for (var i = 0; i < ids.length; i++) {
|
|
22076
|
+
let nodeId = ids[i];
|
|
22077
|
+
let selectNode = null;
|
|
22078
|
+
selectNode = util.findNode(nodeId, receivedNodes);
|
|
22079
|
+
if (selectNode) {
|
|
22080
|
+
res = [...res, selectNode];
|
|
22081
|
+
continue;
|
|
22082
|
+
}
|
|
22068
22083
|
let params = {};
|
|
22069
22084
|
params.id = nodeId;
|
|
22070
|
-
params.isReturnParent =
|
|
22085
|
+
params.isReturnParent = false;
|
|
22071
22086
|
params.hasChildren = false;
|
|
22072
|
-
params.hasPaths =
|
|
22073
|
-
|
|
22087
|
+
params.hasPaths = false;
|
|
22088
|
+
params.hasUsers = true;
|
|
22074
22089
|
yield props2.idQueryNode(params, (node) => {
|
|
22075
|
-
|
|
22076
|
-
selectNode = util.findNode(nodeId,
|
|
22090
|
+
receivedNodes = [...receivedNodes, ...node.children || []];
|
|
22091
|
+
selectNode = util.findNode(nodeId, receivedNodes);
|
|
22077
22092
|
});
|
|
22078
|
-
|
|
22079
|
-
|
|
22080
|
-
|
|
22081
|
-
return
|
|
22093
|
+
if (selectNode)
|
|
22094
|
+
res = [...res, selectNode];
|
|
22095
|
+
}
|
|
22096
|
+
return res;
|
|
22082
22097
|
});
|
|
22083
22098
|
watch(() => JSON.stringify(modelValue2.value), (n, o) => __async(this, null, function* () {
|
|
22084
22099
|
if (!props2.multiple) {
|
package/build/widget.qw.umd.js
CHANGED
|
@@ -17641,7 +17641,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
17641
17641
|
});
|
|
17642
17642
|
}
|
|
17643
17643
|
}
|
|
17644
|
-
var Input_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => "[data-v-
|
|
17644
|
+
var Input_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => "[data-v-fcba0e18] .label {\n color: #000 !important;\n}\n[data-v-fcba0e18] .van-field__control:disabled {\n color: #000 !important;\n cursor: not-allowed;\n opacity: 1;\n -webkit-text-fill-color: #000;\n}")();
|
|
17645
17645
|
const _hoisted_1$i = {
|
|
17646
17646
|
style: {
|
|
17647
17647
|
"display": "flex",
|
|
@@ -17761,10 +17761,11 @@ var __async = (__this, __arguments, generator) => {
|
|
|
17761
17761
|
autosize: props.autosize,
|
|
17762
17762
|
rules: vue.unref(rules)
|
|
17763
17763
|
}, {
|
|
17764
|
-
button: vue.withCtx(() => [vue.
|
|
17764
|
+
button: vue.withCtx(() => [!vue.unref(isGone) && !vue.unref(isReadonly) && !vue.unref(isDisabled) ? (vue.openBlock(), vue.createBlock(_component_van_icon, {
|
|
17765
|
+
key: 0,
|
|
17765
17766
|
name: "plus",
|
|
17766
17767
|
onClick: onCalc
|
|
17767
|
-
})]),
|
|
17768
|
+
})) : vue.createCommentVNode("", true)]),
|
|
17768
17769
|
_: 1
|
|
17769
17770
|
}, 8, ["label", "modelValue", "disabled", "required", "placeholder", "type", "rows", "autosize", "rules"])) : vue.createCommentVNode("", true), vue.createVNode(_component_van_popup, {
|
|
17770
17771
|
show: data.isShowPop,
|
|
@@ -17808,7 +17809,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
17808
17809
|
};
|
|
17809
17810
|
}
|
|
17810
17811
|
};
|
|
17811
|
-
var Input = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["__scopeId", "data-v-
|
|
17812
|
+
var Input = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["__scopeId", "data-v-fcba0e18"]]);
|
|
17812
17813
|
var SinglePicker_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => "[data-v-3ae83b36] .label {\n color: #000 !important;\n}\n[data-v-3ae83b36] .van-field__control:disabled {\n color: #000 !important;\n cursor: not-allowed;\n opacity: 1;\n -webkit-text-fill-color: #000;\n}")();
|
|
17813
17814
|
const _sfc_main$r = {
|
|
17814
17815
|
__name: "SinglePicker",
|
|
@@ -21638,8 +21639,8 @@ var __async = (__this, __arguments, generator) => {
|
|
|
21638
21639
|
}
|
|
21639
21640
|
};
|
|
21640
21641
|
var TreePicker = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-ebc14630"]]);
|
|
21641
|
-
var CascaderPop_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => "\n.cascader-pop[data-v-
|
|
21642
|
-
const _withScopeId = (n) => (vue.pushScopeId("data-v-
|
|
21642
|
+
var CascaderPop_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => "\n.cascader-pop[data-v-1f4b2244] {\r\n width: 100%;\r\n overflow: hidden;\n}\n.cascader-selector[data-v-1f4b2244] {\r\n padding: 10px;\n}\n.search-buttons[data-v-1f4b2244] {\r\n display: flex;\r\n gap: 10px;\n}\n.clear-btn[data-v-1f4b2244] {\r\n background-color: #f2f3f5;\r\n border: none;\r\n border-radius: 4px;\r\n padding: 4px 8px;\r\n font-size: 14px;\n}\n.confirm-btn[data-v-1f4b2244] {\r\n background-color: #1989fa;\r\n color: white;\r\n border: none;\r\n border-radius: 4px;\r\n padding: 4px 8px;\r\n font-size: 14px;\n}\n.no-results[data-v-1f4b2244] {\r\n text-align: center;\r\n padding: 20px;\r\n color: #969799;\n}\n.cascader-header[data-v-1f4b2244] {\r\n padding: 10px;\r\n border-bottom: 1px solid #ebedf0;\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\n}\n.current-path[data-v-1f4b2244] {\r\n flex: 1;\r\n font-size: 14px;\r\n margin-left: 5px;\r\n color: #323233;\r\n white-space: nowrap;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\n}\n.header-right[data-v-1f4b2244] {\r\n display: flex;\r\n gap: 8px;\r\n margin-left: auto;\n}\n.cancel-btn[data-v-1f4b2244] {\r\n color: #969799;\r\n margin-right: 5px;\n}\n.scroll-container[data-v-1f4b2244] {\r\n height: calc(80vh - 150px);\r\n overflow-y: auto;\n}\n.cell-content[data-v-1f4b2244] {\r\n display: flex;\r\n align-items: center;\r\n gap: 12px;\n}\n.circle-selector[data-v-1f4b2244] {\r\n width: 20px;\r\n height: 20px;\r\n border-radius: 50%;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n transition: all 0.2s;\r\n flex-shrink: 0;\n}\n.circle-selector.selected[data-v-1f4b2244] {\r\n background-color: #1989fa;\r\n border-color: #1989fa;\n}\n.circle-selector.selected .van-icon[data-v-1f4b2244] {\r\n color: white;\r\n font-size: 14px;\n}\n.van-cell__right-icon[data-v-1f4b2244] {\r\n color: #969799;\r\n font-size: 16px;\r\n margin-left: 8px;\n}\n.name[data-v-1f4b2244] {\r\n flex: 1;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n white-space: nowrap;\n}\n.cancel-btn[data-v-1f4b2244] {\r\n color: #969799;\n}\n.search-field[data-v-1f4b2244] {\r\n background: #fff;\r\n padding: 10px 16px;\r\n border-bottom: 1px solid #ebedf0;\r\n position: sticky;\r\n top: 0;\r\n z-index: 999;\r\n margin-bottom: 10px;\r\n flex-shrink: 0;\r\n /* \u9632\u6B62\u538B\u7F29 */\n}\r\n")();
|
|
21643
|
+
const _withScopeId = (n) => (vue.pushScopeId("data-v-1f4b2244"), n = n(), vue.popScopeId(), n);
|
|
21643
21644
|
const _hoisted_1$3 = {
|
|
21644
21645
|
class: "cascader-selector"
|
|
21645
21646
|
};
|
|
@@ -21767,7 +21768,8 @@ var __async = (__this, __arguments, generator) => {
|
|
|
21767
21768
|
props2.idQueryNode({
|
|
21768
21769
|
id: parentId,
|
|
21769
21770
|
isReturnParent,
|
|
21770
|
-
hasChildren: true
|
|
21771
|
+
hasChildren: true,
|
|
21772
|
+
hasUsers: true
|
|
21771
21773
|
}, (node) => {
|
|
21772
21774
|
data2.parentNode = node;
|
|
21773
21775
|
});
|
|
@@ -21788,6 +21790,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
21788
21790
|
params.isReturnParent = true;
|
|
21789
21791
|
params.hasChildren = false;
|
|
21790
21792
|
params.hasPaths = true;
|
|
21793
|
+
params.hasUsers = true;
|
|
21791
21794
|
let selectNode = null;
|
|
21792
21795
|
yield props2.idQueryNode(params, (node) => {
|
|
21793
21796
|
data2.parentNode = node;
|
|
@@ -21831,7 +21834,9 @@ var __async = (__this, __arguments, generator) => {
|
|
|
21831
21834
|
props2.idQueryNode({
|
|
21832
21835
|
id: node.id,
|
|
21833
21836
|
isReturnParent: false,
|
|
21834
|
-
hasChildren: true
|
|
21837
|
+
hasChildren: true,
|
|
21838
|
+
hasPaths: true,
|
|
21839
|
+
hasUsers: true
|
|
21835
21840
|
}, (node2) => {
|
|
21836
21841
|
data2.parentNode = node2;
|
|
21837
21842
|
});
|
|
@@ -21843,6 +21848,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
21843
21848
|
params.isReturnParent = true;
|
|
21844
21849
|
params.hasChildren = true;
|
|
21845
21850
|
params.hasPaths = true;
|
|
21851
|
+
params.hasUsers = true;
|
|
21846
21852
|
yield props2.idQueryNode(params, (node) => {
|
|
21847
21853
|
data2.parentNode = node;
|
|
21848
21854
|
});
|
|
@@ -21962,7 +21968,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
21962
21968
|
};
|
|
21963
21969
|
}
|
|
21964
21970
|
};
|
|
21965
|
-
var CascaderPop = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-
|
|
21971
|
+
var CascaderPop = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-1f4b2244"]]);
|
|
21966
21972
|
const _hoisted_1$2 = {
|
|
21967
21973
|
style: {
|
|
21968
21974
|
"display": "flex",
|
|
@@ -22067,21 +22073,30 @@ var __async = (__this, __arguments, generator) => {
|
|
|
22067
22073
|
ids = modelValue2.value;
|
|
22068
22074
|
if (ids.length < 1)
|
|
22069
22075
|
return [];
|
|
22070
|
-
let
|
|
22076
|
+
let res = [];
|
|
22077
|
+
let receivedNodes = [];
|
|
22078
|
+
for (var i = 0; i < ids.length; i++) {
|
|
22079
|
+
let nodeId = ids[i];
|
|
22080
|
+
let selectNode = null;
|
|
22081
|
+
selectNode = util.findNode(nodeId, receivedNodes);
|
|
22082
|
+
if (selectNode) {
|
|
22083
|
+
res = [...res, selectNode];
|
|
22084
|
+
continue;
|
|
22085
|
+
}
|
|
22071
22086
|
let params = {};
|
|
22072
22087
|
params.id = nodeId;
|
|
22073
|
-
params.isReturnParent =
|
|
22088
|
+
params.isReturnParent = false;
|
|
22074
22089
|
params.hasChildren = false;
|
|
22075
|
-
params.hasPaths =
|
|
22076
|
-
|
|
22090
|
+
params.hasPaths = false;
|
|
22091
|
+
params.hasUsers = true;
|
|
22077
22092
|
yield props2.idQueryNode(params, (node) => {
|
|
22078
|
-
|
|
22079
|
-
selectNode = util.findNode(nodeId,
|
|
22093
|
+
receivedNodes = [...receivedNodes, ...node.children || []];
|
|
22094
|
+
selectNode = util.findNode(nodeId, receivedNodes);
|
|
22080
22095
|
});
|
|
22081
|
-
|
|
22082
|
-
|
|
22083
|
-
|
|
22084
|
-
return
|
|
22096
|
+
if (selectNode)
|
|
22097
|
+
res = [...res, selectNode];
|
|
22098
|
+
}
|
|
22099
|
+
return res;
|
|
22085
22100
|
});
|
|
22086
22101
|
vue.watch(() => JSON.stringify(modelValue2.value), (n, o) => __async(this, null, function* () {
|
|
22087
22102
|
if (!props2.multiple) {
|
package/package.json
CHANGED
|
@@ -116,34 +116,50 @@ const onDelete = (idx) => {
|
|
|
116
116
|
|
|
117
117
|
const ids2nodes = async () => {
|
|
118
118
|
let ids = []
|
|
119
|
-
if(!props.multiple){
|
|
120
|
-
if(modelValue.value)
|
|
119
|
+
if (!props.multiple) {
|
|
120
|
+
if (modelValue.value)
|
|
121
121
|
ids = [modelValue.value]
|
|
122
122
|
}
|
|
123
|
-
else if(modelValue.value && modelValue.value.length>0)
|
|
123
|
+
else if (modelValue.value && modelValue.value.length > 0)
|
|
124
124
|
ids = modelValue.value
|
|
125
125
|
|
|
126
126
|
if (ids.length < 1)
|
|
127
127
|
return []
|
|
128
128
|
|
|
129
|
-
let
|
|
129
|
+
let res = []
|
|
130
|
+
|
|
131
|
+
//记录网络请求接收到的所有用户列表
|
|
132
|
+
let receivedNodes = []
|
|
133
|
+
for (var i = 0; i < ids.length; i++) {
|
|
134
|
+
let nodeId = ids[i]
|
|
135
|
+
|
|
136
|
+
let selectNode = null
|
|
137
|
+
|
|
138
|
+
//现在历史用户列表中查找
|
|
139
|
+
//找不到再发网络请求
|
|
140
|
+
selectNode = util.findNode(nodeId, receivedNodes)
|
|
141
|
+
if (selectNode){
|
|
142
|
+
res = [...res, selectNode]
|
|
143
|
+
continue
|
|
144
|
+
}
|
|
145
|
+
|
|
130
146
|
let params = {}
|
|
131
147
|
params.id = nodeId
|
|
132
|
-
params.isReturnParent =
|
|
148
|
+
params.isReturnParent = false
|
|
133
149
|
params.hasChildren = false
|
|
134
|
-
params.hasPaths =
|
|
150
|
+
params.hasPaths = false
|
|
151
|
+
params.hasUsers = true
|
|
135
152
|
|
|
136
|
-
let selectNode = null
|
|
137
153
|
await props.idQueryNode(params, (node) => {
|
|
138
|
-
|
|
139
|
-
selectNode = util.findNode(nodeId,
|
|
154
|
+
receivedNodes = [...receivedNodes, ...(node.children || [])]
|
|
155
|
+
selectNode = util.findNode(nodeId, receivedNodes)
|
|
140
156
|
})
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
157
|
+
|
|
158
|
+
if (selectNode)
|
|
159
|
+
res = [...res, selectNode]
|
|
160
|
+
}
|
|
145
161
|
|
|
146
|
-
return
|
|
162
|
+
return res
|
|
147
163
|
}
|
|
148
164
|
|
|
149
165
|
watch(() => JSON.stringify(modelValue.value), async (n, o) => {
|
|
@@ -165,7 +165,7 @@ const onBack = () => {
|
|
|
165
165
|
data.keyword = ""
|
|
166
166
|
//查询父节点
|
|
167
167
|
//父节点一定有子节点
|
|
168
|
-
props.idQueryNode({ id: parentId, isReturnParent: isReturnParent, hasChildren: true }, (node) => {
|
|
168
|
+
props.idQueryNode({ id: parentId, isReturnParent: isReturnParent, hasChildren: true,hasUsers:true }, (node) => {
|
|
169
169
|
data.parentNode = node
|
|
170
170
|
})
|
|
171
171
|
}
|
|
@@ -191,6 +191,7 @@ const ids2nodes = async () => {
|
|
|
191
191
|
params.isReturnParent = true
|
|
192
192
|
params.hasChildren = false
|
|
193
193
|
params.hasPaths = true
|
|
194
|
+
params.hasUsers = true
|
|
194
195
|
|
|
195
196
|
let selectNode = null
|
|
196
197
|
await props.idQueryNode(params, (node) => {
|
|
@@ -245,7 +246,7 @@ const onToggle = (node) => {
|
|
|
245
246
|
}
|
|
246
247
|
|
|
247
248
|
const onNextLevel = (node) => {
|
|
248
|
-
props.idQueryNode({ id: node.id, isReturnParent: false, hasChildren: true }, (node) => {
|
|
249
|
+
props.idQueryNode({ id: node.id, isReturnParent: false, hasChildren: true,hasPaths:true,hasUsers:true }, (node) => {
|
|
249
250
|
data.parentNode = node
|
|
250
251
|
})
|
|
251
252
|
}
|
|
@@ -257,6 +258,7 @@ const query = async () => {
|
|
|
257
258
|
params.isReturnParent = true
|
|
258
259
|
params.hasChildren = true
|
|
259
260
|
params.hasPaths = true
|
|
261
|
+
params.hasUsers = true
|
|
260
262
|
|
|
261
263
|
await props.idQueryNode(params, (node) => {
|
|
262
264
|
data.parentNode = node
|
package/src/components/Input.vue
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
:rows="props.rows" :autosize="props.autosize" :rules="rules">
|
|
6
6
|
<!-- 右侧插槽按钮 -->
|
|
7
7
|
<template #button>
|
|
8
|
-
<van-icon name="plus" @click="onCalc" />
|
|
8
|
+
<van-icon v-if="!isGone && !isReadonly && !isDisabled" name="plus" @click="onCalc" />
|
|
9
9
|
</template>
|
|
10
10
|
</van-field>
|
|
11
11
|
<van-popup v-model:show="data.isShowPop" position="bottom" round style="padding: 25px 15px;">
|
|
@@ -79,8 +79,8 @@ const idQueryNode = async (params, setNode) => {
|
|
|
79
79
|
let p = {
|
|
80
80
|
id: params.id,
|
|
81
81
|
hasChildren: params.hasChildren,
|
|
82
|
-
hasPaths:
|
|
83
|
-
hasUsers:
|
|
82
|
+
hasPaths: params.hasPaths,
|
|
83
|
+
hasUsers: params.hasUsers,
|
|
84
84
|
isReturnParent: params.isReturnParent
|
|
85
85
|
}
|
|
86
86
|
|
|
@@ -10,8 +10,10 @@ import UserPicker from '../cascaderpicker/userpicker.vue'
|
|
|
10
10
|
|
|
11
11
|
const data = reactive({
|
|
12
12
|
multiple:true,
|
|
13
|
+
// multiple:false,
|
|
13
14
|
auth: 'require',
|
|
14
|
-
userids: []
|
|
15
|
+
userids: ["YuChao", "LiuShouBo", "KuangLeiLei","HouMu"]
|
|
16
|
+
// userids: "YuChao"
|
|
15
17
|
})
|
|
16
18
|
|
|
17
19
|
onMounted(() => {
|