@tuya-miniapp/smart-ui 2.3.2-beta-1 → 2.3.2-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.
- package/dist/picker/index.js +13 -12
- package/lib/picker/index.js +13 -13
- package/package.json +1 -1
    
        package/dist/picker/index.js
    CHANGED
    
    | @@ -30,7 +30,9 @@ SmartComponent({ | |
| 30 30 | 
             
                            }
         | 
| 31 31 | 
             
                        },
         | 
| 32 32 | 
             
                    } }),
         | 
| 33 | 
            -
                data: { | 
| 33 | 
            +
                data: {
         | 
| 34 | 
            +
                    animating: false,
         | 
| 35 | 
            +
                },
         | 
| 34 36 | 
             
                beforeCreate() {
         | 
| 35 37 | 
             
                    Object.defineProperty(this, 'children', {
         | 
| 36 38 | 
             
                        get: () => this.selectAllComponents('.smart-picker__column') || [],
         | 
| @@ -143,21 +145,20 @@ SmartComponent({ | |
| 143 145 | 
             
                        return Promise.all(stack);
         | 
| 144 146 | 
             
                    },
         | 
| 145 147 | 
             
                    animationStart() {
         | 
| 146 | 
            -
                        if (this.animating)
         | 
| 148 | 
            +
                        if (this.data.animating)
         | 
| 147 149 | 
             
                            return;
         | 
| 148 | 
            -
                        this. | 
| 150 | 
            +
                        this.setData({
         | 
| 151 | 
            +
                            animating: true,
         | 
| 152 | 
            +
                        });
         | 
| 149 153 | 
             
                        this.$emit('animation-start');
         | 
| 150 154 | 
             
                    },
         | 
| 151 155 | 
             
                    animationEnd() {
         | 
| 152 | 
            -
                         | 
| 153 | 
            -
             | 
| 154 | 
            -
             | 
| 155 | 
            -
             | 
| 156 | 
            -
                         | 
| 157 | 
            -
             | 
| 158 | 
            -
                            this.animating = false;
         | 
| 159 | 
            -
                            this.endTimeout = null;
         | 
| 160 | 
            -
                        }, 300);
         | 
| 156 | 
            +
                        if (!this.data.animating)
         | 
| 157 | 
            +
                            return;
         | 
| 158 | 
            +
                        this.setData({
         | 
| 159 | 
            +
                            animating: false,
         | 
| 160 | 
            +
                        });
         | 
| 161 | 
            +
                        this.$emit('animation-end');
         | 
| 161 162 | 
             
                    },
         | 
| 162 163 | 
             
                },
         | 
| 163 164 | 
             
            });
         | 
    
        package/lib/picker/index.js
    CHANGED
    
    | @@ -44,7 +44,9 @@ var shared_1 = require("./shared"); | |
| 44 44 | 
             
                            }
         | 
| 45 45 | 
             
                        },
         | 
| 46 46 | 
             
                    } }),
         | 
| 47 | 
            -
                data: { | 
| 47 | 
            +
                data: {
         | 
| 48 | 
            +
                    animating: false,
         | 
| 49 | 
            +
                },
         | 
| 48 50 | 
             
                beforeCreate: function () {
         | 
| 49 51 | 
             
                    var _this = this;
         | 
| 50 52 | 
             
                    Object.defineProperty(this, 'children', {
         | 
| @@ -166,22 +168,20 @@ var shared_1 = require("./shared"); | |
| 166 168 | 
             
                        return Promise.all(stack);
         | 
| 167 169 | 
             
                    },
         | 
| 168 170 | 
             
                    animationStart: function () {
         | 
| 169 | 
            -
                        if (this.animating)
         | 
| 171 | 
            +
                        if (this.data.animating)
         | 
| 170 172 | 
             
                            return;
         | 
| 171 | 
            -
                        this. | 
| 173 | 
            +
                        this.setData({
         | 
| 174 | 
            +
                            animating: true,
         | 
| 175 | 
            +
                        });
         | 
| 172 176 | 
             
                        this.$emit('animation-start');
         | 
| 173 177 | 
             
                    },
         | 
| 174 178 | 
             
                    animationEnd: function () {
         | 
| 175 | 
            -
                         | 
| 176 | 
            -
             | 
| 177 | 
            -
                         | 
| 178 | 
            -
                             | 
| 179 | 
            -
                        }
         | 
| 180 | 
            -
                        this | 
| 181 | 
            -
                            _this.$emit('animation-end');
         | 
| 182 | 
            -
                            _this.animating = false;
         | 
| 183 | 
            -
                            _this.endTimeout = null;
         | 
| 184 | 
            -
                        }, 300);
         | 
| 179 | 
            +
                        if (!this.data.animating)
         | 
| 180 | 
            +
                            return;
         | 
| 181 | 
            +
                        this.setData({
         | 
| 182 | 
            +
                            animating: false,
         | 
| 183 | 
            +
                        });
         | 
| 184 | 
            +
                        this.$emit('animation-end');
         | 
| 185 185 | 
             
                    },
         | 
| 186 186 | 
             
                },
         | 
| 187 187 | 
             
            });
         |