We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
element-ui 2.x el-table-infinite-scroll: "2.0.0"
你好,代码中的这段没理解,为啥一定要设定height,强制设定height为400px,导致在行数少的应用场景下,有一个固定的高度,是否为破坏性变更?为啥不能是maxHeight?
if (!el.style.height) { scrollElem.style.height = '400px'; // eslint-disable-next-line console.warn( `${msgTitle} el-table height required, otherwise will set default value: 400px` ); }
其次是指令能否对外暴露一个参数,用来处理动态绑定该指令的场景,毕竟该指令适用于数据量大的场景,一两条记录时不需要绑定该指令,从而避免副作用的影响。
inserted(el, binding, VNode, oldVNode) { // 补充的代码 if(!binding.isBind) return const scrollElem: HTMLElement = el.querySelector(elTableScrollWrapperClass); if (!scrollElem) { throw new Error( `${msgTitle}${elTableScrollWrapperClass} element not found.` ); } scrollElem.style.overflowY = 'auto'; // after render setTimeout(() => { if (!el.style.height) { scrollElem.style.height = '400px'; // eslint-disable-next-line console.warn( `${msgTitle} el-table height required, otherwise will set default value: 400px` ); } syncOptions(el, scrollElem); // use `InfiniteScroll` InfiniteScroll.inserted(scrollElem, binding, VNode, oldVNode); // used by unbind, destroy listener events el[elScope] = scrollElem[elScope]; }, 0); },
The text was updated successfully, but these errors were encountered:
No branches or pull requests
环境说明
element-ui 2.x
el-table-infinite-scroll: "2.0.0"
问题描述
你好,代码中的这段没理解,为啥一定要设定height,强制设定height为400px,导致在行数少的应用场景下,有一个固定的高度,是否为破坏性变更?为啥不能是maxHeight?
建议
其次是指令能否对外暴露一个参数,用来处理动态绑定该指令的场景,毕竟该指令适用于数据量大的场景,一两条记录时不需要绑定该指令,从而避免副作用的影响。
The text was updated successfully, but these errors were encountered: