update 0.5.0
This commit is contained in:
@@ -3,6 +3,12 @@ title: CHANGELOG
|
|||||||
order: 1
|
order: 1
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## 0.5.0
|
||||||
|
|
||||||
|
修复control组件宽度不够问题。
|
||||||
|
|
||||||
|
移除antd自定义icon,容器底部icon可配置。
|
||||||
|
|
||||||
## 0.4.2
|
## 0.4.2
|
||||||
|
|
||||||
修复animate错误初始值。
|
修复animate错误初始值。
|
||||||
|
@@ -2,13 +2,19 @@
|
|||||||
* @Author: yehuozhili
|
* @Author: yehuozhili
|
||||||
* @Date: 2021-01-31 20:44:16
|
* @Date: 2021-01-31 20:44:16
|
||||||
* @LastEditors: yehuozhili
|
* @LastEditors: yehuozhili
|
||||||
* @LastEditTime: 2021-07-13 21:09:41
|
* @LastEditTime: 2021-07-16 20:28:26
|
||||||
* @FilePath: \dooringx\packages\dooringx-lib\README.md
|
* @FilePath: \dooringx\packages\dooringx-lib\README.md
|
||||||
-->
|
-->
|
||||||
|
|
||||||
## Dooringx-lib
|
## Dooringx-lib
|
||||||
## changelog
|
## changelog
|
||||||
|
|
||||||
|
## 0.5.0
|
||||||
|
|
||||||
|
修复control组件宽度不够问题。
|
||||||
|
|
||||||
|
移除antd自定义icon,容器底部icon可配置。
|
||||||
|
|
||||||
## 0.4.2
|
## 0.4.2
|
||||||
|
|
||||||
修复animate错误初始值。
|
修复animate错误初始值。
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"version": "0.4.2",
|
"version": "0.5.0",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"module": "dist/dooringx-lib.esm.js",
|
"module": "dist/dooringx-lib.esm.js",
|
||||||
|
@@ -11,7 +11,6 @@ import React from 'react';
|
|||||||
import UserConfig from '../config';
|
import UserConfig from '../config';
|
||||||
import styles from '../index.less';
|
import styles from '../index.less';
|
||||||
import { getRealHeight } from '../core/transfer';
|
import { getRealHeight } from '../core/transfer';
|
||||||
import { IconFont } from '../core/utils/icon';
|
|
||||||
interface ContainerProps {
|
interface ContainerProps {
|
||||||
state: IStoreData;
|
state: IStoreData;
|
||||||
context: 'edit' | 'preview';
|
context: 'edit' | 'preview';
|
||||||
@@ -90,11 +89,12 @@ function Container(props: PropsWithChildren<ContainerProps>) {
|
|||||||
width: `${props.state.container.width}px`,
|
width: `${props.state.container.width}px`,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<IconFont
|
<div
|
||||||
type="icon-suofang"
|
|
||||||
onMouseDown={(e) => containerResizer.onMousedown(e, props.config)}
|
|
||||||
style={{ fontSize: '20px', cursor: 's-resize' }}
|
style={{ fontSize: '20px', cursor: 's-resize' }}
|
||||||
></IconFont>
|
onMouseDown={(e) => containerResizer.onMousedown(e, props.config)}
|
||||||
|
>
|
||||||
|
{props.config.getConfig().containerIcon}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
|
@@ -40,7 +40,7 @@ const SortableItem = SortableElement(
|
|||||||
{value.config.getComponentRegister().getMap()[value.value.name].display}
|
{value.config.getComponentRegister().getMap()[value.value.name].display}
|
||||||
</div>
|
</div>
|
||||||
<Divider type="vertical"></Divider>
|
<Divider type="vertical"></Divider>
|
||||||
<div style={{ width: 50, textAlign: 'center' }}>{value.value.id.slice(-6)}</div>
|
<div style={{ width: 80, textAlign: 'center' }}>{value.value.id.slice(-6)}</div>
|
||||||
<Divider type="vertical"></Divider>
|
<Divider type="vertical"></Divider>
|
||||||
<div style={{ width: 50, textAlign: 'center' }}>{value.value.position}</div>
|
<div style={{ width: 50, textAlign: 'center' }}>{value.value.position}</div>
|
||||||
<Divider type="vertical"></Divider>
|
<Divider type="vertical"></Divider>
|
||||||
|
@@ -2,9 +2,10 @@
|
|||||||
* @Author: yehuozhili
|
* @Author: yehuozhili
|
||||||
* @Date: 2021-02-25 21:16:58
|
* @Date: 2021-02-25 21:16:58
|
||||||
* @LastEditors: yehuozhili
|
* @LastEditors: yehuozhili
|
||||||
* @LastEditTime: 2021-07-13 14:57:06
|
* @LastEditTime: 2021-07-16 20:22:47
|
||||||
* @FilePath: \dooringx\packages\dooringx-lib\src\config\index.tsx
|
* @FilePath: \dooringx\packages\dooringx-lib\src\config\index.tsx
|
||||||
*/
|
*/
|
||||||
|
import React from 'react';
|
||||||
import { IBlockType, IStoreData } from '../core/store/storetype';
|
import { IBlockType, IStoreData } from '../core/store/storetype';
|
||||||
import { ComponentClass, FunctionComponent, ReactNode } from 'react';
|
import { ComponentClass, FunctionComponent, ReactNode } from 'react';
|
||||||
import { ComponentItemFactory } from '../core/components/abstract';
|
import { ComponentItemFactory } from '../core/components/abstract';
|
||||||
@@ -29,6 +30,7 @@ import { focusState } from '../core/focusHandler/state';
|
|||||||
import ComponentRegister from '../core/components';
|
import ComponentRegister from '../core/components';
|
||||||
import { StoreChanger } from '../core/storeChanger';
|
import { StoreChanger } from '../core/storeChanger';
|
||||||
import Store from '../core/store';
|
import Store from '../core/store';
|
||||||
|
import { VerticalAlignMiddleOutlined } from '@ant-design/icons';
|
||||||
|
|
||||||
// 组件部分
|
// 组件部分
|
||||||
|
|
||||||
@@ -145,6 +147,14 @@ export interface InitConfig {
|
|||||||
* @memberof InitConfig
|
* @memberof InitConfig
|
||||||
*/
|
*/
|
||||||
initFormComponents: Record<string, FunctionComponent<any> | ComponentClass<any, any>>;
|
initFormComponents: Record<string, FunctionComponent<any> | ComponentClass<any, any>>;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* 容器拉伸图标
|
||||||
|
* @type {ReactNode}
|
||||||
|
* @memberof InitConfig
|
||||||
|
*/
|
||||||
|
containerIcon: ReactNode;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const defaultStore: IStoreData = {
|
export const defaultStore: IStoreData = {
|
||||||
@@ -217,6 +227,7 @@ export const defaultConfig: InitConfig = {
|
|||||||
initDataCenterMap: {},
|
initDataCenterMap: {},
|
||||||
initCommandModule: [],
|
initCommandModule: [],
|
||||||
initFormComponents: {},
|
initFormComponents: {},
|
||||||
|
containerIcon: <VerticalAlignMiddleOutlined />,
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -232,6 +243,7 @@ export const defaultConfig: InitConfig = {
|
|||||||
* initDataCenterMap合并
|
* initDataCenterMap合并
|
||||||
* initCommandModule合并
|
* initCommandModule合并
|
||||||
* initFormComponents合并
|
* initFormComponents合并
|
||||||
|
* containerIcon不合并
|
||||||
*
|
*
|
||||||
* @export InitConfig
|
* @export InitConfig
|
||||||
*/
|
*/
|
||||||
@@ -247,6 +259,7 @@ export function userConfigMerge(a: Partial<InitConfig>, b?: Partial<InitConfig>)
|
|||||||
initCommandModule: [],
|
initCommandModule: [],
|
||||||
rightGlobalCustom: null,
|
rightGlobalCustom: null,
|
||||||
initFormComponents: {},
|
initFormComponents: {},
|
||||||
|
containerIcon: null,
|
||||||
};
|
};
|
||||||
if (!b) {
|
if (!b) {
|
||||||
return userConfigMerge(mergeConfig, a);
|
return userConfigMerge(mergeConfig, a);
|
||||||
@@ -257,6 +270,8 @@ export function userConfigMerge(a: Partial<InitConfig>, b?: Partial<InitConfig>)
|
|||||||
? [...a.initStoreData]
|
? [...a.initStoreData]
|
||||||
: [defaultStore];
|
: [defaultStore];
|
||||||
|
|
||||||
|
mergeConfig.containerIcon = b.containerIcon ? b.containerIcon : a.containerIcon;
|
||||||
|
|
||||||
mergeConfig.rightGlobalCustom = b.rightGlobalCustom ? b.rightGlobalCustom : a.rightGlobalCustom;
|
mergeConfig.rightGlobalCustom = b.rightGlobalCustom ? b.rightGlobalCustom : a.rightGlobalCustom;
|
||||||
|
|
||||||
mergeConfig.leftAllRegistMap = b.leftAllRegistMap
|
mergeConfig.leftAllRegistMap = b.leftAllRegistMap
|
||||||
|
@@ -1,16 +0,0 @@
|
|||||||
/*
|
|
||||||
* @Author: yehuozhili
|
|
||||||
* @Date: 2021-07-10 16:52:41
|
|
||||||
* @LastEditors: yehuozhili
|
|
||||||
* @LastEditTime: 2021-07-10 18:28:18
|
|
||||||
* @FilePath: \dooringx\packages\dooringx-lib\src\core\utils\icon.ts
|
|
||||||
*/
|
|
||||||
import { createFromIconfontCN } from '@ant-design/icons';
|
|
||||||
|
|
||||||
export const IconFont = createFromIconfontCN({
|
|
||||||
scriptUrl: '//at.alicdn.com/t/font_2607370_zx7pglxj1m.js', // 在 iconfont.cn 上生成
|
|
||||||
extraCommonProps: {
|
|
||||||
fill: 'currentColor',
|
|
||||||
stroke: 'currentColor',
|
|
||||||
},
|
|
||||||
});
|
|
Reference in New Issue
Block a user