WebApp【公共组件库】@前端(For Git Submodule)
Tevin
2022-03-23 99b7b70cbcdd3e3f69731834212637bdda0e1dc6
修复CSwitchRadio在小程序中显示异常的问题
2 files modified
20 ■■■■■ changed files
forms/switch/CSwitchRadio.vue 12 ●●●● patch | view | raw | blame | history
forms/switch/cSwitch.scss 8 ●●●● patch | view | raw | blame | history
forms/switch/CSwitchRadio.vue
@@ -14,25 +14,25 @@
                class="c-switch-radio-item"
                @tap="evt => handleChange(true)"
            >
                <text
                <view
                    class="c-switch-radio-icon"
                    :class="current === true ? 'checked' : ''"
                >
                    <AtIcon value="check" />
                </text>
                <text>{{checkedLabel}}</text>
                </view>
                <view class="c-switch-radio-label">{{checkedLabel}}</view>
            </view>
            <view
                class="c-switch-radio-item"
                @tap="evt => handleChange(false)"
            >
                <text
                <view
                    class="c-switch-radio-icon"
                    :class="current === false ? 'checked' : ''"
                >
                    <AtIcon value="check" />
                </text>
                <text>{{uncheckedLabel}}</text>
                </view>
                <view class="c-switch-radio-label">{{uncheckedLabel}}</view>
            </view>
        </view>
    </view>
forms/switch/cSwitch.scss
@@ -46,13 +46,14 @@
        }
        .c-switch-radio-item {
            display: inline-block;
            padding-left: 8px;
            padding-left: 18px;
        }
        .c-switch-radio-icon {
            @include flexbox(inline, center center);
            width: 48px;
            min-width: 48px;
            height: 48px;
            vertical-align: middle;
            color: transparent;
            font-size: 32px;
            line-height: 1;
@@ -67,5 +68,10 @@
                background-color: #2093df;
            }
        }
        .c-switch-radio-label {
            display: inline-block;
            vertical-align: middle;
            padding-left: 6px;
        }
    }
}