@tuya-miniapp/smart-ui 2.1.8-beta-1 → 2.1.8-beta-2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
1
  import warningIcon from '@tuya-miniapp/icons/dist/svg/Warning';
2
2
  import { SmartComponent } from '../common/component';
3
3
  import { button } from '../mixins/button';
4
- import { toPromise } from '../common/utils';
4
+ import { getCurrentPage, toPromise } from '../common/utils';
5
5
  import { contextRef } from './dialog';
6
6
  SmartComponent({
7
7
  mixins: [button],
@@ -92,7 +92,7 @@ SmartComponent({
92
92
  callback: (() => { }),
93
93
  },
94
94
  mounted: function () {
95
- contextRef.value = this;
95
+ contextRef.value = getCurrentPage();
96
96
  },
97
97
  methods: {
98
98
  onConfirm() {
@@ -1,6 +1,6 @@
1
1
  import { SmartComponent } from '../common/component';
2
2
  import { WHITE } from '../common/color';
3
- import { getSystemInfoSync } from '../common/utils';
3
+ import { getCurrentPage, getSystemInfoSync } from '../common/utils';
4
4
  import { contextRef } from './notify';
5
5
  SmartComponent({
6
6
  props: {
@@ -47,7 +47,7 @@ SmartComponent({
47
47
  this.setData({ statusBarHeight });
48
48
  },
49
49
  mounted: function () {
50
- contextRef.value = this;
50
+ contextRef.value = getCurrentPage();
51
51
  },
52
52
  methods: {
53
53
  show() {
@@ -1,6 +1,7 @@
1
1
  import { Success, Alarm, Error } from './icons';
2
2
  import { SmartComponent } from '../common/component';
3
3
  import { contextRef } from './toast';
4
+ import { getCurrentPage } from '../common/utils';
4
5
  SmartComponent({
5
6
  props: {
6
7
  show: Boolean,
@@ -33,7 +34,7 @@ SmartComponent({
33
34
  warn: Alarm,
34
35
  },
35
36
  mounted: function () {
36
- contextRef.value = this;
37
+ contextRef.value = getCurrentPage();
37
38
  },
38
39
  methods: {
39
40
  // for prevent touchmove
@@ -97,7 +97,7 @@ var dialog_1 = require("./dialog");
97
97
  callback: (function () { }),
98
98
  },
99
99
  mounted: function () {
100
- dialog_1.contextRef.value = this;
100
+ dialog_1.contextRef.value = (0, utils_1.getCurrentPage)();
101
101
  },
102
102
  methods: {
103
103
  onConfirm: function () {
@@ -49,7 +49,7 @@ var notify_1 = require("./notify");
49
49
  this.setData({ statusBarHeight: statusBarHeight });
50
50
  },
51
51
  mounted: function () {
52
- notify_1.contextRef.value = this;
52
+ notify_1.contextRef.value = (0, utils_1.getCurrentPage)();
53
53
  },
54
54
  methods: {
55
55
  show: function () {
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  var icons_1 = require("./icons");
4
4
  var component_1 = require("../common/component");
5
5
  var toast_1 = require("./toast");
6
+ var utils_1 = require("../common/utils");
6
7
  (0, component_1.SmartComponent)({
7
8
  props: {
8
9
  show: Boolean,
@@ -35,7 +36,7 @@ var toast_1 = require("./toast");
35
36
  warn: icons_1.Alarm,
36
37
  },
37
38
  mounted: function () {
38
- toast_1.contextRef.value = this;
39
+ toast_1.contextRef.value = (0, utils_1.getCurrentPage)();
39
40
  },
40
41
  methods: {
41
42
  // for prevent touchmove
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tuya-miniapp/smart-ui",
3
- "version": "2.1.8-beta-1",
3
+ "version": "2.1.8-beta-2",
4
4
  "author": "MiniApp Team",
5
5
  "license": "MIT",
6
6
  "miniprogram": "lib",