@ray-js/smart-ui 2.6.0 → 2.6.1-beta-0

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/README-zh_CN.md CHANGED
@@ -44,7 +44,7 @@ export default function Demo() {
44
44
  考虑到项目的按需引入以及整体体积问题,上面的引入方式会导致部分组件样式文件残留影响打包产物体积,所以我们推荐使用按需引入插件,其会自动将 `import { Button } from '@ray-js/smart-ui';` 引入方式解析成 `import { Button } from '@ray-js/smart-ui/es/button';`。
45
45
 
46
46
  1. 环境要求
47
- * >= @ray-js/cli@1.7.4
47
+ * \>= @ray-js/cli@1.7.4
48
48
  * esbuild 构建模式(不支持 webpack 模式)
49
49
  * 使用 ESModule import 语法的导入
50
50
  * **SmartUI 版本 2.4.0 及以上**
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  import { SmartBaseExternalClassName, SmartComponent, SmartEventHandler } from '../base';
2
3
  import { SmartTransitionEvents } from '../transition';
3
4
  export interface SmartBottomSheetProps {
@@ -56,6 +57,12 @@ export interface SmartBottomSheetProps {
56
57
  * @default 50%
57
58
  */
58
59
  maxHeight?: number | string;
60
+ /**
61
+ * @description 组件整体最大高度 用于自动撑开高度情况
62
+ * @version 2.6.1
63
+ * @default true
64
+ */
65
+ showClose?: boolean;
59
66
  }
60
67
  export interface SmartBottomSheetEvents extends SmartTransitionEvents {
61
68
  /**
@@ -91,7 +98,21 @@ export interface SmartBottomSheetEvents extends SmartTransitionEvents {
91
98
  */
92
99
  onClickOverlay?: SmartEventHandler;
93
100
  }
101
+ interface SmartBottomSheetSlot {
102
+ /**
103
+ * 内容
104
+ */
105
+ children?: React.ReactNode;
106
+ slot?: {
107
+ /**
108
+ * @description 自定义 title 显示内容,需要不设置 title 属性
109
+ * @version 2.6.1
110
+ */
111
+ title: React.ReactNode;
112
+ };
113
+ }
94
114
  /**
95
115
  * Since v2.0.0
96
116
  */
97
- export type SmartBottomSheet = SmartComponent<SmartBottomSheetProps, SmartBottomSheetEvents, SmartBaseExternalClassName>;
117
+ export type SmartBottomSheet = SmartComponent<SmartBottomSheetProps, SmartBottomSheetEvents, SmartBaseExternalClassName, SmartBottomSheetSlot>;
118
+ export {};
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  import { SmartBaseExternalClassName, SmartComponent, SmartEventHandler } from '../base';
2
3
  import { SmartTransitionEvents } from '../transition';
3
4
  export interface SmartBottomSheetProps {
@@ -56,6 +57,12 @@ export interface SmartBottomSheetProps {
56
57
  * @default 50%
57
58
  */
58
59
  maxHeight?: number | string;
60
+ /**
61
+ * @description 组件整体最大高度 用于自动撑开高度情况
62
+ * @version 2.6.1
63
+ * @default true
64
+ */
65
+ showClose?: boolean;
59
66
  }
60
67
  export interface SmartBottomSheetEvents extends SmartTransitionEvents {
61
68
  /**
@@ -91,7 +98,21 @@ export interface SmartBottomSheetEvents extends SmartTransitionEvents {
91
98
  */
92
99
  onClickOverlay?: SmartEventHandler;
93
100
  }
101
+ interface SmartBottomSheetSlot {
102
+ /**
103
+ * 内容
104
+ */
105
+ children?: React.ReactNode;
106
+ slot?: {
107
+ /**
108
+ * @description 自定义 title 显示内容,需要不设置 title 属性
109
+ * @version 2.6.1
110
+ */
111
+ title: React.ReactNode;
112
+ };
113
+ }
94
114
  /**
95
115
  * Since v2.0.0
96
116
  */
97
- export type SmartBottomSheet = SmartComponent<SmartBottomSheetProps, SmartBottomSheetEvents, SmartBaseExternalClassName>;
117
+ export type SmartBottomSheet = SmartComponent<SmartBottomSheetProps, SmartBottomSheetEvents, SmartBaseExternalClassName, SmartBottomSheetSlot>;
118
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ray-js/smart-ui",
3
- "version": "2.6.0",
3
+ "version": "2.6.1-beta-0",
4
4
  "description": "轻量、可靠的智能小程序 UI 组件库",
5
5
  "scripts": {
6
6
  "syncMiniappData": "node ./build/syncMiniappData.js",