listpage-next 0.0.161 → 0.0.162

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.
@@ -11,7 +11,6 @@ const Demo12 = ()=>{
11
11
  background: 'lightblue'
12
12
  },
13
13
  children: /*#__PURE__*/ jsx(ChatSplitter, {
14
- pure: pure,
15
14
  left: {
16
15
  title: '详情',
17
16
  body: /*#__PURE__*/ jsx(Fragment, {
@@ -1,16 +1,17 @@
1
1
  import { CardProps } from 'antd';
2
2
  import type { ReactNode } from 'react';
3
3
  export interface ChatSplitterProps {
4
- pure?: boolean;
5
4
  left: {
6
5
  title?: string;
7
6
  extra?: ReactNode;
8
7
  body: ReactNode;
8
+ visible?: boolean;
9
9
  };
10
10
  right: {
11
11
  title?: string;
12
12
  extra?: ReactNode;
13
13
  body: ReactNode;
14
+ visible?: boolean;
14
15
  };
15
16
  size?: {
16
17
  default?: string;
@@ -2,34 +2,33 @@ import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { Card, Splitter } from "antd";
3
3
  import styled_components from "styled-components";
4
4
  const ChatSplitter = (props)=>{
5
- const { pure, left, right, size } = props;
5
+ const { left, right, size } = props;
6
6
  const defaultSize = size?.default || '70%';
7
7
  const maxSize = size?.max || '80%';
8
8
  const minSize = size?.min || '60%';
9
9
  return /*#__PURE__*/ jsxs(StyledSplitter, {
10
- lazy: true,
11
10
  children: [
12
- /*#__PURE__*/ jsx(Splitter.Panel, {
11
+ left.visible ? /*#__PURE__*/ jsx(Splitter.Panel, {
13
12
  defaultSize: defaultSize,
14
13
  min: minSize,
15
14
  max: maxSize,
16
- resizable: !pure,
15
+ resizable: left.visible && right.visible,
17
16
  style: panelStyle,
18
17
  children: /*#__PURE__*/ jsx(SplitterPanelCard, {
19
- pure: pure,
20
18
  title: left.title,
21
19
  extra: left.extra,
22
20
  children: left.body
23
21
  })
24
- }),
25
- pure ? false : /*#__PURE__*/ jsx(Splitter.Panel, {
22
+ }) : false,
23
+ right.visible ? /*#__PURE__*/ jsx(Splitter.Panel, {
24
+ resizable: left.visible && right.visible,
26
25
  style: panelStyle,
27
26
  children: /*#__PURE__*/ jsx(SplitterPanelCard, {
28
27
  title: right.title,
29
28
  extra: right.extra,
30
29
  children: right.body
31
30
  })
32
- })
31
+ }) : false
33
32
  ]
34
33
  });
35
34
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "listpage-next",
3
- "version": "0.0.161",
3
+ "version": "0.0.162",
4
4
  "description": "A React component library for creating filter forms with Ant Design",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",