@lemon-fe/mini-app 1.0.0 → 1.0.1

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.
@@ -2,10 +2,24 @@ import { type CSSProperties, type ReactElement } from 'react';
2
2
  import type { NavigationStackScreen } from '../../typings';
3
3
  import './index.css';
4
4
  interface Props {
5
+ /**
6
+ * @description 页面配置
7
+ */
5
8
  pages: NavigationStackScreen[];
9
+ /**
10
+ * @description 子节点,根据pages构造的路由页面会作为children传入这个子节点,因此可以用于控制路由页面的渲染时机
11
+ */
6
12
  children?: ReactElement | null;
13
+ /**
14
+ * @description 头部样式, 所有route页面都会应用
15
+ * @default 无
16
+ */
7
17
  headerStyle?: CSSProperties;
18
+ /**
19
+ * @description 是否展示右上角胶囊按钮
20
+ * @default true
21
+ */
8
22
  capsule?: boolean;
9
23
  }
10
- declare function App(props: Props): JSX.Element;
11
- export default App;
24
+ export default function AppContainer(props: Props): JSX.Element;
25
+ export {};
@@ -32,8 +32,7 @@ import Screen from '../Screen';
32
32
  import { GO_BACK } from '../../constants';
33
33
  import { mini } from '../../global';
34
34
  import './index.css';
35
-
36
- function App(props) {
35
+ export default function AppContainer(props) {
37
36
  var pages = props.pages,
38
37
  children = props.children,
39
38
  headerStyle = props.headerStyle,
@@ -202,6 +201,4 @@ function App(props) {
202
201
  return /*#__PURE__*/React.createElement(NavigationContext.Provider, {
203
202
  value: ctx
204
203
  }, children ? /*#__PURE__*/cloneElement(children, {}, screens) : screens);
205
- }
206
-
207
- export default App;
204
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lemon-fe/mini-app",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "> TODO: description",
5
5
  "author": "鲁盛杰 <lusj@cnlemon.net>",
6
6
  "homepage": "",
@@ -15,6 +15,9 @@
15
15
  "publishConfig": {
16
16
  "registry": "https://registry.npmjs.org"
17
17
  },
18
+ "scripts": {
19
+ "test": "echo \"Error: run tests from root\" && exit 1"
20
+ },
18
21
  "dependencies": {
19
22
  "color-string": "^1.9.0",
20
23
  "react-transition-group": "^4.4.5"
@@ -28,7 +31,5 @@
28
31
  "react": "^17.0.2",
29
32
  "react-dom": "17.0.2"
30
33
  },
31
- "scripts": {
32
- "test": "echo \"Error: run tests from root\" && exit 1"
33
- }
34
- }
34
+ "gitHead": "12bd13957554deb93f49f194a008b0d0207fa251"
35
+ }