常用的一些vscode snippet
snippet生产的网站 https://snippet-generator.app/
对照表
简写 |
含义 |
log |
console.log |
tsrhc |
react-hook组件 |
npc |
next页面组件 |
ais |
anq可注入store |
as |
anq store |
cst |
className |
is |
import styles module |
cx |
import classnames |
具体解释
console.log
tsrhc
view entry component, 组件名称为父级目录的名称
import React from 'react';
import styles from './index.module.scss';
export interface SnippetsProps {}
const Snippets: React.FC<SnippetsProps> = () => {
return (
<div>hello</div>
);
};
export default Snippets;
npc
next page component, 组件名称为父级目录的名称
import React from 'react';
import Snippets from 'views/snippets';
const SnippetsPage = () => {
return <Snippets />;
};
export default SnippetsPage;
ais
快捷创建anq store文件的页面结构,可以被注入的
import { BaseModel } from '@pdd/anq';
import { injectable } from 'inversify';
@injectable()
export class Index extends BaseModel {
constructor() {
super();
}
initialize(opt, context) {}
}
as
快捷创建anq store文件的页面结构,可以被注入的
import { BaseModel } from '@pdd/anq';
export class Index extends BaseModel {
constructor() {
super();
}
initialize(opt, context) {}
}
className={styles.}
import styles from './index.module.scss';
import cx from 'classnames';
| |