Skip to content

[Bug report] 输出 web 时发现的几个问题 #2237

@forzgc

Description

@forzgc

问题描述

  1. tab-bar 页面使用 mpx-tab-bar-container 作为顶层容器,但组件使用 div 包裹 page,会导致 page 的 height: 100% 样式失效。
  2. 自定义 custom-tab-bar 时,custom-tab-bar/index.mpx 会在 getBuiltInMixins 时混入 pageIdMixin,由于此组件不是page的子组件,不能注入 __pageId ,会产生警告。
  3. 为ali和web环境的添加 .mpx-root-view {} 样式时,是判断处理文件是否为 app.mpx 文件时动态添加的,如果 app.mpx 中没有样式,好像会跳过css处理流程,.mpx-root-view 样式也就添加不上。
  4. 页面的 <style scoped> page {} </style> 中,page样式没有隔离,会互相影响。

最简复现demo
mpx-project.zip

npm run serve:web 运行起来之后,可以在这三个页面查看问题
page/index
page/tab1
page/tab2

再补充一个,不知道算不算问题
vue组件 props: { type: String }
小程序组件 properties: { type: String }
这两个在没有传值的时候,vue组件会是undefined,小程序原生是会默认给个空字符串,也就是会经过 new String()处理传入的值。目前在输出到web端时还是按照vue的逻辑,会导致产生一些undefined问题。

然后希望能有个方式自定义微信组件的web实现,目前mpx plugin中内置了一套微信组件的实现,但是为了全兼容微信组件的功能,集成了许多功能,比如mpx-scroll-view,使用了bs来实现,但是个人感觉滚动效果没有原生的流畅,而且在ios上表现不太好,希望能给个方式可以自定义这些组件,感谢!!!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingsupport in futureWe will support it in furture

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions