-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
71 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { graphicsConfigItem } from '@/core/componentTemplate/graphics/Carrier/config'; | ||
/** | ||
* @description 通用图形 | ||
*/ | ||
export const universal = [graphicsConfigItem('universal_1', '长方形', { w: 150, h: 150 })]; | ||
|
||
export default [ | ||
{ | ||
category: 'graphics', | ||
title: '通用图形', | ||
componentList: universal, | ||
}, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { commonAttr, defaultProps, commonStyle } from '@/core/config/common'; | ||
/** | ||
*@param key 唯一值 | ||
@param name 名称 | ||
* @param props 控件的属性 | ||
*/ | ||
export const graphicsConfigItem = ( | ||
key: string, | ||
name: string, | ||
props: Partial<mustExistProps & uncertainProps>, | ||
): templateDataType => { | ||
const { w, h } = props; | ||
return { | ||
...commonAttr, | ||
id: 'graphics_carrier_' + key, | ||
category: 'graphics', | ||
type: 'Carrier', | ||
component: 'Carrier', | ||
label: name, | ||
propValue: { | ||
...defaultProps(), | ||
...props, | ||
}, | ||
icon: 'https://cdn.gudsen.com/2021/09/30/af90bac80a9447f18156e251ecbc1dff.png', | ||
style: { | ||
...commonStyle, | ||
width: w, | ||
height: h, | ||
}, | ||
editableEl: [], | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import React, { memo } from 'react'; | ||
|
||
const Index = memo((props) => { | ||
return <div>Index</div>; | ||
}); | ||
|
||
export default Index; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters