listpage-next 0.0.160 → 0.0.161

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.
@@ -0,0 +1 @@
1
+ export declare const Demo12: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,39 @@
1
+ import { Fragment, jsx } from "react/jsx-runtime";
2
+ import { Button } from "antd";
3
+ import { ChatSplitter } from "../features/ChatClient/index.js";
4
+ import { CloseOutlined } from "@ant-design/icons";
5
+ import { useState } from "react";
6
+ const Demo12 = ()=>{
7
+ const [pure, setPure] = useState(false);
8
+ return /*#__PURE__*/ jsx("div", {
9
+ style: {
10
+ width: 500,
11
+ background: 'lightblue'
12
+ },
13
+ children: /*#__PURE__*/ jsx(ChatSplitter, {
14
+ pure: pure,
15
+ left: {
16
+ title: '详情',
17
+ body: /*#__PURE__*/ jsx(Fragment, {
18
+ children: "详情"
19
+ })
20
+ },
21
+ right: {
22
+ title: '对话',
23
+ body: /*#__PURE__*/ jsx(Fragment, {
24
+ children: "对话"
25
+ }),
26
+ extra: /*#__PURE__*/ jsx(Button, {
27
+ onClick: ()=>setPure(true),
28
+ icon: /*#__PURE__*/ jsx(CloseOutlined, {})
29
+ })
30
+ },
31
+ size: {
32
+ default: '50%',
33
+ min: '20%',
34
+ max: '80%'
35
+ }
36
+ })
37
+ });
38
+ };
39
+ export { Demo12 };
@@ -7,21 +7,22 @@ const ChatSplitter = (props)=>{
7
7
  const maxSize = size?.max || '80%';
8
8
  const minSize = size?.min || '60%';
9
9
  return /*#__PURE__*/ jsxs(StyledSplitter, {
10
+ lazy: true,
10
11
  children: [
11
12
  /*#__PURE__*/ jsx(Splitter.Panel, {
12
- size: defaultSize,
13
+ defaultSize: defaultSize,
13
14
  min: minSize,
14
15
  max: maxSize,
15
16
  resizable: !pure,
16
17
  style: panelStyle,
17
18
  children: /*#__PURE__*/ jsx(SplitterPanelCard, {
18
- pure: !pure,
19
+ pure: pure,
19
20
  title: left.title,
20
21
  extra: left.extra,
21
22
  children: left.body
22
23
  })
23
24
  }),
24
- /*#__PURE__*/ jsx(Splitter.Panel, {
25
+ pure ? false : /*#__PURE__*/ jsx(Splitter.Panel, {
25
26
  style: panelStyle,
26
27
  children: /*#__PURE__*/ jsx(SplitterPanelCard, {
27
28
  title: right.title,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "listpage-next",
3
- "version": "0.0.160",
3
+ "version": "0.0.161",
4
4
  "description": "A React component library for creating filter forms with Ant Design",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",