WebApp【公共组件库】@前端(For Git Submodule)
Tevin
2024-07-02 0dc0b818c2e88ee54dc2c0db0a2aab1436a7b476
优化单选式开关在h5页面上的表现
2 files modified
5 ■■■■■ changed files
forms/switch/CSwitchRadio.vue 2 ●●● patch | view | raw | blame | history
forms/switch/cSwitch.scss 3 ●●●● patch | view | raw | blame | history
forms/switch/CSwitchRadio.vue
@@ -102,7 +102,7 @@
    },
    mounted() {
        if (process.env.TARO_ENV === 'h5') {
            $(this.$refs.switch.$el).find('.at-switch').prepend(this.$refs.radio.$el);
            $(this.$refs.switch.$el).append(this.$refs.radio.$el);
        } else if (process.env.TARO_ENV === 'weapp') {
            $(this.$refs.switch.$el).find('.at-switch').append(this.$refs.radio);
        }
forms/switch/cSwitch.scss
@@ -82,7 +82,7 @@
            display: none;
        }
        .c-switch-radio-group {
            @include flexbox(flex, flex-start center, n wrap);
            @include flexbox(flex, flex-end center, n wrap);
            flex: 1;
        }
        .c-switch-radio-item {
@@ -118,6 +118,7 @@
    }
    &.c-switch-radio-left {
        .c-switch-radio-group {
            @include flexbox(flex, flex-start center, n wrap);
            padding-right: 0;
            .c-switch-radio-item {
                padding-left: 0;