https://github.com/powerfulyang/live-templates
https://github.com/powerfulyang/live-templates
Last synced: 6 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/powerfulyang/live-templates
- Owner: powerfulyang
- Created: 2023-02-02T07:24:08.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-05-26T03:17:57.000Z (over 2 years ago)
- Last Synced: 2025-02-04T00:47:45.763Z (8 months ago)
- Language: TypeScript
- Size: 144 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Live Templates
正确使用 WebStorm 的 Live Templates 可以大大提高开发效率。
## 有用的变量
+ [`$TM_FILENAME_BASE$`](./variables/$TM_FILENAME_BASE$): 按文件名生成大驼峰变量名
example: `hello-world.js` => `HelloWorld`
example: `HelloWorld.js` => `HelloWorld`
+ [`$COLUMNS$`](./variables/$COLUMNS$): 读取剪切板内容,并按空格分割,生成 ProTable 的 columns
example: `id name age` =>
```tsx
const columns: ProColumnDetectType[] = [
{
title: 'id',
dataIndex: '',
},
{
title: 'name',
dataIndex: '',
},
{
title: 'age',
dataIndex: '',
},
];
```