stupidmanyi / suspend-button Goto Github PK
View Code? Open in Web Editor NEWa react suspend-button
License: MIT License
a react suspend-button
License: MIT License
webpack.config.js处的css-loader配置更改为
{
test: /\.(css)$/,
use: ["style-loader", {
loader: 'css-loader',
options: {
modules: true,
}
}],
}
src根目录下(注意不是examples的src根目录)新增global.d.ts文件,内容如下,这样tsx引入就不会报错了
declare module '*.css'
src/index.tsx中css引入方式更改为
import styles from './styles.css';
这个时候输出styles就会正确编译为module了
由于更改了css的使用方式,tsx中使用了className的地方需要做调整
// 大概65行处:
current.className = current.className + ` ${styles['suspend-button-ts-animate']}`;
// 大概186行处:
className={`${styles['suspend-button-ts']}`}
// 大概171行处
current.className = current.className + ` ${styles['suspend-button-ts-animate']}`;
脚手架可以使用vite、create-react-app
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.