Browse Source

Merge branch 'nutui-jdl' of https://github.com/jdf2e/nutui into nutui-jdl

richard1015 5 years ago
parent
commit
d454f7892a
4 changed files with 15 additions and 8 deletions
  1. 8 0
      CHANGELOG.md
  2. 1 1
      package.json
  3. 4 5
      src/packages/switch/switch.vue
  4. 2 2
      src/packages/toast/toast.vue

+ 8 - 0
CHANGELOG.md

@@ -1,3 +1,11 @@
+## @nutui/nutui-jdl v1.0.2
+
+`2020-08-21`
+ 
+* :bug: fix(Switch):修复 disable 状态禁用所有事件 @szg2008 
+* :bug: fix(Toast): 修复 2.2.9 demo错误 @yangkaixuan
+
+
 ## @nutui/nutui-jdl v1.0.1
 
 `2020-08-19`

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "@nutui/nutui-jdl",
-  "version": "1.0.1",
+  "version": "1.0.2",
   "description": "一套轻量级移动端Vue组件库",
   "typings": "dist/types/index.d.ts",
   "main": "dist/nutui.js",

+ 4 - 5
src/packages/switch/switch.vue

@@ -38,12 +38,11 @@ export default {
       const status = this.isActive;
       if (!this.disabled) {
         this.isActive = !status;
+        setTimeout(() => {
+          this.$emit('change', this.isActive);
+          this.$emit('update:active', this.isActive);
+        }, 300);
       }
-
-      setTimeout(() => {
-        this.$emit('change', this.isActive);
-        this.$emit('update:active', this.isActive);
-      }, 300);
     },
   },
 };

+ 2 - 2
src/packages/toast/toast.vue

@@ -2,7 +2,7 @@
   <transition name="toastfade">
     <nut-popup
       :overlay="cover"
-      :class="toastClass"
+      :class="toastBodyClass"
       v-model="visible"
       :closeOnClickOverlay="closeOnClickOverlay"
       :overlayStyle="{ backgroundColor: coverColor }"
@@ -72,7 +72,7 @@ export default {
     cusIcon() {
       return this.icon ? `url("${this.icon}")` : '';
     },
-    toastClass() {
+    toastBodyClass() {
       return [
         'nut-toast',
         { 'nut-toast-buttom': !this.center },