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

marquee height计算结果为0的问题 #1885

Closed
xiongmingwu opened this issue Aug 27, 2017 · 6 comments
Closed

marquee height计算结果为0的问题 #1885

xiongmingwu opened this issue Aug 27, 2017 · 6 comments

Comments

@xiongmingwu
Copy link

非常感谢作者贡献这么好框架,万分感激!在实践过程中发现marquee 插件存在如下问题:
正常图片:
image
异常图片:
image

我猜测是由于初始化时 我通过v-show属性隐藏了改控件,导致该控件在初始化时offsetHeight为0,。代码如下:
<flexbox :gutter="0" class="app-index-marquee" v-show="$route.path !== '/my'">
<flexbox-item :span="1/8" style="flex: 0 0 30px;text-align: center;">
<i class="iconfont icon-notification"></i>
</flexbox-item>
<flexbox-item style="margin-right: 8px;">
<marquee>
<marquee-item v-for="i in 2" :key="i">
{{i}}不支持一件代发,若发现存在一件代发,您的账号可能会被禁用!爱库存只为代购服务,只发货给代购。谢谢!
</marquee-item>
</marquee>
</flexbox-item>
</flexbox>
代码图片,git老是上传失败,等下补上。
建议该控件添加参数height进行控制,若未传则动态计算,若传了至该参数则直接使用传过来的参数。
还有一个问题,若滚动内容的长度不一致初始化计算的height也是有问题的!烦请您给点建议如何处理该问题.谢谢!

@xiongmingwu
Copy link
Author

不好意思,图片还是上传不了。这个问题应该容易复现。如果无法复现问题 请您联系我。

@airyland
Copy link
Owner

标题改一下?

@xiongmingwu xiongmingwu changed the title marquee height计算结果为0的我替你. marquee height计算结果为0的问题 Aug 27, 2017
@xiongmingwu
Copy link
Author

以下为控制台打印内容:
[VUX] 提 Issue 时麻烦附上以下版本信息以及必要的显示截图、重现步骤、代码(代码请不要截图)。
[VUX] vux@2.5.8, vux-loader@1.1.5, webpack@2.7.0, node@6.9
[VUX] 建议反馈请访问 https://github.com/airyland/vux/issues
[vue-devtools] Ready. Detected Vue v2.4.2

@xiongmingwu
Copy link
Author

@airyland 该问题能否给点建议? 或者什么时候方便优化该问题。

@airyland
Copy link
Owner

先用 v-if 试试。

@xiongmingwu
Copy link
Author

非常感谢!

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

No branches or pull requests

2 participants