@faasjs/ant-design 0.0.3-beta.33 → 0.0.3-beta.34
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 +7 -19
- package/dist/index.mjs +7 -19
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -963,31 +963,25 @@ var import_jsx_runtime = require("react/jsx-runtime");
|
|
|
963
963
|
function Link(props) {
|
|
964
964
|
var _a, _b, _c, _d;
|
|
965
965
|
const { Link: Link2 } = useConfigContext();
|
|
966
|
-
|
|
966
|
+
let style = Object.assign(Link2.style || {}, { cursor: "pointer" }, props.style || {});
|
|
967
967
|
if (props.block)
|
|
968
|
-
|
|
968
|
+
style = Object.assign({
|
|
969
969
|
display: "block",
|
|
970
970
|
width: "100%"
|
|
971
|
-
},
|
|
971
|
+
}, style);
|
|
972
972
|
if (props.href.startsWith("http")) {
|
|
973
973
|
if (props.button)
|
|
974
974
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd8.Button, {
|
|
975
975
|
...props.button,
|
|
976
976
|
target: props.target || (Link2 == null ? void 0 : Link2.target) || "_blank",
|
|
977
|
-
style
|
|
978
|
-
...Link2.style,
|
|
979
|
-
...props.style || {}
|
|
980
|
-
},
|
|
977
|
+
style,
|
|
981
978
|
href: props.href,
|
|
982
979
|
children: (_a = props.text) != null ? _a : props.children
|
|
983
980
|
});
|
|
984
981
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("a", {
|
|
985
982
|
href: props.href,
|
|
986
983
|
target: props.target || (Link2 == null ? void 0 : Link2.target) || "_blank",
|
|
987
|
-
style
|
|
988
|
-
...Link2.style,
|
|
989
|
-
...props.style || {}
|
|
990
|
-
},
|
|
984
|
+
style,
|
|
991
985
|
children: (_b = props.text) != null ? _b : props.children
|
|
992
986
|
});
|
|
993
987
|
}
|
|
@@ -997,20 +991,14 @@ function Link(props) {
|
|
|
997
991
|
target: props.target || (Link2 == null ? void 0 : Link2.target),
|
|
998
992
|
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd8.Button, {
|
|
999
993
|
...props.button,
|
|
1000
|
-
style
|
|
1001
|
-
...Link2.style,
|
|
1002
|
-
...props.style || {}
|
|
1003
|
-
},
|
|
994
|
+
style,
|
|
1004
995
|
children: (_c = props.text) != null ? _c : props.children
|
|
1005
996
|
})
|
|
1006
997
|
});
|
|
1007
998
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_router_dom.Link, {
|
|
1008
999
|
to: props.href,
|
|
1009
1000
|
target: props.target || (Link2 == null ? void 0 : Link2.target),
|
|
1010
|
-
style
|
|
1011
|
-
...Link2.style,
|
|
1012
|
-
...props.style || {}
|
|
1013
|
-
},
|
|
1001
|
+
style,
|
|
1014
1002
|
children: (_d = props.text) != null ? _d : props.children
|
|
1015
1003
|
});
|
|
1016
1004
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -946,31 +946,25 @@ import { jsx as jsx10 } from "react/jsx-runtime";
|
|
|
946
946
|
function Link(props) {
|
|
947
947
|
var _a, _b, _c, _d;
|
|
948
948
|
const { Link: Link2 } = useConfigContext();
|
|
949
|
-
|
|
949
|
+
let style = Object.assign(Link2.style || {}, { cursor: "pointer" }, props.style || {});
|
|
950
950
|
if (props.block)
|
|
951
|
-
|
|
951
|
+
style = Object.assign({
|
|
952
952
|
display: "block",
|
|
953
953
|
width: "100%"
|
|
954
|
-
},
|
|
954
|
+
}, style);
|
|
955
955
|
if (props.href.startsWith("http")) {
|
|
956
956
|
if (props.button)
|
|
957
957
|
return /* @__PURE__ */ jsx10(Button3, {
|
|
958
958
|
...props.button,
|
|
959
959
|
target: props.target || (Link2 == null ? void 0 : Link2.target) || "_blank",
|
|
960
|
-
style
|
|
961
|
-
...Link2.style,
|
|
962
|
-
...props.style || {}
|
|
963
|
-
},
|
|
960
|
+
style,
|
|
964
961
|
href: props.href,
|
|
965
962
|
children: (_a = props.text) != null ? _a : props.children
|
|
966
963
|
});
|
|
967
964
|
return /* @__PURE__ */ jsx10("a", {
|
|
968
965
|
href: props.href,
|
|
969
966
|
target: props.target || (Link2 == null ? void 0 : Link2.target) || "_blank",
|
|
970
|
-
style
|
|
971
|
-
...Link2.style,
|
|
972
|
-
...props.style || {}
|
|
973
|
-
},
|
|
967
|
+
style,
|
|
974
968
|
children: (_b = props.text) != null ? _b : props.children
|
|
975
969
|
});
|
|
976
970
|
}
|
|
@@ -980,20 +974,14 @@ function Link(props) {
|
|
|
980
974
|
target: props.target || (Link2 == null ? void 0 : Link2.target),
|
|
981
975
|
children: /* @__PURE__ */ jsx10(Button3, {
|
|
982
976
|
...props.button,
|
|
983
|
-
style
|
|
984
|
-
...Link2.style,
|
|
985
|
-
...props.style || {}
|
|
986
|
-
},
|
|
977
|
+
style,
|
|
987
978
|
children: (_c = props.text) != null ? _c : props.children
|
|
988
979
|
})
|
|
989
980
|
});
|
|
990
981
|
return /* @__PURE__ */ jsx10(RouterLink, {
|
|
991
982
|
to: props.href,
|
|
992
983
|
target: props.target || (Link2 == null ? void 0 : Link2.target),
|
|
993
|
-
style
|
|
994
|
-
...Link2.style,
|
|
995
|
-
...props.style || {}
|
|
996
|
-
},
|
|
984
|
+
style,
|
|
997
985
|
children: (_d = props.text) != null ? _d : props.children
|
|
998
986
|
});
|
|
999
987
|
}
|
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.34",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"lodash-es": "*",
|
|
29
29
|
"react": "*",
|
|
30
30
|
"react-dom": "*",
|
|
31
|
-
"@faasjs/react": "^0.0.3-beta.
|
|
31
|
+
"@faasjs/react": "^0.0.3-beta.34",
|
|
32
32
|
"react-router-dom": "*",
|
|
33
33
|
"dayjs": "*"
|
|
34
34
|
},
|