Browse Source

fix(checkbox&radio): checkbox radio add variables style

suzigang 4 years ago
parent
commit
aa26512a83

+ 4 - 4
src/packages/__VUE/checkbox/index.taro.vue

@@ -64,9 +64,9 @@ export default create({
     const color = computed(() => {
       return !pDisabled.value
         ? !pValue.value
-          ? '#d6d6d6'
-          : '#fa2c19'
-        : '#f5f5f5';
+          ? 'nut-checkbox__icon--unchecked'
+          : 'nut-checkbox__icon'
+        : 'nut-checkbox__icon--disable';
     });
 
     const emitChange = (value: string | boolean, label?: string) => {
@@ -79,7 +79,7 @@ export default create({
       return h(nutIcon, {
         name: !pValue.value ? iconName : iconActiveName,
         size: iconSize,
-        color: color.value
+        class: color.value
       });
     };
 

+ 4 - 4
src/packages/__VUE/radio/index.taro.vue

@@ -42,9 +42,9 @@ export default create({
     const color = computed(() => {
       return !props.disabled
         ? isCurValue.value
-          ? '#fa2c19'
-          : '#d6d6d6'
-        : '#f5f5f5';
+          ? 'nut-radio__icon'
+          : 'nut-radio__icon--unchecked'
+        : 'nut-radio__icon--disable';
     });
 
     const position = computed(() => {
@@ -56,7 +56,7 @@ export default create({
       return h(nutIcon, {
         name: isCurValue.value ? iconActiveName : iconName,
         size: iconSize,
-        color: color.value
+        class: color.value
       });
     };