Skip to content

Commit 1322ef5

Browse files
committed
fixed 修改文档
1 parent 9f9bc49 commit 1322ef5

File tree

5 files changed

+25
-55
lines changed

5 files changed

+25
-55
lines changed

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,15 @@ flow-chart 基于 React+konva+TypeScript 流程图开发,支持新增/编辑
3434

3535
**已完成功能**
3636

37-
| 页面 | 是否完成(功能) |
38-
| --------------- | ---------------- |
39-
| 登录 ||
40-
| 首页 ||
41-
| 流程 ||
42-
| 卡片列表 ||
43-
| 卡片新增/编辑 | 正在开发 |
44-
| 流程图列表 ||
45-
| 流程图新增/编辑 ||
37+
| 页面 | 是否完成(功能) |
38+
| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
39+
| 登录 | |
40+
| 首页 | |
41+
| 流程 | |
42+
| 卡片列表 | |
43+
| 卡片新增/编辑 | 入参配置(input,textArea, number, pasword, select, checkboxGroup,radioGroup,cascader,switch,date,dateRange,time,timeRange,treeSelect 配置功能开发)置顶、置顶、上移、下移、复制、删除功能开发(正在开发中···) |
44+
| 流程图列表 | |
45+
| 流程图新增/编辑 | |
4646

4747
**已完成的组件**
4848

@@ -137,7 +137,7 @@ bigscreen
137137
## 页面及组件样式规范
138138

139139
- 强制使用`BEM`方式
140-
BEM 配置的命名空间统一为后台 简写:bg,这里可以在 src/assets/scss/mixin/config.scss 里修改,最好不要修改
140+
BEM 配置的命名空间统一为后台 简写:app,这里可以在 src/assets/scss/mixin/config.scss 里修改,最好不要修改
141141

142142
## 菜单管理(路由)
143143

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
"konva": "^8.4.2",
1414
"react": "^18.2.0",
1515
"react-dom": "^18.2.0",
16-
"react-konva": "^18.2.4",
1716
"react-scripts": "5.0.1",
1817
"typescript": "^4.9.4",
1918
"web-vitals": "^2.1.4"
@@ -62,6 +61,7 @@
6261
"node-sass": "^7.0.1",
6362
"progress-bar-webpack-plugin": "^2.1.0",
6463
"react-app-rewired": "^2.2.1",
64+
"react-konva": "^18.1.0",
6565
"react-redux": "^7.2.8",
6666
"react-router-dom": "^5.3.0",
6767
"redux": "^4.1.2",

src/components/card/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* @Author: hejp [email protected]
44
* @Date: 2023-02-15 21:30:33
55
* @LastEditors: hejp [email protected]
6-
* @LastEditTime: 2023-02-20 20:16:39
6+
* @LastEditTime: 2023-03-05 20:22:42
77
* @FilePath: \flow-chart\src\components\card\index.tsx
88
* Copyright (c) 2023 by ${git_name_email}, All Rights Reserved.
99
*/

src/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ ReactDOM.render(
3434
</PersistGate>
3535
</Provider>,
3636
document.getElementById('root')
37-
)
37+
)

src/pages/card-configuration/index.tsx

Lines changed: 12 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* @Author: hejp [email protected]
44
* @Date: 2023-02-09 15:22:35
55
* @LastEditors: hejp [email protected]
6-
* @LastEditTime: 2023-02-20 21:43:31
6+
* @LastEditTime: 2023-03-05 22:18:01
77
* @FilePath: \flow-chart\src\pages\card-configuration\index.tsx
88
* Copyright (c) 2023 by ${git_name_email}, All Rights Reserved.
99
*/
@@ -36,15 +36,16 @@ export const CardConfigurationContext = React.createContext<Icontent>({
3636

3737
interface IConfigurationProps {}
3838

39-
const Iconfiguration: FC<IConfigurationProps> = () => {
39+
// 舞台配置
40+
const stageConfig = {
41+
x: 0,
42+
y: 0,
43+
width: window.innerWidth - 300,
44+
height: window.innerHeight - 62
45+
}
46+
47+
const Configuration: FC<IConfigurationProps> = () => {
4048
const [state, dispatch] = useReducer(counter, initialState)
41-
// 舞台配置
42-
const [stageConfig] = useState<any>({
43-
x: 0,
44-
y: 0,
45-
width: window.innerWidth - 300,
46-
height: window.innerHeight - 62
47-
})
4849
// 获取卡片数据
4950
useEffect(() => {
5051
// 如果ID存在调用获取卡片详情接口
@@ -77,28 +78,6 @@ const Iconfiguration: FC<IConfigurationProps> = () => {
7778
}
7879
}, [])
7980

80-
console.log(state, 'cardConfig')
81-
// 鼠标按下
82-
const onMouseDown = (e: Konva.KonvaEventObject<MouseEvent>) => {
83-
const { evt } = e
84-
// 隐藏菜单
85-
if (evt.which === 1) {
86-
hideContentMenu()
87-
}
88-
}
89-
// 鼠标抬起
90-
const onMouseUp = (e: Konva.KonvaEventObject<MouseEvent>) => {
91-
console.log(e, '2')
92-
}
93-
// 鼠标移动
94-
const onMouseMove = (e: Konva.KonvaEventObject<MouseEvent>) => {
95-
// console.log(e, '3')
96-
}
97-
// 右键菜单
98-
const onContextMenu = (e: Konva.KonvaEventObject<MouseEvent>) => {
99-
e.evt.preventDefault()
100-
showContentMenu(e.evt)
101-
}
10281
return (
10382
<CardConfigurationContext.Provider
10483
value={{
@@ -110,24 +89,15 @@ const Iconfiguration: FC<IConfigurationProps> = () => {
11089
<ConfigurationHeader />
11190
<div className='app-card-configuration__body'>
11291
<div className='app-card-configuration__container' id='js_stage'>
113-
{/* 舞台 */}
114-
<Stage
115-
{...stageConfig}
116-
onMouseUp={onMouseUp}
117-
onMouseMove={onMouseMove}
118-
onMouseDown={onMouseDown}
119-
onContextMenu={onContextMenu}
120-
draggable
121-
type='stage'>
92+
<Stage {...stageConfig}>
12293
<Layer>{state.card ? <Card config={state.card} /> : null}</Layer>
12394
</Stage>
12495
</div>
125-
{/* 卡片配置 */}
12696
<Sittings />
12797
</div>
12898
<div className='app-card-configuration__footer'></div>
12999
</div>
130100
</CardConfigurationContext.Provider>
131101
)
132102
}
133-
export default Iconfiguration
103+
export default Configuration

0 commit comments

Comments
 (0)