小编Adn*_*mad的帖子

反应无限滚动组件表体

有没有办法在“Table”中使用react无限滚动组件包? https://www.npmjs.com/package/react-infinite-scroll-component 这是我的代码。

<table className="table table-sm table-dark table-striped table-hover">
              <thead className="">
                <tr>
                  <th scope="col">#</th>
                  <th scope="col">Type</th>
                  <th scope="col">Object</th>
                  <th scope="col">Url</th>
                  <th scope="col">Ip</th>
                  <th scope="col">Detail</th>
                </tr>
              </thead>
              <tbody>
                <InfiniteScroll
                  dataLength={logs.list.length} //This is important field to render the next data
                  next={fetchData}
                  hasMore={logs.hasMore}
                  loader={<h4>Loading...</h4>}
                  endMessage={
                    <p style={{ textAlign: "center" }}>
                      <b>Yay! You have seen it all</b>
                    </p>
                  }
                >
                  {logs.list.map((l, i) => {
                    return (
                      <tr key={l.id}>
                        <th scope="row">{l.id}</th>
                        <td>{l.key}</td>
                        <td>{l.object}</td>
                        <td>{l.url}</td>
                        <td>{l.ip}</td>
                        <td>----</td>
                      </tr>
                    );
                  })}
                </InfiniteScroll>
              </tbody>
            </table>
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述

infinite-scroll reactjs react-infinite-scroll-component

4
推荐指数
1
解决办法
8992
查看次数

Youtube.com建有?

最近Youtube给了我一个改变主题的选择.其实我觉得youtube推出了新的主题.我正在检查它的代码(前端).它看起来像有角度,但我不确定它的角度或其他东西.

这是角度代码吗?如果是,那么它是什么版本?

要么

它的东西呢?

感谢您的关注.:)

在此输入图像描述

html javascript css youtube

2
推荐指数
1
解决办法
1549
查看次数