szld-libs 0.0.27 → 0.0.29

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.
@@ -5,6 +5,7 @@ interface BackHeaderProps {
5
5
  subTitle?: string | ReactNode;
6
6
  extra?: ReactNode;
7
7
  className?: string;
8
+ style?: CSSProperties;
8
9
  titleStyle?: CSSProperties;
9
10
  }
10
11
  declare const BackHeader: (props: BackHeaderProps) => JSX.Element;
@@ -19,6 +19,7 @@ const BackHeader = (props) => {
19
19
  extra,
20
20
  subTitle = null,
21
21
  className,
22
+ style,
22
23
  titleStyle
23
24
  } = props;
24
25
  const navigate = useNavigate();
@@ -31,24 +32,16 @@ const BackHeader = (props) => {
31
32
  const goBack = () => {
32
33
  navigate(-1);
33
34
  };
34
- return /* @__PURE__ */ jsxs(
35
- "div",
36
- {
37
- className: classNames(styles.main, {
38
- className
39
- }),
40
- children: [
41
- /* @__PURE__ */ jsxs(Space, { children: [
42
- isBack && /* @__PURE__ */ jsx(ArrowLeftOutlined, { style: { fontSize: 24 }, onClick: goBack }),
43
- /* @__PURE__ */ jsxs(Title, { level: 2, className: styles.title, style: titleStyle, children: [
44
- title2,
45
- renderSubtitle()
46
- ] })
47
- ] }),
48
- extra
49
- ]
50
- }
51
- );
35
+ return /* @__PURE__ */ jsxs("div", { className: classNames(styles.main, className), style, children: [
36
+ /* @__PURE__ */ jsxs(Space, { children: [
37
+ isBack && /* @__PURE__ */ jsx(ArrowLeftOutlined, { style: { fontSize: 24 }, onClick: goBack }),
38
+ /* @__PURE__ */ jsxs(Title, { level: 2, className: styles.title, style: titleStyle, children: [
39
+ title2,
40
+ renderSubtitle()
41
+ ] })
42
+ ] }),
43
+ extra
44
+ ] });
52
45
  };
53
46
  export {
54
47
  BackHeader as default
@@ -7,8 +7,9 @@ import React, { ReactElement, ReactNode } from "react";
7
7
  import { UploadFileProps } from "../Upload";
8
8
  export type ValueType = "rangePicker" | "select" | "input" | "password" | "textarea" | "radio" | "inputNumber" | "switch" | "checkbox" | "timePicker" | "datePicker" | "cascader" | "upload" | "modal" | "rate" | "custom" | "btns";
9
9
  interface ValueBtnProps extends ButtonProps {
10
- title: string;
11
- btnType: "submit" | "reset" | "cancel";
10
+ title?: string;
11
+ btnType?: "submit" | "reset" | "cancel";
12
+ key?: React.Key;
12
13
  }
13
14
  interface ValueModalProps {
14
15
  onClear?: () => void;
@@ -207,12 +207,12 @@ const FormFields = (props) => {
207
207
  {
208
208
  type: item.btnType === "submit" ? "primary" : "default",
209
209
  ..._.omit(item, ["btnType"]),
210
- key: item.btnType,
210
+ key: item.key || item.btnType,
211
211
  onClick: (e) => {
212
212
  onBtnClick == null ? void 0 : onBtnClick(e, item);
213
213
  }
214
214
  },
215
- item.title
215
+ item.title || item.children
216
216
  )) });
217
217
  break;
218
218
  }
@@ -5,6 +5,7 @@ interface BackHeaderProps {
5
5
  subTitle?: string | ReactNode;
6
6
  extra?: ReactNode;
7
7
  className?: string;
8
+ style?: CSSProperties;
8
9
  titleStyle?: CSSProperties;
9
10
  }
10
11
  declare const BackHeader: (props: BackHeaderProps) => JSX.Element;
@@ -20,6 +20,7 @@ const BackHeader = (props) => {
20
20
  extra,
21
21
  subTitle = null,
22
22
  className,
23
+ style,
23
24
  titleStyle
24
25
  } = props;
25
26
  const navigate = reactRouterDom.useNavigate();
@@ -32,23 +33,15 @@ const BackHeader = (props) => {
32
33
  const goBack = () => {
33
34
  navigate(-1);
34
35
  };
35
- return /* @__PURE__ */ jsxRuntime.jsxs(
36
- "div",
37
- {
38
- className: classNames(styles.main, {
39
- className
40
- }),
41
- children: [
42
- /* @__PURE__ */ jsxRuntime.jsxs(antd.Space, { children: [
43
- isBack && /* @__PURE__ */ jsxRuntime.jsx(icons.ArrowLeftOutlined, { style: { fontSize: 24 }, onClick: goBack }),
44
- /* @__PURE__ */ jsxRuntime.jsxs(Title, { level: 2, className: styles.title, style: titleStyle, children: [
45
- title2,
46
- renderSubtitle()
47
- ] })
48
- ] }),
49
- extra
50
- ]
51
- }
52
- );
36
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: classNames(styles.main, className), style, children: [
37
+ /* @__PURE__ */ jsxRuntime.jsxs(antd.Space, { children: [
38
+ isBack && /* @__PURE__ */ jsxRuntime.jsx(icons.ArrowLeftOutlined, { style: { fontSize: 24 }, onClick: goBack }),
39
+ /* @__PURE__ */ jsxRuntime.jsxs(Title, { level: 2, className: styles.title, style: titleStyle, children: [
40
+ title2,
41
+ renderSubtitle()
42
+ ] })
43
+ ] }),
44
+ extra
45
+ ] });
53
46
  };
54
47
  module.exports = BackHeader;
@@ -7,8 +7,9 @@ import React, { ReactElement, ReactNode } from "react";
7
7
  import { UploadFileProps } from "../Upload";
8
8
  export type ValueType = "rangePicker" | "select" | "input" | "password" | "textarea" | "radio" | "inputNumber" | "switch" | "checkbox" | "timePicker" | "datePicker" | "cascader" | "upload" | "modal" | "rate" | "custom" | "btns";
9
9
  interface ValueBtnProps extends ButtonProps {
10
- title: string;
11
- btnType: "submit" | "reset" | "cancel";
10
+ title?: string;
11
+ btnType?: "submit" | "reset" | "cancel";
12
+ key?: React.Key;
12
13
  }
13
14
  interface ValueModalProps {
14
15
  onClear?: () => void;
@@ -209,12 +209,12 @@ const FormFields = (props) => {
209
209
  {
210
210
  type: item.btnType === "submit" ? "primary" : "default",
211
211
  ..._.omit(item, ["btnType"]),
212
- key: item.btnType,
212
+ key: item.key || item.btnType,
213
213
  onClick: (e) => {
214
214
  onBtnClick == null ? void 0 : onBtnClick(e, item);
215
215
  }
216
216
  },
217
- item.title
217
+ item.title || item.children
218
218
  )) });
219
219
  break;
220
220
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "szld-libs",
3
3
  "private": false,
4
- "version": "0.0.27",
4
+ "version": "0.0.29",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite",