Explorar o código

Button: fix disabled attribute

Leopoldthecoder %!s(int64=7) %!d(string=hai) anos
pai
achega
e2be799e6d
Modificáronse 2 ficheiros con 3 adicións e 1 borrados
  1. 1 1
      examples/components/theme-picker.vue
  2. 2 0
      packages/button/src/button.vue

+ 1 - 1
examples/components/theme-picker.vue

@@ -97,7 +97,7 @@
           let green = parseInt(color.slice(2, 4), 16);
           let blue = parseInt(color.slice(4, 6), 16);
 
-          if (tint === 0) {
+          if (tint === 0) { // when primary color is in its rgb space
             return [red, green, blue].join(',');
           } else {
             red += Math.round(tint * (255 - red));

+ 2 - 0
packages/button/src/button.vue

@@ -2,6 +2,8 @@
   <button
     class="el-button"
     @click="handleClick"
+    :disabled="disabled"
+    :autofocus="autofocus"
     :type="nativeType"
     :class="[
       type ? 'el-button--' + type : '',