Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>classnamesNew to Visual Studio Code? Get it now.
classnames

classnames

qinweijie

|
462 installs
| (0) | Free
Convert className
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Convert ClassName

一个将JSX/TSX中的 className="xxx" 转化为 className={style.xxx}插件

命令

按cmd + shift + P 输入 Convert ClassName

使用命令

快捷键

cmd + shift + a alt + z 别想快捷键了, 右键点击就好, 或者自行修改

使用自动复制css文件

使用自动复制css文件

下载

已经上架:marketplace.visualstudio.com 或者在vscode扩展中直接搜索classnames安装即可

说明

可以只转化选择代码 将JSX/TSX中的 className="xxx" 转化为 className={style.xxx}

支持语言

JSX/TSX

配置

配置名 作用 默认值
classnames.moduleName 引入css模块名称 'style'
classnames.classnames 引入classnames别名 'classnames'
classnames.copy 复制*.css文件到*.module.css false
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft