@tuya-miniapp/smart-ui 2.12.0-beta-0 → 2.12.0-beta-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.
@@ -1,4 +1,5 @@
1
1
  import { basic } from '../mixins/basic';
2
+ import { guardComponentMethods } from '@ray-core/event-guard';
2
3
  function mapKeys(source, target, map) {
3
4
  Object.keys(map).forEach(key => {
4
5
  if (source[key]) {
@@ -41,6 +42,9 @@ function SmartComponent(smartOptions) {
41
42
  multipleSlots: true,
42
43
  addGlobalClass: true,
43
44
  };
45
+ if (options.methods) {
46
+ options.methods = guardComponentMethods(options.methods);
47
+ }
44
48
  Component(options);
45
49
  }
46
50
  export { SmartComponent };
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SmartComponent = void 0;
4
4
  var basic_1 = require("../mixins/basic");
5
+ var event_guard_1 = require("@ray-core/event-guard");
5
6
  function mapKeys(source, target, map) {
6
7
  Object.keys(map).forEach(function (key) {
7
8
  if (source[key]) {
@@ -44,6 +45,9 @@ function SmartComponent(smartOptions) {
44
45
  multipleSlots: true,
45
46
  addGlobalClass: true,
46
47
  };
48
+ if (options.methods) {
49
+ options.methods = (0, event_guard_1.guardComponentMethods)(options.methods);
50
+ }
47
51
  Component(options);
48
52
  }
49
53
  exports.SmartComponent = SmartComponent;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tuya-miniapp/smart-ui",
3
- "version": "2.12.0-beta-0",
3
+ "version": "2.12.0-beta-1",
4
4
  "author": "MiniApp Team",
5
5
  "license": "MIT",
6
6
  "miniprogram": "lib",
@@ -88,7 +88,8 @@
88
88
  ],
89
89
  "dependencies": {
90
90
  "@ray-js/components-ty-slider": "^0.3.8",
91
- "@tuya-miniapp/icons": "^2.3.0"
91
+ "@tuya-miniapp/icons": "^2.3.0",
92
+ "@ray-core/event-guard": "0.4.13-beta.0"
92
93
  },
93
94
  "maintainers": [
94
95
  {