@canlooks/can-ui 0.0.126 → 0.0.127

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.
@@ -28,10 +28,10 @@ exports.App = (({ theme, ...props }) => {
28
28
  });
29
29
  function InnerApp({ component: Component = 'div', theme, children, fill = true, ...props }) {
30
30
  const appValue = (0, utils_1.useExternalClass)(() => ({
31
- dialog: exports.App.dialog = new appDialog_1.AppDialogMethods(),
32
- message: exports.App.message = new appMessage_1.AppMessageMethods(),
33
- notification: exports.App.notification = new appNotification_1.AppNotificationMethods(),
34
- actionSheet: exports.App.actionSheet = new appActionSheet_1.AppActionSheetMethods()
31
+ dialog: exports.App.dialog ||= new appDialog_1.AppDialogMethods(),
32
+ message: exports.App.message ||= new appMessage_1.AppMessageMethods(),
33
+ notification: exports.App.notification ||= new appNotification_1.AppNotificationMethods(),
34
+ actionSheet: exports.App.actionSheet ||= new appActionSheet_1.AppActionSheetMethods()
35
35
  }));
36
36
  return ((0, jsx_runtime_1.jsxs)(AppContext, { value: appValue, children: [Component
37
37
  ? (0, jsx_runtime_1.jsx)(Component, { ...props, css: [
@@ -23,10 +23,10 @@ export const App = (({ theme, ...props }) => {
23
23
  });
24
24
  export function InnerApp({ component: Component = 'div', theme, children, fill = true, ...props }) {
25
25
  const appValue = useExternalClass(() => ({
26
- dialog: App.dialog = new AppDialogMethods(),
27
- message: App.message = new AppMessageMethods(),
28
- notification: App.notification = new AppNotificationMethods(),
29
- actionSheet: App.actionSheet = new AppActionSheetMethods()
26
+ dialog: App.dialog ||= new AppDialogMethods(),
27
+ message: App.message ||= new AppMessageMethods(),
28
+ notification: App.notification ||= new AppNotificationMethods(),
29
+ actionSheet: App.actionSheet ||= new AppActionSheetMethods()
30
30
  }));
31
31
  return (_jsxs(AppContext, { value: appValue, children: [Component
32
32
  ? _jsx(Component, { ...props, css: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@canlooks/can-ui",
3
- "version": "0.0.126",
3
+ "version": "0.0.127",
4
4
  "author": "C.CanLiang <canlooks@gmail.com>",
5
5
  "description": "My ui framework",
6
6
  "license": "MIT",