iv-npm 1.0.49 → 1.1.2
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/package.json +1 -1
- package/packages/shared/dist/utils/index.d.ts +6 -2
- package/packages/shared/dist/utils/index.mjs +2 -0
- package/packages/ui/README.md +43 -0
- package/packages/ui/dist/index.cjs.js +953 -3
- package/packages/ui/dist/index.esm.js +946 -3
- package/packages/ui/dist/index.umd.js +957 -3
- package/packages/ui/dist/index.umd.js.map +1 -1
package/package.json
CHANGED
|
@@ -21,7 +21,11 @@ declare function findTree<T extends {
|
|
|
21
21
|
/**
|
|
22
22
|
* 检查对象是否为普通对象(使用“{}”或“new Object”创建)
|
|
23
23
|
* */
|
|
24
|
-
declare function isPlainObject(obj: object): boolean;
|
|
24
|
+
declare function isPlainObject(obj: object): boolean;
|
|
25
|
+
/**
|
|
26
|
+
* 是否是一个对象
|
|
27
|
+
* */
|
|
28
|
+
declare const isObject: (val: unknown) => val is Record<any, any>;
|
|
25
29
|
|
|
26
30
|
declare const assign: {
|
|
27
31
|
<T extends {}, U>(target: T, source: U): T & U;
|
|
@@ -30,4 +34,4 @@ declare const assign: {
|
|
|
30
34
|
(target: object, ...sources: any[]): any;
|
|
31
35
|
};
|
|
32
36
|
|
|
33
|
-
export { arrToTree, assign, findTree, isPlainObject, tranListToTreeData };
|
|
37
|
+
export { arrToTree, assign, findTree, isObject, isPlainObject, tranListToTreeData };
|
|
@@ -58,6 +58,7 @@ function isPlainObject(obj) {
|
|
|
58
58
|
Ctor = {}.hasOwnProperty.call(proto, "constructor") && proto.constructor;
|
|
59
59
|
return typeof Ctor === "function" && {}.hasOwnProperty.toString.call(Ctor) === {}.hasOwnProperty.toString.call(Object);
|
|
60
60
|
}
|
|
61
|
+
var isObject = (val) => val !== null && typeof val === "object";
|
|
61
62
|
|
|
62
63
|
// utils/obj/cache.ts
|
|
63
64
|
var assign = Object.assign;
|
|
@@ -65,6 +66,7 @@ export {
|
|
|
65
66
|
arrToTree,
|
|
66
67
|
assign,
|
|
67
68
|
findTree,
|
|
69
|
+
isObject,
|
|
68
70
|
isPlainObject,
|
|
69
71
|
tranListToTreeData
|
|
70
72
|
};
|
package/packages/ui/README.md
CHANGED
|
@@ -24,3 +24,46 @@ app.use(ivUi)
|
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
|
|
27
|
+
## 组织架构/部门下拉
|
|
28
|
+
|
|
29
|
+
- 组件API
|
|
30
|
+
|
|
31
|
+
```js
|
|
32
|
+
{
|
|
33
|
+
method: "GET",
|
|
34
|
+
url:'/api/identity/users/allOrganizationByUser',
|
|
35
|
+
params:{type:1},
|
|
36
|
+
}
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
- 示例
|
|
43
|
+
|
|
44
|
+
```vue
|
|
45
|
+
<template>
|
|
46
|
+
<IVMrpOrgDropdown
|
|
47
|
+
v-model:value="Detail.organizationId"
|
|
48
|
+
:params="{type:1}"
|
|
49
|
+
:data="{name:123}"
|
|
50
|
+
:replaceFields="{
|
|
51
|
+
children: "children",
|
|
52
|
+
label: "displayName",
|
|
53
|
+
key: "id",
|
|
54
|
+
value: "id",
|
|
55
|
+
}"
|
|
56
|
+
/>
|
|
57
|
+
</template>
|
|
58
|
+
<script setup lang="ts">
|
|
59
|
+
import { IVMrpOrgDropdown } from "iv-npm/packages/ui";
|
|
60
|
+
</script>
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
| props | describe | type |
|
|
64
|
+
| ------------- | ------------------------------ | ------------- |
|
|
65
|
+
| v-model:value | 绑定值 | any |
|
|
66
|
+
| params | GET请求参数(响应式,值改变会触发接口) | object |
|
|
67
|
+
| data | POST请求参数(响应式,值改变会触发接口) | object |
|
|
68
|
+
| replaceFields | 指定value,key,label, children字段名 | ReplaceFields |
|
|
69
|
+
|