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

Panel组件中footer是一个Obj类型{url: url, title: title},希望添加一个true or false是否显示的属性 #2476

Closed
Apache-Ra opened this issue Feb 6, 2018 · 4 comments

Comments

@Apache-Ra
Copy link

Apache-Ra commented Feb 6, 2018

在使用Panel做列表的时候,页面中,数据超过3条的时候,显示footer用以跳转到更多列表。

当数据少于3条的时候,# 这个Obj是一个空的,会导致dom页面存在多余的div。

      //列表超过3条显示更多
      if(resp.data.length>=3){
        vue.footerMore = {
          title: '更多',
          url: ' '
        }
      } else {
        vue.footerMore = { }
      }
@Apache-Ra
Copy link
Author

Apache-Ra commented Feb 6, 2018

目前解决方案是:
数据不超过3条的时候,把vue.footerMore = " ",这样页面上正常,但是会报一个类型不是object的错误。
如果这个Obj有一个属性控制他是否显示,或者其它更完美的解决方案,也是挺好。

@airyland
Copy link
Owner

airyland commented Feb 6, 2018

这应该是逻辑上的问题,不会添加新属性,会改成 title 为空时不显示。

@Apache-Ra
Copy link
Author

title为空的时候不显示,这个很合理。
以下,针对技术讨论,不是问题。
我看官方的demo在页面切换的时候,有滑动切换的效果,但是在实际开发场景中并没有这个效果。
然而,weex虽然有这个功能却不能使用路由weex,实在可惜啊。
还望大神给一个建议。

@airyland
Copy link
Owner

airyland commented Feb 7, 2018

切换动画是 vue 的 transition 功能,参考文档就可以实现了,vux 只提供组件。具体逻辑都在 App.vue 和 main.js 里。

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