@faasjs/ant-design 0.0.3-beta.101 → 0.0.3-beta.103
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/index.js +16 -26
- package/dist/index.mjs +16 -26
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -865,26 +865,16 @@ function Link(props) {
|
|
|
865
865
|
var _a, _b;
|
|
866
866
|
const { Link: Config } = useConfigContext();
|
|
867
867
|
const navigate = reactRouterDom.useNavigate();
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
width: "100%"
|
|
879
|
-
}, computedStyle);
|
|
880
|
-
setStyle(computedStyle);
|
|
881
|
-
}, [
|
|
882
|
-
props.style,
|
|
883
|
-
props.block,
|
|
884
|
-
Config.style
|
|
885
|
-
]);
|
|
886
|
-
if (!style)
|
|
887
|
-
return null;
|
|
868
|
+
let computedStyle = {
|
|
869
|
+
...Config.style || {},
|
|
870
|
+
cursor: "pointer",
|
|
871
|
+
...props.style
|
|
872
|
+
};
|
|
873
|
+
if (props.block)
|
|
874
|
+
computedStyle = Object.assign({
|
|
875
|
+
display: "block",
|
|
876
|
+
width: "100%"
|
|
877
|
+
}, computedStyle);
|
|
888
878
|
if (props.href.startsWith("http")) {
|
|
889
879
|
if (props.button)
|
|
890
880
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -892,7 +882,7 @@ function Link(props) {
|
|
|
892
882
|
{
|
|
893
883
|
...props.button,
|
|
894
884
|
target: props.target || (Config == null ? void 0 : Config.target) || "_blank",
|
|
895
|
-
style,
|
|
885
|
+
style: computedStyle,
|
|
896
886
|
href: props.href,
|
|
897
887
|
children: (_a = props.text) != null ? _a : props.children
|
|
898
888
|
}
|
|
@@ -903,7 +893,7 @@ function Link(props) {
|
|
|
903
893
|
{
|
|
904
894
|
href: props.href,
|
|
905
895
|
target: props.target || (Config == null ? void 0 : Config.target),
|
|
906
|
-
style,
|
|
896
|
+
style: computedStyle,
|
|
907
897
|
children: props.children
|
|
908
898
|
}
|
|
909
899
|
);
|
|
@@ -912,7 +902,7 @@ function Link(props) {
|
|
|
912
902
|
{
|
|
913
903
|
href: props.href,
|
|
914
904
|
target: props.target || (Config == null ? void 0 : Config.target) || "_blank",
|
|
915
|
-
style,
|
|
905
|
+
style: computedStyle,
|
|
916
906
|
copyable: props.copyable,
|
|
917
907
|
children: props.text
|
|
918
908
|
}
|
|
@@ -923,7 +913,7 @@ function Link(props) {
|
|
|
923
913
|
antd.Button,
|
|
924
914
|
{
|
|
925
915
|
...props.button,
|
|
926
|
-
style,
|
|
916
|
+
style: computedStyle,
|
|
927
917
|
onClick: () => (props.target || (Config == null ? void 0 : Config.target)) === "_blank" ? window.open(props.href) : navigate(props.href),
|
|
928
918
|
children: (_b = props.text) != null ? _b : props.children
|
|
929
919
|
}
|
|
@@ -934,7 +924,7 @@ function Link(props) {
|
|
|
934
924
|
{
|
|
935
925
|
to: props.href,
|
|
936
926
|
target: props.target || (Config == null ? void 0 : Config.target),
|
|
937
|
-
style,
|
|
927
|
+
style: computedStyle,
|
|
938
928
|
children: props.children
|
|
939
929
|
}
|
|
940
930
|
);
|
|
@@ -943,7 +933,7 @@ function Link(props) {
|
|
|
943
933
|
{
|
|
944
934
|
href: props.href,
|
|
945
935
|
target: props.target || (Config == null ? void 0 : Config.target),
|
|
946
|
-
style,
|
|
936
|
+
style: computedStyle,
|
|
947
937
|
copyable: props.copyable,
|
|
948
938
|
onClick: (e) => {
|
|
949
939
|
if ((props.target || (Config == null ? void 0 : Config.target)) !== "_blank") {
|
package/dist/index.mjs
CHANGED
|
@@ -862,26 +862,16 @@ function Link(props) {
|
|
|
862
862
|
var _a, _b;
|
|
863
863
|
const { Link: Config } = useConfigContext();
|
|
864
864
|
const navigate = useNavigate();
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
width: "100%"
|
|
876
|
-
}, computedStyle);
|
|
877
|
-
setStyle(computedStyle);
|
|
878
|
-
}, [
|
|
879
|
-
props.style,
|
|
880
|
-
props.block,
|
|
881
|
-
Config.style
|
|
882
|
-
]);
|
|
883
|
-
if (!style)
|
|
884
|
-
return null;
|
|
865
|
+
let computedStyle = {
|
|
866
|
+
...Config.style || {},
|
|
867
|
+
cursor: "pointer",
|
|
868
|
+
...props.style
|
|
869
|
+
};
|
|
870
|
+
if (props.block)
|
|
871
|
+
computedStyle = Object.assign({
|
|
872
|
+
display: "block",
|
|
873
|
+
width: "100%"
|
|
874
|
+
}, computedStyle);
|
|
885
875
|
if (props.href.startsWith("http")) {
|
|
886
876
|
if (props.button)
|
|
887
877
|
return /* @__PURE__ */ jsx(
|
|
@@ -889,7 +879,7 @@ function Link(props) {
|
|
|
889
879
|
{
|
|
890
880
|
...props.button,
|
|
891
881
|
target: props.target || (Config == null ? void 0 : Config.target) || "_blank",
|
|
892
|
-
style,
|
|
882
|
+
style: computedStyle,
|
|
893
883
|
href: props.href,
|
|
894
884
|
children: (_a = props.text) != null ? _a : props.children
|
|
895
885
|
}
|
|
@@ -900,7 +890,7 @@ function Link(props) {
|
|
|
900
890
|
{
|
|
901
891
|
href: props.href,
|
|
902
892
|
target: props.target || (Config == null ? void 0 : Config.target),
|
|
903
|
-
style,
|
|
893
|
+
style: computedStyle,
|
|
904
894
|
children: props.children
|
|
905
895
|
}
|
|
906
896
|
);
|
|
@@ -909,7 +899,7 @@ function Link(props) {
|
|
|
909
899
|
{
|
|
910
900
|
href: props.href,
|
|
911
901
|
target: props.target || (Config == null ? void 0 : Config.target) || "_blank",
|
|
912
|
-
style,
|
|
902
|
+
style: computedStyle,
|
|
913
903
|
copyable: props.copyable,
|
|
914
904
|
children: props.text
|
|
915
905
|
}
|
|
@@ -920,7 +910,7 @@ function Link(props) {
|
|
|
920
910
|
Button,
|
|
921
911
|
{
|
|
922
912
|
...props.button,
|
|
923
|
-
style,
|
|
913
|
+
style: computedStyle,
|
|
924
914
|
onClick: () => (props.target || (Config == null ? void 0 : Config.target)) === "_blank" ? window.open(props.href) : navigate(props.href),
|
|
925
915
|
children: (_b = props.text) != null ? _b : props.children
|
|
926
916
|
}
|
|
@@ -931,7 +921,7 @@ function Link(props) {
|
|
|
931
921
|
{
|
|
932
922
|
to: props.href,
|
|
933
923
|
target: props.target || (Config == null ? void 0 : Config.target),
|
|
934
|
-
style,
|
|
924
|
+
style: computedStyle,
|
|
935
925
|
children: props.children
|
|
936
926
|
}
|
|
937
927
|
);
|
|
@@ -940,7 +930,7 @@ function Link(props) {
|
|
|
940
930
|
{
|
|
941
931
|
href: props.href,
|
|
942
932
|
target: props.target || (Config == null ? void 0 : Config.target),
|
|
943
|
-
style,
|
|
933
|
+
style: computedStyle,
|
|
944
934
|
copyable: props.copyable,
|
|
945
935
|
onClick: (e) => {
|
|
946
936
|
if ((props.target || (Config == null ? void 0 : Config.target)) !== "_blank") {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@faasjs/ant-design",
|
|
3
|
-
"version": "0.0.3-beta.
|
|
3
|
+
"version": "0.0.3-beta.103",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"dist"
|
|
23
23
|
],
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@faasjs/react": "0.0.3-beta.
|
|
25
|
+
"@faasjs/react": "0.0.3-beta.103",
|
|
26
26
|
"@ant-design/icons": "*",
|
|
27
27
|
"lodash-es": "*",
|
|
28
28
|
"dayjs": "*"
|