update 0.13.3

This commit is contained in:
yehuozhili
2022-04-07 00:11:31 +08:00
parent bc2004f704
commit 0c9309956c
14 changed files with 58 additions and 18 deletions

View File

@@ -1,3 +1,7 @@
## 0.13.3
修复title失效增加右侧面板配置
## 0.13.2
修复自定义动画可能失效问题。

View File

@@ -5,6 +5,8 @@ nav:
title: Change log
order: 6
---
## 0.13.3
Fix the Title Failure and add the right panel configuration
## 0.13.2
Fixed possible invalidation of custom animation.
## 0.13.1
@@ -38,7 +40,7 @@ Timeline adds auto focus function.
## 0.11.7
Cancel the multi selection adsorption function.
## 0.11.6
Cancel the first mouse click.
Cancel the adsorption of the first mouse click.
Modify the selected color of timeline.
## 0.11.5
Fix reference line adsorption and wrong displacement bug
@@ -99,7 +101,7 @@ The minimum value of canvas drag is changed to 0.
## 0.7.7
Optimize the drag logic of the canvas to move more smoothly.
## 0.7.6
The custom globalconfig function on the right is changed to the custom type
The custom rightglobalcustom type on the right is changed to the function passed in config
## 0.7.5
Change the roller direction.
## 0.7.4
@@ -134,7 +136,7 @@ Remove the runtime export and get all properties from config.
2. Control component adds ruler control.
## 0.3.0
1. Add a ruler. The containerwrapper needs to pass config before it can be used.
2. Modify container minimum drag 667. Fix the inconsistency between the distance between the canvas and the mouse when zooming down and dragging.
2. Drag the smallest container 667. Fix the inconsistency between the distance between the canvas and the mouse when zooming down and dragging.
3. Innercontainerdragup needs to pass config.
## 0.2.0
Modify the transmission of the commander to obtain the config. The commander will no longer be exported from the index. When it needs to be used, it will be obtained from the config. Add the class name on the left to facilitate customization.

View File

@@ -5,6 +5,10 @@ nav:
title: 变更日志
order: 6
---
## 0.13.3
修复title失效增加右侧面板配置
## 0.13.2
修复自定义动画可能失效问题。

View File

@@ -2,7 +2,7 @@
* @Author: yehuozhili
* @Date: 2021-07-17 10:12:11
* @LastEditors: yehuozhili
* @LastEditTime: 2021-08-19 16:52:27
* @LastEditTime: 2022-04-05 21:54:45
* @FilePath: \dooringx\packages\dooringx-example\src\pages\iframeTest.tsx
*/

View File

@@ -1,5 +1,5 @@
{
"version": "0.13.2",
"version": "0.13.3",
"license": "MIT",
"main": "dist/index.js",
"module": "dist/dooringx-lib.esm.js",

View File

@@ -2,7 +2,7 @@
* @Author: yehuozhili
* @Date: 2021-03-14 05:40:37
* @LastEditors: yehuozhili
* @LastEditTime: 2022-04-01 14:29:39
* @LastEditTime: 2022-04-06 22:07:33
* @FilePath: \dooringx\packages\dooringx-lib\src\components\preview.tsx
*/
import Container from './container';
@@ -64,6 +64,10 @@ function Preview(props: PreviewProps): ReactElement {
// 设置全局
const global = props.config.getStore().getData().globalState;
const bodyColor = global?.bodyColor;
const title = global?.title;
if (title) {
document.title = title;
}
if (bodyColor) {
document.body.style.backgroundColor = bodyColor;
}

View File

@@ -2,12 +2,12 @@
* @Author: yehuozhili
* @Date: 2021-03-14 05:42:13
* @LastEditors: yehuozhili
* @LastEditTime: 2022-01-20 12:21:48
* @LastEditTime: 2022-04-06 22:59:57
* @FilePath: \dooringx\packages\dooringx-lib\src\components\rightConfig.tsx
*/
import { CreateOptionsRes } from '../core/components/formTypes';
import { IBlockType, IStoreData } from '../core/store/storetype';
import { CSSProperties, PropsWithChildren, useEffect, useMemo, useState } from 'react';
import { CSSProperties, PropsWithChildren, ReactNode, useEffect, useMemo, useState } from 'react';
import React from 'react';
import { Tabs, Input, Row, Col, Checkbox, InputNumber } from 'antd';
import UserConfig from '../config';
@@ -24,6 +24,8 @@ const colStyle: CSSProperties = {
interface RightConfigProps {
state: IStoreData;
config: UserConfig;
globalExtra?: ReactNode;
modalExtra?: ReactNode;
}
/**
@@ -261,6 +263,7 @@ function RightConfig(props: PropsWithChildren<RightConfigProps>) {
></ColorPicker>
</Col>
</Row>
{props.globalExtra && props.globalExtra}
</div>
)}
{!current && !isEdit && customGlobal && customGlobal(props.config)}
@@ -288,6 +291,7 @@ function RightConfig(props: PropsWithChildren<RightConfigProps>) {
></Checkbox>
</Col>
</Row>
{props.modalExtra && props.modalExtra}
</div>
)}
</div>

View File

@@ -2,7 +2,7 @@
* @Author: yehuozhili
* @Date: 2021-02-25 21:16:58
* @LastEditors: yehuozhili
* @LastEditTime: 2022-04-04 20:17:55
* @LastEditTime: 2022-04-06 22:27:51
* @FilePath: \dooringx\packages\dooringx-lib\src\config\index.tsx
*/
import React from 'react';
@@ -171,7 +171,7 @@ export const defaultStore: IMainStoreData = {
},
globalState: {
containerColor: 'rgba(255,255,255,1)',
title: 'dooring',
title: 'Dooringx',
bodyColor: 'rgba(255,255,255,1)',
script: [],
customAnimate: [],
@@ -507,6 +507,23 @@ export class UserConfig {
return this.commanderRegister;
}
/**
*
* 用于获取当前store数据已判断弹窗编辑 不会储存正在编辑的内容
* @returns
* @memberof UserConfig
*/
getCurrentData() {
let data: IStoreData;
const isEdit = this.storeChanger.isEdit();
if (isEdit) {
data = this.storeChanger.getOrigin()!.now;
} else {
data = this.store.getData();
}
return data;
}
/**
*
* 以默认设置重置配置项

View File

@@ -2,9 +2,10 @@
* @Author: yehuozhili
* @Date: 2021-03-14 04:29:09
* @LastEditors: yehuozhili
* @LastEditTime: 2021-07-10 18:34:34
* @LastEditTime: 2022-04-06 22:21:00
* @FilePath: \dooringx\packages\dooringx-lib\src\core\components\index.ts
*/
import { ComponentItemFactory } from './abstract';
import { ComponentItem } from './componentItem';
/**
@@ -58,6 +59,10 @@ class ComponentRegister {
// console.error(`${item.name} component has registed`);
return;
}
if (!(item instanceof ComponentItemFactory)) {
console.error(item, 'may be a problem in register');
}
this.componentMap[item.name] = item;
this.componentList.push(item);
this.emit();

View File

@@ -2,8 +2,8 @@
* @Author: yehuozhili
* @Date: 2021-04-06 19:33:17
* @LastEditors: yehuozhili
* @LastEditTime: 2021-07-09 16:33:22
* @FilePath: \DooringV2\packages\dooringx-lib\src\core\eventCenter\index.ts
* @LastEditTime: 2022-04-06 17:23:54
* @FilePath: \dooringx\packages\dooringx-lib\src\core\eventCenter\index.ts
*/
import UserConfig from '../../config';
import { FunctionCenter, FunctionCenterType } from '../functionCenter';

View File

@@ -2,7 +2,7 @@
* @Author: yehuozhili
* @Date: 2021-03-14 04:29:09
* @LastEditors: yehuozhili
* @LastEditTime: 2021-08-16 11:18:41
* @LastEditTime: 2022-04-05 17:08:35
* @FilePath: \dooringx\packages\dooringx-lib\src\core\store\index.ts
*/
import { IStoreData } from './storetype';
@@ -47,7 +47,7 @@ class Store {
*
* 重置需要注册事件
* @param {IStoreData[]} initData
* @param {boolean} [check=false] 检查编辑弹窗状态
* @param {boolean} [check=false] 清空编辑弹窗状态
* @memberof Store
*/
resetToInitData(initData: IStoreData[], check = false) {

View File

@@ -2,7 +2,7 @@
* @Author: yehuozhili
* @Date: 2021-04-05 14:55:31
* @LastEditors: yehuozhili
* @LastEditTime: 2021-08-27 10:38:58
* @LastEditTime: 2022-04-05 17:02:34
* @FilePath: \dooringx\packages\dooringx-lib\src\core\storeChanger\index.ts
*/

View File

@@ -1,6 +1,6 @@
{
"name": "dooringx-plugin-template",
"version": "0.13.2",
"version": "0.13.3",
"description": "> TODO: description",
"author": "yehuozhili <673632758@qq.com>",
"homepage": "https://github.com/H5-Dooring/dooringx#readme",

View File

@@ -40,7 +40,7 @@
"@rollup/plugin-node-resolve": "^13.0.4",
"@rollup/plugin-url": "^6.1.0",
"@svgr/rollup": "^5.5.0",
"dooringx-lib": "^0.13.2",
"dooringx-lib": "^0.13.3",
"postcss": "^8.3.6",
"rollup-plugin-peer-deps-external": "^2.2.4",
"rollup-plugin-postcss": "^4.0.1",