szld-libs 0.2.19 → 0.2.20
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/dist/szld-components.es.js +1 -1
- package/dist/szld-components.umd.js +28 -28
- package/es/components/CoralButton/index.d.ts +1 -1
- package/es/components/CoralButton/index.js +7 -1
- package/lib/components/CoralButton/index.d.ts +1 -1
- package/lib/components/CoralButton/index.js +7 -1
- package/package.json +1 -1
|
@@ -4,7 +4,13 @@ import AuthButton from "../AuthButton";
|
|
|
4
4
|
const CoralButton = (props) => {
|
|
5
5
|
const { PId, auths, ...rest } = props;
|
|
6
6
|
const auth = useMemo(() => {
|
|
7
|
-
if (auths
|
|
7
|
+
if (!auths) {
|
|
8
|
+
return false;
|
|
9
|
+
}
|
|
10
|
+
if (typeof PId === "number" && auths.find((v) => v.PId === PId)) {
|
|
11
|
+
return true;
|
|
12
|
+
}
|
|
13
|
+
if (Array.isArray(PId) && auths.filter((v) => PId.includes(v.PId)).length > 0) {
|
|
8
14
|
return true;
|
|
9
15
|
}
|
|
10
16
|
return false;
|
|
@@ -5,7 +5,13 @@ const AuthButton = require("../AuthButton");
|
|
|
5
5
|
const CoralButton = (props) => {
|
|
6
6
|
const { PId, auths, ...rest } = props;
|
|
7
7
|
const auth = react.useMemo(() => {
|
|
8
|
-
if (auths
|
|
8
|
+
if (!auths) {
|
|
9
|
+
return false;
|
|
10
|
+
}
|
|
11
|
+
if (typeof PId === "number" && auths.find((v) => v.PId === PId)) {
|
|
12
|
+
return true;
|
|
13
|
+
}
|
|
14
|
+
if (Array.isArray(PId) && auths.filter((v) => PId.includes(v.PId)).length > 0) {
|
|
9
15
|
return true;
|
|
10
16
|
}
|
|
11
17
|
return false;
|