WebApp【公共组件库】@前端(For Git Submodule)
Tevin
2022-08-30 605e281a77fbddfbb7970f841dd5bcc2b1aea9eb
页面基础组件,增加Y轴滚动的功能
3 files modified
23 ■■■■■ changed files
common/custom.scss 1 ●●●● patch | view | raw | blame | history
layout/h5Page/CContent.vue 19 ●●●●● patch | view | raw | blame | history
layout/h5Page/cPage.scss 3 ●●●●● patch | view | raw | blame | history
common/custom.scss
@@ -75,6 +75,7 @@
                box-sizing: border-box;
                .layout-header__title {
                    font-size: 38px;
                    line-height: 46px;
                }
            }
            .layout-body {
layout/h5Page/CContent.vue
@@ -5,12 +5,31 @@
 
<template>
    <view class="c-content">
        <view
            class="c-content-inner"
            v-if="scroll==='off'"
        >
        <slot />
        </view>
        <scroll-view
            class="c-content-scroll"
            v-if="scroll==='on'"
            :scrollY="true"
        >
            <slot />
        </scroll-view>
    </view>
</template>
<script>
export default {
    name: 'CContent',
    props: {
        // 开启滚动,off / on
        scroll: {
            type: String,
            default: 'off',
        },
    },
};
</script>
layout/h5Page/cPage.scss
@@ -19,5 +19,8 @@
        width: 100%;
        height: 100%;
        overflow: hidden;
        .c-content-scroll {
            height: 100%;
        }
    }
}