mip-project / mip

MIT License
11 stars 1 forks source link

MIP 问题整理[未完待续] #23

Open PengXing opened 6 years ago

PengXing commented 6 years ago
  1. isIframed 在 MIP2 里也许和 MIP1 的意思不一样,需要考虑这个字段的含义,MIP1 这个字段能代表是否在搜索结果页,现在这个字段表面意思也有可能是在自己的站点
  2. eventAction 事件机制被大量使用,估计比较难去掉,如何和 MIP2 的 this.$emit 兼容,eventAction 的触发机制是否也能触发原生 CustomEvent
  3. viewer 应该从 util 中移出来,它并不属于 util,且 MIP2 需要保留 已经移出来
  4. viewer 里面的 sendMessage 发送的对象在 MIP1 和 MIP2 应该有所区别,MIP2 应该是 top,而不是 parent
  5. mip-hidden 是个什么东西?
  6. 未完待续
  7. mip-custom style 优先级应该比组件样式优先级高,目前是组件样式是js runtime 时插入的,插入位置比 mip-custom style 后
  8. custom element V0 和 V1 无法抹平问题,v0 的 attributeChangedCallback 对所有属性变更有效,无需声明 observedAttributes, 而 v1 只对声明了 observedAttributes 属性有效。官方组件可以统一通过更改兼容,但是第三方的业务组件不手动升级可能有问题。
xuexb commented 6 years ago
  1. mip-hidden 是个什么东西?

这个应该是为了让页面加载过程默认让元素隐藏,这个类出现应该是配合 layout="nodisplay" 的,代码见:

https://github.com/mipengine/mip/blob/master/src/mip.js#L95-L105

使用常见一些默认不显示的组件,如:https://www.mipengine.org/examples/mip-extensions/mip-sidebar.html

但,其实直接使用 [layout="nodisplay"] 也可以解决。