cnhis-design-vue 3.1.30-beta.1 → 3.1.30-beta.3
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.
|
@@ -93,7 +93,6 @@ declare const SelectPerson: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
93
93
|
}>> & {
|
|
94
94
|
onCheck?: ((...args: any[]) => any) | undefined;
|
|
95
95
|
}>>;
|
|
96
|
-
$message: import("naive-ui").MessageApi;
|
|
97
96
|
emit: (event: "check", ...args: any[]) => void;
|
|
98
97
|
keyword: import("vue").Ref<string>;
|
|
99
98
|
checkedAll: import("vue").Ref<boolean>;
|
|
@@ -106,6 +105,7 @@ declare const SelectPerson: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
106
105
|
isRemote: import("vue").ComputedRef<boolean>;
|
|
107
106
|
init: () => void;
|
|
108
107
|
transformTree: (tree: any) => void;
|
|
108
|
+
setDisabled: (data: any) => void;
|
|
109
109
|
renderLabel: ({ option }: {
|
|
110
110
|
option: any;
|
|
111
111
|
}) => any;
|
|
@@ -92,7 +92,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
92
92
|
}>> & {
|
|
93
93
|
onCheck?: ((...args: any[]) => any) | undefined;
|
|
94
94
|
}>>;
|
|
95
|
-
$message: import("naive-ui").MessageApi;
|
|
96
95
|
emit: (event: "check", ...args: any[]) => void;
|
|
97
96
|
keyword: import("vue").Ref<string>;
|
|
98
97
|
checkedAll: import("vue").Ref<boolean>;
|
|
@@ -105,6 +104,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
105
104
|
isRemote: import("vue").ComputedRef<boolean>;
|
|
106
105
|
init: () => void;
|
|
107
106
|
transformTree: (tree: any) => void;
|
|
107
|
+
setDisabled: (data: any) => void;
|
|
108
108
|
renderLabel: ({ option }: {
|
|
109
109
|
option: any;
|
|
110
110
|
}) => any;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent, ref, computed, watch, openBlock, createBlock, unref, withCtx, createVNode, withKeys, createTextVNode, toDisplayString, createCommentVNode, createElementBlock, createElementVNode, Fragment, renderList } from 'vue';
|
|
2
|
-
import {
|
|
2
|
+
import { NGrid, NGi, NSpace, NInputGroup, NInput, NButton, NCheckbox, NTree, NIcon, NTooltip } from 'naive-ui';
|
|
3
3
|
import { CloseCircleSharp } from '@vicons/ionicons5';
|
|
4
4
|
import { filterTree } from './utils/index.js';
|
|
5
5
|
import { cloneDeep } from 'lodash-es';
|
|
@@ -66,7 +66,6 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
66
66
|
emit
|
|
67
67
|
}) {
|
|
68
68
|
const props = __props;
|
|
69
|
-
useMessage();
|
|
70
69
|
const keyword = ref("");
|
|
71
70
|
const checkedAll = ref(false);
|
|
72
71
|
const checkedKeys = ref([]);
|
|
@@ -98,6 +97,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
98
97
|
item.key = item[props.wordbookChild.user_id_obj] || item[props.wordbook.parent_id_obj] || Date.now();
|
|
99
98
|
if ((_a = item.children) == null ? void 0 : _a.length) {
|
|
100
99
|
transformTree(item.children);
|
|
100
|
+
setDisabled(item);
|
|
101
101
|
} else if (((_b = item.children) == null ? void 0 : _b.length) === 0) {
|
|
102
102
|
Reflect.deleteProperty(item, "children");
|
|
103
103
|
}
|
|
@@ -105,20 +105,27 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
105
105
|
allCheckedKeys.push(item.key);
|
|
106
106
|
});
|
|
107
107
|
}
|
|
108
|
+
function setDisabled(data) {
|
|
109
|
+
var _a;
|
|
110
|
+
const isDisabled = (_a = data.children) == null ? void 0 : _a.every((item) => item.disabled);
|
|
111
|
+
if (isDisabled)
|
|
112
|
+
data.disabled = true;
|
|
113
|
+
}
|
|
108
114
|
function renderLabel({
|
|
109
115
|
option
|
|
110
116
|
}) {
|
|
111
117
|
var _a;
|
|
112
|
-
if (
|
|
118
|
+
if (((_a = option.children) == null ? void 0 : _a.length) || isRemote.value && !(option == null ? void 0 : option.isLeaf)) {
|
|
119
|
+
const count = props.wordbook.user_count_obj ? option[props.wordbook.user_count_obj] || "" : "";
|
|
120
|
+
const countText = count ? `(${count})` : "";
|
|
121
|
+
return createVNode("span", null, [`${option.title}${countText}`]);
|
|
122
|
+
} else {
|
|
113
123
|
return createVNode(NTooltip, {
|
|
114
124
|
"trigger": "hover"
|
|
115
125
|
}, {
|
|
116
126
|
default: () => createVNode("span", null, [option.title]),
|
|
117
127
|
trigger: () => createVNode("span", null, [option.title])
|
|
118
128
|
});
|
|
119
|
-
} else {
|
|
120
|
-
const count = props.wordbook.user_count_obj ? option[props.wordbook.user_count_obj] || "" : "";
|
|
121
|
-
return createVNode("span", null, [`${option.title}${count}`]);
|
|
122
129
|
}
|
|
123
130
|
}
|
|
124
131
|
function getLabelName(option) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cnhis-design-vue",
|
|
3
|
-
"version": "3.1.30-beta.
|
|
3
|
+
"version": "3.1.30-beta.3",
|
|
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": "215b392e8f416d489da1eaf2222c986c1e229533"
|
|
65
65
|
}
|