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

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.
@@ -44,6 +44,7 @@ export function transition(showDefaultValue) {
44
44
  display: false,
45
45
  animating: false,
46
46
  status: '',
47
+ isShowed: false,
47
48
  },
48
49
  ready() {
49
50
  if (this.data.show === true) {
@@ -52,6 +53,11 @@ export function transition(showDefaultValue) {
52
53
  },
53
54
  methods: {
54
55
  observeShow(value, old) {
56
+ if (!this.data.isShowed && value) {
57
+ this.setData({
58
+ isShowed: true,
59
+ });
60
+ }
55
61
  if (value === old) {
56
62
  return;
57
63
  }
@@ -3,19 +3,21 @@
3
3
 
4
4
  <import src="./popup.wxml" />
5
5
 
6
- <smart-overlay
7
- wx:if="{{ overlay }}"
8
- show="{{ show }}"
9
- z-index="{{ zIndex }}"
10
- custom-style="{{ overlayStyle }}"
11
- duration="{{ duration }}"
12
- bind:click="onClickOverlay"
13
- lock-scroll="{{ lockScroll }}"
14
- root-portal="{{ rootPortal }}"
15
- />
6
+ <block wx:if="{{ isShowed }}">
7
+ <smart-overlay
8
+ wx:if="{{ overlay }}"
9
+ show="{{ show }}"
10
+ z-index="{{ zIndex }}"
11
+ custom-style="{{ overlayStyle }}"
12
+ duration="{{ duration }}"
13
+ bind:click="onClickOverlay"
14
+ lock-scroll="{{ lockScroll }}"
15
+ root-portal="{{ rootPortal }}"
16
+ />
16
17
 
17
- <root-portal wx:if="{{ rootPortal }}">
18
- <include src="./popup.wxml" />
19
- </root-portal>
18
+ <root-portal wx:if="{{ rootPortal }}">
19
+ <include src="./popup.wxml" />
20
+ </root-portal>
20
21
 
21
- <include wx:else src="./popup.wxml" />
22
+ <include wx:else src="./popup.wxml" />
23
+ </block>
@@ -77,6 +77,7 @@ function transition(showDefaultValue) {
77
77
  display: false,
78
78
  animating: false,
79
79
  status: '',
80
+ isShowed: false,
80
81
  },
81
82
  ready: function () {
82
83
  if (this.data.show === true) {
@@ -85,6 +86,11 @@ function transition(showDefaultValue) {
85
86
  },
86
87
  methods: {
87
88
  observeShow: function (value, old) {
89
+ if (!this.data.isShowed && value) {
90
+ this.setData({
91
+ isShowed: true,
92
+ });
93
+ }
88
94
  if (value === old) {
89
95
  return;
90
96
  }
@@ -3,19 +3,21 @@
3
3
 
4
4
  <import src="./popup.wxml" />
5
5
 
6
- <smart-overlay
7
- wx:if="{{ overlay }}"
8
- show="{{ show }}"
9
- z-index="{{ zIndex }}"
10
- custom-style="{{ overlayStyle }}"
11
- duration="{{ duration }}"
12
- bind:click="onClickOverlay"
13
- lock-scroll="{{ lockScroll }}"
14
- root-portal="{{ rootPortal }}"
15
- />
6
+ <block wx:if="{{ isShowed }}">
7
+ <smart-overlay
8
+ wx:if="{{ overlay }}"
9
+ show="{{ show }}"
10
+ z-index="{{ zIndex }}"
11
+ custom-style="{{ overlayStyle }}"
12
+ duration="{{ duration }}"
13
+ bind:click="onClickOverlay"
14
+ lock-scroll="{{ lockScroll }}"
15
+ root-portal="{{ rootPortal }}"
16
+ />
16
17
 
17
- <root-portal wx:if="{{ rootPortal }}">
18
- <include src="./popup.wxml" />
19
- </root-portal>
18
+ <root-portal wx:if="{{ rootPortal }}">
19
+ <include src="./popup.wxml" />
20
+ </root-portal>
20
21
 
21
- <include wx:else src="./popup.wxml" />
22
+ <include wx:else src="./popup.wxml" />
23
+ </block>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tuya-miniapp/smart-ui",
3
- "version": "2.10.1-beta-1",
3
+ "version": "2.10.1-beta-2",
4
4
  "author": "MiniApp Team",
5
5
  "license": "MIT",
6
6
  "miniprogram": "lib",