cnhis-design-vue 3.1.27-beta.6 → 3.1.27
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/index.css +1 -1
- package/es/components/scale-view/src/components/formitem/standard-modal.d.ts +2 -2
- package/es/components/scale-view/src/hooks/use-component.d.ts +3 -3
- package/es/components/search-cascader/index.d.ts +1 -1
- package/es/components/search-cascader/src/SearchCascader.vue.d.ts +1 -1
- package/es/components/select-label/index.d.ts +5 -5
- package/es/components/select-label/src/LabelFormContent.vue.d.ts +2 -2
- package/es/components/select-label/src/SelectLabel.vue.d.ts +3 -3
- package/es/components/select-person/index.d.ts +69 -326
- package/es/components/select-person/src/SelectPerson.vue.d.ts +69 -328
- package/es/components/select-person/src/SelectPerson.vue_vue_type_script_setup_true_lang.js +185 -884
- package/es/components/select-person/src/utils/index.d.ts +2 -12
- package/es/components/select-person/src/utils/index.js +39 -79
- package/es/components/select-person/style/index.css +1 -1
- package/es/components/steps-wheel/src/StepsWheel.js +19 -20
- package/es/components/steps-wheel/style/index.css +1 -1
- package/package.json +2 -2
- package/es/components/select-person/src/SearchTree.js +0 -6
- package/es/components/select-person/src/SearchTree.vue_vue_type_script_setup_true_lang.js +0 -233
|
@@ -1,12 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
data?: any[] | undefined;
|
|
4
|
-
prop?: string | undefined;
|
|
5
|
-
filter?: boolean | undefined;
|
|
6
|
-
filterXor?: boolean | undefined;
|
|
7
|
-
children?: string | undefined;
|
|
8
|
-
visible?: string | undefined;
|
|
9
|
-
filterChildren?: boolean | undefined;
|
|
10
|
-
callback?: Function | undefined;
|
|
11
|
-
}) => any[] | undefined;
|
|
12
|
-
export declare const deepTraversalFirst: (node: any, nodeList?: any[]) => any[];
|
|
1
|
+
import { type TreeOption } from 'naive-ui';
|
|
2
|
+
export declare function filterTree(data: TreeOption[], keyword: string): TreeOption[];
|
|
@@ -1,84 +1,44 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
if (!value2) {
|
|
17
|
-
return true;
|
|
18
|
-
}
|
|
19
|
-
let flag = (data2[prop] || "").indexOf(value2) !== -1;
|
|
20
|
-
return filterXor ? !flag : flag;
|
|
21
|
-
};
|
|
22
|
-
const setVisible = (tree, isVisible) => {
|
|
23
|
-
if (!(tree == null ? void 0 : tree.length))
|
|
24
|
-
return;
|
|
25
|
-
tree.forEach((item) => {
|
|
26
|
-
var _a;
|
|
27
|
-
item[visible] = isVisible;
|
|
28
|
-
((_a = item[children]) == null ? void 0 : _a.length) && setVisible(item[children], isVisible);
|
|
29
|
-
});
|
|
30
|
-
};
|
|
31
|
-
const traverse = function(node) {
|
|
32
|
-
const childNodes = node[children] || [];
|
|
33
|
-
childNodes.forEach((child) => {
|
|
34
|
-
child[visible] = !node.root && !filterChildren && node[visible] || filterNodeMethod.call(child, value, child);
|
|
35
|
-
traverse(child);
|
|
36
|
-
callback && callback(child);
|
|
37
|
-
});
|
|
38
|
-
if (childNodes.length) {
|
|
39
|
-
let allHidden = true;
|
|
40
|
-
allHidden = !childNodes.some((child) => child[visible]);
|
|
41
|
-
if (!node[visible]) {
|
|
42
|
-
node[visible] = allHidden === false;
|
|
1
|
+
import { cloneDeep } from 'lodash-es';
|
|
2
|
+
|
|
3
|
+
function filterTree(data, keyword) {
|
|
4
|
+
const newData = cloneDeep(data);
|
|
5
|
+
transform(newData, keyword);
|
|
6
|
+
return filterHandle(newData);
|
|
7
|
+
}
|
|
8
|
+
function transform(data, keyword) {
|
|
9
|
+
data.forEach((item) => {
|
|
10
|
+
var _a, _b;
|
|
11
|
+
item.visible = (_a = item.title) == null ? void 0 : _a.includes(keyword);
|
|
12
|
+
if ((_b = item.children) == null ? void 0 : _b.length) {
|
|
13
|
+
transform(item.children, keyword);
|
|
14
|
+
if (item.visible) {
|
|
15
|
+
setVisible(item.children);
|
|
43
16
|
} else {
|
|
44
|
-
|
|
17
|
+
const isVisible = item.children.some((child) => child.visible);
|
|
18
|
+
if (isVisible)
|
|
19
|
+
item.visible = true;
|
|
45
20
|
}
|
|
46
21
|
}
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}
|
|
65
|
-
return true;
|
|
66
|
-
}
|
|
67
|
-
return false;
|
|
68
|
-
});
|
|
69
|
-
};
|
|
70
|
-
return filterHandle(copyData);
|
|
71
|
-
}
|
|
72
|
-
};
|
|
73
|
-
const deepTraversalFirst = (node, nodeList = []) => {
|
|
74
|
-
if (node !== null) {
|
|
75
|
-
nodeList.push(node);
|
|
76
|
-
if (node.children && node.children.length > 0) {
|
|
77
|
-
let children = node.children;
|
|
78
|
-
deepTraversalFirst(children[0], nodeList);
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
function setVisible(data) {
|
|
25
|
+
data.forEach((item) => {
|
|
26
|
+
var _a;
|
|
27
|
+
item.visible = true;
|
|
28
|
+
((_a = item.children) == null ? void 0 : _a.length) && setVisible(item.children);
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
function filterHandle(data) {
|
|
32
|
+
return data.filter((item) => {
|
|
33
|
+
var _a;
|
|
34
|
+
if (item.visible) {
|
|
35
|
+
if ((_a = item.children) == null ? void 0 : _a.length) {
|
|
36
|
+
item.children = filterHandle(item.children);
|
|
37
|
+
}
|
|
38
|
+
return true;
|
|
79
39
|
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
}
|
|
40
|
+
return false;
|
|
41
|
+
});
|
|
42
|
+
}
|
|
83
43
|
|
|
84
|
-
export {
|
|
44
|
+
export { filterTree };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
.c-select-person__scroll{height:308px;overflow-y:auto}.c-select-person__clear-btn{color:#5585f5;cursor:pointer}.c-select-person__tag-item{align-items:center;background:rgba(85,133,245,.08);border:1px solid rgba(85,133,245,.5);border-radius:4px;box-sizing:border-box;color:#5585f5;display:inline-flex;font-size:14px;height:24px;line-height:24px;list-style:none;margin:0 8px 4px 0;padding:0 6px;transition:all .3s cubic-bezier(.215,.61,.355,1);white-space:nowrap}.c-select-person__tag-item .tag-close{color:#5585f5;cursor:pointer;display:inline-block;font-size:14px;font-weight:700;margin-left:3px;transition:all .3s}.c-select-person__tag-item .tag-close:hover{color:rgba(85,133,245,.6)}.c-select-person__tag-item .tag-close:active{color:#fff}
|
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
import { defineComponent, computed, toRefs, ref, watch, openBlock, createElementBlock,
|
|
1
|
+
import { defineComponent, computed, toRefs, ref, watch, openBlock, createElementBlock, normalizeStyle, unref, normalizeClass, createElementVNode, Fragment, renderList, createCommentVNode, renderSlot, toDisplayString, createBlock, withCtx, withDirectives, vShow, createVNode, createTextVNode } from 'vue';
|
|
2
2
|
import { NTooltip, NEmpty } from 'naive-ui';
|
|
3
3
|
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.js';
|
|
4
4
|
|
|
5
|
-
const _hoisted_1 = {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
};
|
|
9
|
-
const _hoisted_2 = { style: { "list-style": "none", "width": "100%" } };
|
|
10
|
-
const _hoisted_3 = ["title"];
|
|
11
|
-
const _hoisted_4 = /* @__PURE__ */ createElementVNode("ul", { class: "nodeTipContent" }, [
|
|
5
|
+
const _hoisted_1 = { style: { "list-style": "none", "width": "100%" } };
|
|
6
|
+
const _hoisted_2 = ["title"];
|
|
7
|
+
const _hoisted_3 = /* @__PURE__ */ createElementVNode("ul", { class: "nodeTipContent" }, [
|
|
12
8
|
/* @__PURE__ */ createElementVNode("li", null, [
|
|
13
9
|
/* @__PURE__ */ createElementVNode("p", null, [
|
|
14
10
|
/* @__PURE__ */ createElementVNode("span", { style: { "margin-right": "10px" } }, "(1)"),
|
|
@@ -28,10 +24,10 @@ const _hoisted_4 = /* @__PURE__ */ createElementVNode("ul", { class: "nodeTipCon
|
|
|
28
24
|
/* @__PURE__ */ createElementVNode("p", null, "\u54B1\u8FD9\u662F\u4E2A\u6D4B\u8BD5\u6848\u4F8B,\u8BF7\u4F7F\u7528\u63D2\u69FD\uFF1A#nodeTipBox \u81EA\u5B9A\u4E49")
|
|
29
25
|
])
|
|
30
26
|
], -1);
|
|
27
|
+
const _hoisted_4 = ["title"];
|
|
31
28
|
const _hoisted_5 = ["title"];
|
|
32
|
-
const _hoisted_6 =
|
|
29
|
+
const _hoisted_6 = { key: 1 };
|
|
33
30
|
const _hoisted_7 = { key: 1 };
|
|
34
|
-
const _hoisted_8 = { key: 1 };
|
|
35
31
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
36
32
|
__name: "StepsWheel",
|
|
37
33
|
props: {
|
|
@@ -200,11 +196,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
200
196
|
);
|
|
201
197
|
return (_ctx, _cache) => {
|
|
202
198
|
return openBlock(), createElementBlock("div", {
|
|
203
|
-
class:
|
|
199
|
+
class: "step-wheel-box",
|
|
204
200
|
style: normalizeStyle({ minWidth: unref(countBoxWidth) })
|
|
205
201
|
}, [
|
|
206
|
-
stepInfoList.value.length ? (openBlock(), createElementBlock("div",
|
|
207
|
-
|
|
202
|
+
stepInfoList.value.length ? (openBlock(), createElementBlock("div", {
|
|
203
|
+
key: 0,
|
|
204
|
+
class: normalizeClass(["stepOut", { placementLeft: __props.placement === "left", placementRight: __props.placement === "right" }])
|
|
205
|
+
}, [
|
|
206
|
+
createElementVNode("ul", _hoisted_1, [
|
|
208
207
|
(openBlock(true), createElementBlock(Fragment, null, renderList(stepInfoList.value, (stepItem, index) => {
|
|
209
208
|
return openBlock(), createElementBlock("li", {
|
|
210
209
|
class: normalizeClass(["stepItem", { [`stepItem_${index + 1}`]: true, [`${stepItem == null ? void 0 : stepItem.stepId}`]: (stepItem == null ? void 0 : stepItem.stepId) ? true : false }]),
|
|
@@ -225,7 +224,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
225
224
|
renderSlot(_ctx.$slots, "stepTopBox", {}, () => [
|
|
226
225
|
createElementVNode("span", {
|
|
227
226
|
title: stepItem.title
|
|
228
|
-
}, toDisplayString(stepItem.title), 9,
|
|
227
|
+
}, toDisplayString(stepItem.title), 9, _hoisted_2)
|
|
229
228
|
])
|
|
230
229
|
], 2),
|
|
231
230
|
createCommentVNode(" \u6B65\u9AA4\u6761\u7684\u8282\u70B9\uFF0C\u6B64\u5904\u4E3A\u5706\u5708 "),
|
|
@@ -248,7 +247,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
248
247
|
renderSlot(_ctx.$slots, "nodeTipBox", {
|
|
249
248
|
stepId: stepItem.stepId
|
|
250
249
|
}, () => [
|
|
251
|
-
|
|
250
|
+
_hoisted_3
|
|
252
251
|
])
|
|
253
252
|
]),
|
|
254
253
|
_: 2
|
|
@@ -294,7 +293,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
294
293
|
stepLabel_left: __props.placement === "left"
|
|
295
294
|
}]),
|
|
296
295
|
title: stepItem.label
|
|
297
|
-
}, toDisplayString(stepItem.label), 11,
|
|
296
|
+
}, toDisplayString(stepItem.label), 11, _hoisted_4), [
|
|
298
297
|
[vShow, stepItem.label]
|
|
299
298
|
]),
|
|
300
299
|
createElementVNode("div", {
|
|
@@ -308,7 +307,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
308
307
|
withDirectives(createElementVNode("p", {
|
|
309
308
|
class: "stepExtra",
|
|
310
309
|
title: stepItem.person
|
|
311
|
-
}, toDisplayString(stepItem.person), 9,
|
|
310
|
+
}, toDisplayString(stepItem.person), 9, _hoisted_5), [
|
|
312
311
|
[vShow, stepItem.person]
|
|
313
312
|
]),
|
|
314
313
|
createCommentVNode(" \u6B65\u9AA4\u65F6\u95F4 "),
|
|
@@ -320,16 +319,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
320
319
|
], 2)
|
|
321
320
|
])
|
|
322
321
|
], 2)
|
|
323
|
-
], 64)) : (openBlock(), createElementBlock("div",
|
|
322
|
+
], 64)) : (openBlock(), createElementBlock("div", _hoisted_6, [
|
|
324
323
|
createCommentVNode("null\u5143\u7D20\u5360\u4F4D")
|
|
325
324
|
]))
|
|
326
325
|
], 2);
|
|
327
326
|
}), 128))
|
|
328
327
|
])
|
|
329
|
-
])) : (openBlock(), createElementBlock("div",
|
|
328
|
+
], 2)) : (openBlock(), createElementBlock("div", _hoisted_7, [
|
|
330
329
|
createVNode(unref(NEmpty), { description: unref(noDataMsg) }, null, 8, ["description"])
|
|
331
330
|
]))
|
|
332
|
-
],
|
|
331
|
+
], 4);
|
|
333
332
|
};
|
|
334
333
|
}
|
|
335
334
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.step-wheel-box{font-family:PingFangSC-Medium,PingFang SC;font-size:16px;font-weight:500;height:100%;width:100%}.step-wheel-box .stepOut{display:flex;justify-content:center}.step-wheel-box .stepOut .stepItem{float:left;font-family:SimSun;font-size:16px;height:180px;min-width:73px;position:relative;text-align:center;top:48px;width:15%}.step-wheel-box .stepOut .stepItem .lineCircleRight{border-left:0 dashed rgba(3,2,2,.4)!important;border:1px dashed rgba(3,2,2,.4);border-left:0 hidden #fff;border-radius:0 25px 25px 0;display:block;height:100%;left:55%;position:absolute;top:6px;width:30%}.step-wheel-box .stepOut .stepItem .lineCirclePlacementRight{width:100%}.step-wheel-box .stepOut .stepItem .lineCircleLeft{border-color:#fff;border-bottom:1px dashed rgba(3,2,2,.4);border-left:0 hidden #fff;border-radius:25px 0 0 25px;border-right:0 dashed rgba(3,2,2,.4)!important;border-top:1px dashed rgba(3,2,2,.4);display:block;height:100%;left:15%;position:absolute;top:6px;width:30%}.step-wheel-box .stepOut .stepItem .lineCirclePlacementLeft{left:-55%;width:100%}.step-wheel-box .stepOut .stepItem .lineCircleActive{border:1px solid #2563f4}.step-wheel-box .stepOut .stepItem .lineCircleFinished{border:1px solid #5dc055}.step-wheel-box .stepOut .stepItem .icon{background:#969696;border-radius:50%;height:13px;margin:0 auto;position:relative;width:13px;z-index:888}.step-wheel-box .stepOut .stepItem .active{background-color:#2563f4}.step-wheel-box .stepOut .stepItem .finished{background-color:#5dc055!important;border-color:#5dc055!important;color:#fff!important}.step-wheel-box .stepOut .stepItem .labelFinsh{color:#5dc055!important}.step-wheel-box .stepOut .stepItem .line{border-bottom:1px dashed rgba(3,2,2,.4);left:55%;position:absolute;top:6px;width:90%;z-index:111}.step-wheel-box .stepOut .stepItem .lineActive{border-bottom:1px solid #2563f4}.step-wheel-box .stepOut .stepItem .stepTopBox{background:rgba(110,153,255,.11);border-radius:4px;color:#2563f4;cursor:pointer;height:40px;left:50%;line-height:40px;max-width:70%;min-width:73px;overflow:hidden;padding:0 5px;position:absolute;text-overflow:ellipsis;top:-48px;transform:translateX(-50%);white-space:nowrap}.step-wheel-box .stepOut .stepItem .stepTopBox_right{transform:translateX(-10%)}.step-wheel-box .stepOut .stepItem .stepTopBox_left{transform:translateX(-90%)}.step-wheel-box .stepOut .stepItem .stepBottomBox{align-items:center;cursor:pointer;display:flex;flex-direction:column;height:66%;min-width:73px;width:100%}.step-wheel-box .stepOut .stepItem .stepBottomBox .stepBottomCustomBox{align-items:center;display:flex;flex-direction:column;height:100%;padding:8px 0;width:100%}.step-wheel-box .stepOut .stepItem .stepBottomBox .stepBottomCustomBox .stepBottomDefaultBox{align-items:center}.step-wheel-box .stepOut .stepItem .stepBottomBox .stepBottomCustomBox .alignItemsEnd{align-items:flex-end}.step-wheel-box .stepOut .stepItem .stepBottomBox .stepBottomCustomBox .alignItemsStart{align-items:flex-start}.step-wheel-box .stepOut .stepItem .stepBottomBox .alignItemsEnd{align-items:flex-end}.step-wheel-box .stepOut .stepItem .stepBottomBox .alignItemsStart{align-items:flex-start}.step-wheel-box .stepOut .stepItem .stepBottomBox_right{align-items:flex-start;left:45%;position:relative}.step-wheel-box .stepOut .stepItem .stepBottomBox_left{align-items:flex-end;left:-45%;position:relative}.step-wheel-box .stepOut .stepItem .stepLabel{color:#212121;line-height:36px;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}.step-wheel-box .stepOut .stepItem .stepLabel_right{text-align:left}.step-wheel-box .stepOut .stepItem .stepLabel_left{text-align:right}.step-wheel-box .stepOut .stepItem .stepExtra{border:1px solid #cacaca;border-radius:4px;height:26px;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:73px}.step-wheel-box .stepOut .stepItem .statusTime{color:rgba(0,0,0,.6);font-size:14px;font-weight:400;height:34px;margin:0;width:73px}.placementRight{left:-
|
|
1
|
+
.step-wheel-box{font-family:PingFangSC-Medium,PingFang SC;font-size:16px;font-weight:500;height:100%;overflow:hidden;width:100%}.step-wheel-box .stepOut{display:flex;justify-content:center}.step-wheel-box .stepOut .stepItem{float:left;font-family:SimSun;font-size:16px;height:180px;min-width:73px;position:relative;text-align:center;top:48px;width:15%}.step-wheel-box .stepOut .stepItem .lineCircleRight{border-left:0 dashed rgba(3,2,2,.4)!important;border:1px dashed rgba(3,2,2,.4);border-left:0 hidden #fff;border-radius:0 25px 25px 0;display:block;height:100%;left:55%;position:absolute;top:6px;width:30%}.step-wheel-box .stepOut .stepItem .lineCirclePlacementRight{width:100%}.step-wheel-box .stepOut .stepItem .lineCircleLeft{border-color:#fff;border-bottom:1px dashed rgba(3,2,2,.4);border-left:0 hidden #fff;border-radius:25px 0 0 25px;border-right:0 dashed rgba(3,2,2,.4)!important;border-top:1px dashed rgba(3,2,2,.4);display:block;height:100%;left:15%;position:absolute;top:6px;width:30%}.step-wheel-box .stepOut .stepItem .lineCirclePlacementLeft{left:-55%;width:100%}.step-wheel-box .stepOut .stepItem .lineCircleActive{border:1px solid #2563f4}.step-wheel-box .stepOut .stepItem .lineCircleFinished{border:1px solid #5dc055}.step-wheel-box .stepOut .stepItem .icon{background:#969696;border-radius:50%;height:13px;margin:0 auto;position:relative;width:13px;z-index:888}.step-wheel-box .stepOut .stepItem .active{background-color:#2563f4}.step-wheel-box .stepOut .stepItem .finished{background-color:#5dc055!important;border-color:#5dc055!important;color:#fff!important}.step-wheel-box .stepOut .stepItem .labelFinsh{color:#5dc055!important}.step-wheel-box .stepOut .stepItem .line{border-bottom:1px dashed rgba(3,2,2,.4);left:55%;position:absolute;top:6px;width:90%;z-index:111}.step-wheel-box .stepOut .stepItem .lineActive{border-bottom:1px solid #2563f4}.step-wheel-box .stepOut .stepItem .stepTopBox{background:rgba(110,153,255,.11);border-radius:4px;color:#2563f4;cursor:pointer;height:40px;left:50%;line-height:40px;max-width:70%;min-width:73px;overflow:hidden;padding:0 5px;position:absolute;text-overflow:ellipsis;top:-48px;transform:translateX(-50%);white-space:nowrap}.step-wheel-box .stepOut .stepItem .stepTopBox_right{transform:translateX(-10%)}.step-wheel-box .stepOut .stepItem .stepTopBox_left{transform:translateX(-90%)}.step-wheel-box .stepOut .stepItem .stepBottomBox{align-items:center;cursor:pointer;display:flex;flex-direction:column;height:66%;min-width:73px;width:100%}.step-wheel-box .stepOut .stepItem .stepBottomBox .stepBottomCustomBox{align-items:center;display:flex;flex-direction:column;height:100%;padding:8px 0;width:100%}.step-wheel-box .stepOut .stepItem .stepBottomBox .stepBottomCustomBox .stepBottomDefaultBox{align-items:center}.step-wheel-box .stepOut .stepItem .stepBottomBox .stepBottomCustomBox .alignItemsEnd{align-items:flex-end}.step-wheel-box .stepOut .stepItem .stepBottomBox .stepBottomCustomBox .alignItemsStart{align-items:flex-start}.step-wheel-box .stepOut .stepItem .stepBottomBox .alignItemsEnd{align-items:flex-end}.step-wheel-box .stepOut .stepItem .stepBottomBox .alignItemsStart{align-items:flex-start}.step-wheel-box .stepOut .stepItem .stepBottomBox_right{align-items:flex-start;left:45%;position:relative}.step-wheel-box .stepOut .stepItem .stepBottomBox_left{align-items:flex-end;left:-45%;position:relative}.step-wheel-box .stepOut .stepItem .stepLabel{color:#212121;line-height:36px;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}.step-wheel-box .stepOut .stepItem .stepLabel_right{text-align:left}.step-wheel-box .stepOut .stepItem .stepLabel_left{text-align:right}.step-wheel-box .stepOut .stepItem .stepExtra{border:1px solid #cacaca;border-radius:4px;height:26px;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:73px}.step-wheel-box .stepOut .stepItem .statusTime{color:rgba(0,0,0,.6);font-size:14px;font-weight:400;height:34px;margin:0;width:73px}.placementRight{left:-1%;position:relative}.placementLeft{left:10%;position:relative}.nodeTipContent{margin:0;max-height:200px;max-width:400px;overflow:auto;padding:0;text-align:center}.nodeTipContent li{list-style:none;margin-bottom:5px}.nodeTipContent li p{margin:0}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cnhis-design-vue",
|
|
3
|
-
"version": "3.1.27
|
|
3
|
+
"version": "3.1.27",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"module": "./es/components/index.js",
|
|
6
6
|
"main": "./es/components/index.js",
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
"iOS 7",
|
|
62
62
|
"last 3 iOS versions"
|
|
63
63
|
],
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "2e2c86bc9fc88167326d81e1b8f6fa679fd15e2a"
|
|
65
65
|
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import _sfc_main from './SearchTree.vue_vue_type_script_setup_true_lang.js';
|
|
2
|
-
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.js';
|
|
3
|
-
|
|
4
|
-
var SearchTree = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "SearchTree.vue"]]);
|
|
5
|
-
|
|
6
|
-
export { SearchTree as default };
|
|
@@ -1,233 +0,0 @@
|
|
|
1
|
-
import { defineComponent, reactive, computed, watch, withDirectives, openBlock, createElementBlock, createVNode, unref, mergeProps, createElementVNode, createCommentVNode, createBlock, vShow, createTextVNode } from 'vue';
|
|
2
|
-
import { NTree, NSpin, NIcon, NTooltip } from 'naive-ui';
|
|
3
|
-
import { Search } from '@vicons/ionicons5';
|
|
4
|
-
|
|
5
|
-
const _hoisted_1 = {
|
|
6
|
-
class: "search-tree-wrap"
|
|
7
|
-
};
|
|
8
|
-
const _hoisted_2 = {
|
|
9
|
-
style: {
|
|
10
|
-
"text-align": "center"
|
|
11
|
-
}
|
|
12
|
-
};
|
|
13
|
-
const _hoisted_3 = {
|
|
14
|
-
key: 1,
|
|
15
|
-
class: "load-more-btn-wrap"
|
|
16
|
-
};
|
|
17
|
-
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
18
|
-
__name: "SearchTree",
|
|
19
|
-
props: {
|
|
20
|
-
visible: {
|
|
21
|
-
type: Boolean,
|
|
22
|
-
default: false
|
|
23
|
-
},
|
|
24
|
-
searchNoMore: {
|
|
25
|
-
type: Boolean,
|
|
26
|
-
default: false
|
|
27
|
-
},
|
|
28
|
-
loadMorenLoadinng: {
|
|
29
|
-
type: Boolean,
|
|
30
|
-
default: false
|
|
31
|
-
},
|
|
32
|
-
formatTreeData: {
|
|
33
|
-
type: Array,
|
|
34
|
-
default: () => []
|
|
35
|
-
},
|
|
36
|
-
searchValue: {
|
|
37
|
-
type: String
|
|
38
|
-
},
|
|
39
|
-
defaultExpandedKeys: {
|
|
40
|
-
type: Array,
|
|
41
|
-
required: true
|
|
42
|
-
},
|
|
43
|
-
allCheckedKeys: {
|
|
44
|
-
type: Object
|
|
45
|
-
},
|
|
46
|
-
dataListKeys: {
|
|
47
|
-
type: Object
|
|
48
|
-
}
|
|
49
|
-
},
|
|
50
|
-
emits: ["addCheckedkeysMain", "removeCheckedkeysMain", "addCheckedkeysOther", "removeCheckedkeysOther", "searchOnloadMore"],
|
|
51
|
-
setup(__props, {
|
|
52
|
-
expose,
|
|
53
|
-
emit
|
|
54
|
-
}) {
|
|
55
|
-
const props = __props;
|
|
56
|
-
const state = reactive({
|
|
57
|
-
expandedKeys: [],
|
|
58
|
-
autoExpandParent: true,
|
|
59
|
-
checkedKeys: [],
|
|
60
|
-
defaultCheckedKeys: {
|
|
61
|
-
main: [],
|
|
62
|
-
other: []
|
|
63
|
-
}
|
|
64
|
-
});
|
|
65
|
-
const dataLen = computed(() => {
|
|
66
|
-
var _a;
|
|
67
|
-
return ((_a = props.formatTreeData) == null ? void 0 : _a.length) || 0;
|
|
68
|
-
});
|
|
69
|
-
const resetData = () => {
|
|
70
|
-
state.checkedKeys = [];
|
|
71
|
-
state.expandedKeys = [];
|
|
72
|
-
state.autoExpandParent = true;
|
|
73
|
-
state.defaultCheckedKeys.main = [];
|
|
74
|
-
state.defaultCheckedKeys.other = [];
|
|
75
|
-
};
|
|
76
|
-
const emitCheckedkeys = () => {
|
|
77
|
-
emitCheckedkeysMain();
|
|
78
|
-
emitCheckedkeysOther();
|
|
79
|
-
setDefaultCheckedKeys();
|
|
80
|
-
};
|
|
81
|
-
const emitCheckedkeysMain = () => {
|
|
82
|
-
let searchCheckedKeysMain = state.checkedKeys.filter((key) => {
|
|
83
|
-
return props.dataListKeys.main.includes(key);
|
|
84
|
-
});
|
|
85
|
-
let defaultCheckedKeysMain = state.defaultCheckedKeys.main;
|
|
86
|
-
let {
|
|
87
|
-
add,
|
|
88
|
-
remove
|
|
89
|
-
} = calcChangeKeys(defaultCheckedKeysMain, searchCheckedKeysMain);
|
|
90
|
-
emit("addCheckedkeysMain", add);
|
|
91
|
-
emit("removeCheckedkeysMain", remove);
|
|
92
|
-
};
|
|
93
|
-
const emitCheckedkeysOther = () => {
|
|
94
|
-
let searchCheckedKeysOther = state.checkedKeys.filter((key) => {
|
|
95
|
-
return props.dataListKeys.other.includes(key);
|
|
96
|
-
});
|
|
97
|
-
let defaultCheckedKeysOther = state.defaultCheckedKeys.other;
|
|
98
|
-
let {
|
|
99
|
-
add,
|
|
100
|
-
remove
|
|
101
|
-
} = calcChangeKeys(defaultCheckedKeysOther, searchCheckedKeysOther);
|
|
102
|
-
emit("addCheckedkeysOther", add);
|
|
103
|
-
emit("removeCheckedkeysOther", remove);
|
|
104
|
-
};
|
|
105
|
-
const calcChangeKeys = (defaultCheckedKeys, currentCheckedKeys) => {
|
|
106
|
-
let add = [];
|
|
107
|
-
let remove = [];
|
|
108
|
-
currentCheckedKeys.forEach((key) => {
|
|
109
|
-
if (!defaultCheckedKeys.includes(key)) {
|
|
110
|
-
add.push(key);
|
|
111
|
-
}
|
|
112
|
-
});
|
|
113
|
-
defaultCheckedKeys.forEach((key) => {
|
|
114
|
-
if (!currentCheckedKeys.includes(key)) {
|
|
115
|
-
remove.push(key);
|
|
116
|
-
}
|
|
117
|
-
});
|
|
118
|
-
return {
|
|
119
|
-
add,
|
|
120
|
-
remove
|
|
121
|
-
};
|
|
122
|
-
};
|
|
123
|
-
const emptyCheckedKeys = () => {
|
|
124
|
-
state.checkedKeys = [];
|
|
125
|
-
emitCheckedkeys();
|
|
126
|
-
};
|
|
127
|
-
const setDefaultCheckedKeys = () => {
|
|
128
|
-
setDefaultCheckedKeysMain();
|
|
129
|
-
setDefaultCheckedKeysOther();
|
|
130
|
-
setCurrentCheckedKeys();
|
|
131
|
-
};
|
|
132
|
-
const setDefaultCheckedKeysMain = () => {
|
|
133
|
-
state.defaultCheckedKeys.main = props.dataListKeys.main.filter((key) => {
|
|
134
|
-
return props.allCheckedKeys.main.includes(key);
|
|
135
|
-
});
|
|
136
|
-
};
|
|
137
|
-
const setDefaultCheckedKeysOther = () => {
|
|
138
|
-
state.defaultCheckedKeys.other = props.dataListKeys.other.filter((key) => {
|
|
139
|
-
return props.allCheckedKeys.other.includes(key);
|
|
140
|
-
});
|
|
141
|
-
};
|
|
142
|
-
const setCurrentCheckedKeys = () => {
|
|
143
|
-
let {
|
|
144
|
-
main,
|
|
145
|
-
other
|
|
146
|
-
} = state.defaultCheckedKeys;
|
|
147
|
-
let res = [.../* @__PURE__ */ new Set([...main, ...other])];
|
|
148
|
-
state.checkedKeys = res;
|
|
149
|
-
};
|
|
150
|
-
const onCheck = (checkedKeys) => {
|
|
151
|
-
state.checkedKeys = checkedKeys;
|
|
152
|
-
emitCheckedkeys();
|
|
153
|
-
};
|
|
154
|
-
const onExpand = (expandedKeys) => {
|
|
155
|
-
state.expandedKeys = expandedKeys;
|
|
156
|
-
state.autoExpandParent = false;
|
|
157
|
-
};
|
|
158
|
-
const searchOnloadMore = () => {
|
|
159
|
-
emit("searchOnloadMore");
|
|
160
|
-
};
|
|
161
|
-
const renderLabel = ({
|
|
162
|
-
option
|
|
163
|
-
}) => {
|
|
164
|
-
return createVNode("div", {
|
|
165
|
-
"class": "search-tree-item"
|
|
166
|
-
}, [createVNode("div", {
|
|
167
|
-
"class": "info-wrap"
|
|
168
|
-
}, [createVNode(NTooltip, {
|
|
169
|
-
"trigger": "hover"
|
|
170
|
-
}, {
|
|
171
|
-
default: () => `${option.title} ${option.sub_title || ""}`,
|
|
172
|
-
trigger: () => createVNode("p", {
|
|
173
|
-
"class": "info-wrap-top",
|
|
174
|
-
"style": "margin: 0"
|
|
175
|
-
}, [createVNode("span", {
|
|
176
|
-
"class": "info-wrap-title"
|
|
177
|
-
}, [createVNode("span", {
|
|
178
|
-
"class": "c-title"
|
|
179
|
-
}, [option.title]), createTextVNode("\u2009"), createVNode("span", {
|
|
180
|
-
"class": "c-sub-title"
|
|
181
|
-
}, [option.sub_title])])])
|
|
182
|
-
})])]);
|
|
183
|
-
};
|
|
184
|
-
watch(() => props.defaultExpandedKeys, (val) => {
|
|
185
|
-
state.expandedKeys = val;
|
|
186
|
-
}, {
|
|
187
|
-
immediate: true,
|
|
188
|
-
deep: true
|
|
189
|
-
});
|
|
190
|
-
watch(() => props.visible, (val) => {
|
|
191
|
-
if (!val) {
|
|
192
|
-
resetData();
|
|
193
|
-
return;
|
|
194
|
-
}
|
|
195
|
-
setDefaultCheckedKeys();
|
|
196
|
-
});
|
|
197
|
-
watch(() => dataLen, (val) => {
|
|
198
|
-
if (val.value > 0) {
|
|
199
|
-
setDefaultCheckedKeys();
|
|
200
|
-
}
|
|
201
|
-
});
|
|
202
|
-
expose({
|
|
203
|
-
setDefaultCheckedKeys,
|
|
204
|
-
checkedKeys: state.checkedKeys,
|
|
205
|
-
emptyCheckedKeys
|
|
206
|
-
});
|
|
207
|
-
return (_ctx, _cache) => {
|
|
208
|
-
return withDirectives((openBlock(), createElementBlock("div", _hoisted_1, [createVNode(unref(NTree), mergeProps(_ctx.$attrs, {
|
|
209
|
-
ref: "searchTree",
|
|
210
|
-
"onUpdate:expandedKeys": onExpand,
|
|
211
|
-
"onUpdate:checkedKeys": onCheck,
|
|
212
|
-
checkable: "",
|
|
213
|
-
cascade: "",
|
|
214
|
-
"check-strategy": "all",
|
|
215
|
-
selectable: false,
|
|
216
|
-
"checked-keys": state.checkedKeys,
|
|
217
|
-
"expanded-keys": state.expandedKeys,
|
|
218
|
-
data: __props.formatTreeData,
|
|
219
|
-
"render-label": renderLabel
|
|
220
|
-
}), null, 16, ["checked-keys", "expanded-keys", "data"]), withDirectives(createElementVNode("div", _hoisted_2, [createCommentVNode(" loadMorenLoadinng "), __props.loadMorenLoadinng ? (openBlock(), createBlock(unref(NSpin), {
|
|
221
|
-
key: 0
|
|
222
|
-
})) : (openBlock(), createElementBlock("div", _hoisted_3, [createVNode(unref(NIcon), {
|
|
223
|
-
component: unref(Search),
|
|
224
|
-
class: "search-input-icon"
|
|
225
|
-
}, null, 8, ["component"]), createElementVNode("div", {
|
|
226
|
-
class: "load-more-btn",
|
|
227
|
-
onClick: searchOnloadMore
|
|
228
|
-
}, "\u52A0\u8F7D\u66F4\u591A")]))], 512), [[vShow, !__props.searchNoMore]])], 512)), [[vShow, __props.visible]]);
|
|
229
|
-
};
|
|
230
|
-
}
|
|
231
|
-
});
|
|
232
|
-
|
|
233
|
-
export { _sfc_main as default };
|