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

Tab组件中van-tab的宽度问题 #1078

Closed
ansonhorse opened this issue May 16, 2018 · 3 comments
Closed

Tab组件中van-tab的宽度问题 #1078

ansonhorse opened this issue May 16, 2018 · 3 comments

Comments

@ansonhorse
Copy link

<template>
  <van-nav-bar fixed>
    <van-icon name="arrow-left" slot="left"></van-icon>
    <div slot="title">
      <van-tabs v-model="index">
        <van-tab v-for="index in 3" :title="'选项 ' + index">
          内容 {{ index }}
        </van-tab>
      </van-tabs>
    </div>
    <van-icon name="share" slot="right"></van-icon>
  </van-nav-bar>
</template>

qq20180516-105106

你好,示例代码和效果如上面所展示的,van-tab的最大宽度只能是van-tabs的宽度。
假设我有以上的需求,而且需要van-tab的宽度为body的宽度,应该怎么实现?

@chenjiahan
Copy link
Member

建议限制 van-tab 的宽度

@CrazyShado
Copy link

你好,这个问题解决了吗

@threeMoreTime
Copy link

限制 van-tab 的宽度实测有效

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants