Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MSlideGroup能否支持触摸滚动 #2165

Open
Yu-Core opened this issue Sep 21, 2024 · 1 comment
Open

MSlideGroup能否支持触摸滚动 #2165

Yu-Core opened this issue Sep 21, 2024 · 1 comment
Labels
component/SlideGroup type/enhancement New feature or request Vuetify3 Vuetify3 solves this problem, but Vuetify2 doesn't
Milestone

Comments

@Yu-Core
Copy link
Contributor

Yu-Core commented Sep 21, 2024

Is your feature request related to a problem? Please describe.
MSlideGroup无法通过触摸滚动,只能通过按钮,对移动端不太友好
MTabs和MChipGroup也受它的影响

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
目前的临时方案是添加了css,更改了OnScrollOffsetChanged方法

.m-slide-group__wrapper {
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    scrollbar-color: rgba(0, 0, 0, 0);
}

    .m-slide-group__wrapper::-webkit-scrollbar {
        display: none;
    }
private async void OnScrollOffsetChanged(double val)
    {
        if (RTL)
        {
            val = -val;
        }

        var scroll = val <= 0
            ? Bias(-val)
            : val > ContentWidth - WrapperWidth
                ? -(ContentWidth - WrapperWidth) + Bias(ContentWidth - WrapperWidth - val)
                : -val;

        if (RTL)
        {
            scroll = -scroll;
        }

        //改动了这里
        if (WrapperRef.Context != null)
        {
            await Js.ScrollTo(WrapperRef, 0, -scroll);
        }
    }

Additional context
Vuetify是可以的

@capdiem
Copy link
Contributor

capdiem commented Sep 23, 2024

@Yu-Core Vuetify 3 开始支持的,我们也有计划支持,包括NavigationDrawer组件。就目前而言,在移动端推荐使用 Swiper 组件。

@capdiem capdiem added component/SlideGroup type/enhancement New feature or request Vuetify3 Vuetify3 solves this problem, but Vuetify2 doesn't labels Sep 23, 2024
@capdiem capdiem added this to the Backlog milestone Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/SlideGroup type/enhancement New feature or request Vuetify3 Vuetify3 solves this problem, but Vuetify2 doesn't
Projects
None yet
Development

No branches or pull requests

2 participants