
Security News
AI Has Taken Over Open Source
Vibe coding at scale is reshaping how packages are created, contributed, and selected across the software supply chain
td-ui 是基于 antd 的补充 ui 库,提供 antd 组件未覆盖到的组件,也提供更高一层的封装,方便企业级中后台开发。
我们推荐使用 npm 或 yarn 的方式进行开发,不仅可在开发环境轻松调试,也可放心地在生产环境打包部署使用,享受整个生态圈和工具链带来的诸多好处。
$ npm install td-ui --save
$ yarn add td-ui
import { Watermark } from 'td-ui';
ReactDOM.render(<Watermark />, mountNode);
引入样式:
import 'td-ui/dist/td-ui.css'; // or 'td-ui/dist/td-ui.less'
下面两种方式都可以只加载用到的组件。
使用 babel-plugin-import(推荐)。
// .babelrc or babel-loader option
{
"plugins": [
["import", {
"libraryName": "td-ui",
"libraryDirectory": "es",
"style": "css" // `style: true` 会加载 less 文件
}]
]
}
然后只需从 td-ui 引入模块即可,无需单独引入样式。等同于下面手动引入的方式。
// babel-plugin-import 会帮助你加载 JS 和 CSS
import { Watermark } from 'td-ui';
手动引入
import Watermark from 'td-ui/lib/watermark'; // 加载 JS
import 'td-ui/lib/watermark/style/css'; // 加载 CSS
// import 'td-ui/lib/watermark/style'; // 加载 LESS
FAQs
同盾ui组件库
We found that td-ui demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Vibe coding at scale is reshaping how packages are created, contributed, and selected across the software supply chain

Security News
npm invalidated all granular access tokens that bypass 2FA after a fresh Mini Shai-Hulud wave compromised 323 npm packages. Staged publishing also entered public preview.

Research
/Security News
Compromised npm package art-template delivered a Coruna-like iOS Safari exploit framework through a watering-hole attack.