Skip to content

Commit

Permalink
fix(templates): 修复reactIndex模版引用问题
Browse files Browse the repository at this point in the history
  • Loading branch information
StreakingMan committed Mar 2, 2022
1 parent 6e36217 commit 674fcce
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ skm set-project
? 请输入组件名 (MyComp)
```

生成文件如下
命令将生成相应的组件文件夹,文件夹内包含文件如下

index.tsc
```
Expand Down
2 changes: 2 additions & 0 deletions actions/react-comp.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ const reactComp = async () => {
option: { compName, CompName },
});
}

console.log(`📦 react组件${CompName}文件生成完毕`);
};

module.exports = {
Expand Down
2 changes: 1 addition & 1 deletion templates/reactCompIndex.ejs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { FC } from 'react'
import classnames from 'classnames'
import style from './index.module.scss'
import <%- CompName %>Props from './interface'
import { <%- CompName %>Props } from './interface'

const <%- CompName %>: FC< <%- CompName %>Props > = () => {
return <div className={classnames(style.<%- compName %>)}></div>
Expand Down

0 comments on commit 674fcce

Please sign in to comment.