ElemeFE / element

A Vue.js 2.0 UI Toolkit for Web
https://element.eleme.io/
MIT License
54.11k stars 14.65k forks source link

[Feature Request] asks for additional notify document cases #7080

Closed evolutionjay closed 6 years ago

evolutionjay commented 7 years ago

Existing Component

Component Name

notify

Description

在文档的 message 接口仅仅是简单的说能用 render 函数返回一个 vNode,确实,对于你们这些高手来说这不难理解,但是考虑到用的人的平均水平, 你不可能让他判断他是 vue 能力不足 还是 文档不充分,所以希望加入 挂在 component 到 vNode 的案例。 例如我写了一个: jsfiddle.net

element-bot commented 7 years ago

Translation of this issue:

Existing Component

yes

Component Name

Notify

Description

The message document is just a simple interface that can return render function with a vNode, indeed, for those of you master it is not difficult to understand, but considering the average level of the people, you can not let him judge whether he is lack of ability or Vue document is not sufficient, so hope to join up to vNode in the case of component.

For example, I wrote one: jsfiddle.net

evolutionjay commented 7 years ago

顺便, 发现当多个 notify 同时出现, 然后中间有一个的容器 改变了 notify 的高度的时候, 会造成错乱,建议加入一个全局 notify 位置 update 的方法供开发者调用。

个人觉得, 所有新产生的 notify 应该挂载在一个 notify management 的 Dom 容器里面,然后定位用 Relative 这样就能解决容器高度的问题, 如果想做得更细致。那么可以用 https://github.com/posva/vue-motion , 这个去平滑改变 notify 的高度, 甚至,如果 notify 是在同一个容器里面 ,那么 可以用 vue 的 transition-group 这个特性, 在 列表的排序过渡 应用 v-move 特性, 进行一个新 notify 从上面插入的排序( 目前新 notify 是从下面插入) 按照交互最优化, 其实新消息应该是在最顶部才对。 希望能被看到这个建议。

Leopoldthecoder commented 6 years ago

It's not our job to teach people how to use Vue.