update 0.15.2
This commit is contained in:
@@ -1,3 +1,9 @@
|
|||||||
|
## 0.15.2
|
||||||
|
|
||||||
|
修复行内元素编辑预览不一致情况。
|
||||||
|
|
||||||
|
新增行高字号配置项。
|
||||||
|
|
||||||
## 0.15.1
|
## 0.15.1
|
||||||
|
|
||||||
新增useRegistFunc用于注册函数。
|
新增useRegistFunc用于注册函数。
|
||||||
|
@@ -5,6 +5,9 @@ nav:
|
|||||||
title: Change log
|
title: Change log
|
||||||
order: 6
|
order: 6
|
||||||
---
|
---
|
||||||
|
## 0.15.2
|
||||||
|
Fix inconsistencies in line element editing preview.
|
||||||
|
Add line height font size configuration item.
|
||||||
## 0.15.1
|
## 0.15.1
|
||||||
Useregistfunc is added to register functions.
|
Useregistfunc is added to register functions.
|
||||||
Update some documents.
|
Update some documents.
|
||||||
@@ -60,7 +63,7 @@ Change the position of rotation justification
|
|||||||
Fix guide line bug
|
Fix guide line bug
|
||||||
Optimized drag and drop algorithm
|
Optimized drag and drop algorithm
|
||||||
## 0.11.3
|
## 0.11.3
|
||||||
Positive rotation function is added.
|
Increase the function of rotary return.
|
||||||
Optimize mouse style.
|
Optimize mouse style.
|
||||||
## 0.11.2
|
## 0.11.2
|
||||||
Optimize drag speed
|
Optimize drag speed
|
||||||
|
@@ -5,6 +5,12 @@ nav:
|
|||||||
title: 变更日志
|
title: 变更日志
|
||||||
order: 6
|
order: 6
|
||||||
---
|
---
|
||||||
|
## 0.15.2
|
||||||
|
|
||||||
|
修复行内元素编辑预览不一致情况。
|
||||||
|
|
||||||
|
新增行高字号配置项。
|
||||||
|
|
||||||
## 0.15.1
|
## 0.15.1
|
||||||
|
|
||||||
新增useRegistFunc用于注册函数。
|
新增useRegistFunc用于注册函数。
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
* @Author: yehuozhili
|
* @Author: yehuozhili
|
||||||
* @Date: 2021-02-27 21:33:36
|
* @Date: 2021-02-27 21:33:36
|
||||||
* @LastEditors: yehuozhili
|
* @LastEditors: yehuozhili
|
||||||
* @LastEditTime: 2022-04-09 21:55:03
|
* @LastEditTime: 2022-04-29 23:35:58
|
||||||
* @FilePath: \dooringx\packages\dooringx-example\src\plugin\index.tsx
|
* @FilePath: \dooringx\packages\dooringx-example\src\plugin\index.tsx
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -29,13 +29,6 @@ const LeftRegistMap: LeftRegistComponentMapItem[] = [
|
|||||||
img: 'https://img.guguzhu.com/d/file/android/ico/2021/09/08/rytzi2w34tm.png',
|
img: 'https://img.guguzhu.com/d/file/android/ico/2021/09/08/rytzi2w34tm.png',
|
||||||
displayName: '输入框',
|
displayName: '输入框',
|
||||||
},
|
},
|
||||||
{
|
|
||||||
type: 'basic',
|
|
||||||
component: 'test',
|
|
||||||
img: 'https://img.guguzhu.com/d/file/android/ico/2021/09/08/rytzi2w34tm.png',
|
|
||||||
displayName: '测试',
|
|
||||||
urlFn: () => import('./registComponents/testCo'),
|
|
||||||
},
|
|
||||||
];
|
];
|
||||||
|
|
||||||
export const defaultConfig: Partial<InitConfig> = {
|
export const defaultConfig: Partial<InitConfig> = {
|
||||||
|
@@ -1,17 +0,0 @@
|
|||||||
import { ComponentItemFactory } from 'dooringx-lib';
|
|
||||||
|
|
||||||
const TestCo = new ComponentItemFactory(
|
|
||||||
'test',
|
|
||||||
'测试组件',
|
|
||||||
{},
|
|
||||||
{
|
|
||||||
width: 200,
|
|
||||||
height: 55,
|
|
||||||
},
|
|
||||||
() => {
|
|
||||||
return <div>测试</div>;
|
|
||||||
},
|
|
||||||
true
|
|
||||||
);
|
|
||||||
|
|
||||||
export default TestCo;
|
|
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"version": "0.15.1",
|
"version": "0.15.2",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"module": "dist/dooringx-lib.esm.js",
|
"module": "dist/dooringx-lib.esm.js",
|
||||||
|
@@ -180,8 +180,6 @@ function Blocks(props: PropsWithChildren<BlockProps>) {
|
|||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
pointerEvents: 'none',
|
pointerEvents: 'none',
|
||||||
width: '100%',
|
|
||||||
height: '100%',
|
|
||||||
...animationEdit,
|
...animationEdit,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
@@ -205,9 +203,7 @@ function Blocks(props: PropsWithChildren<BlockProps>) {
|
|||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
return (
|
const style = {
|
||||||
<div
|
|
||||||
style={{
|
|
||||||
position: props.data.fixed ? 'fixed' : props.data.position,
|
position: props.data.fixed ? 'fixed' : props.data.position,
|
||||||
top: previewState.top,
|
top: previewState.top,
|
||||||
left: previewState.left,
|
left: previewState.left,
|
||||||
@@ -216,10 +212,28 @@ function Blocks(props: PropsWithChildren<BlockProps>) {
|
|||||||
zIndex: props.data.zIndex,
|
zIndex: props.data.zIndex,
|
||||||
display: props.data.display,
|
display: props.data.display,
|
||||||
transform: `rotate(${props.data.rotate.value}deg)`,
|
transform: `rotate(${props.data.rotate.value}deg)`,
|
||||||
}}
|
};
|
||||||
>
|
return (
|
||||||
|
<>
|
||||||
|
{/* 绝对定位元素 */}
|
||||||
|
{props.data.position !== 'static' && (
|
||||||
|
<div style={style}>
|
||||||
<div style={{ ...animateProps }}>{state}</div>
|
<div style={{ ...animateProps }}>{state}</div>
|
||||||
</div>
|
</div>
|
||||||
|
)}
|
||||||
|
{/* 静态定位 非行内 这里暂不考虑布局影响 */}
|
||||||
|
{props.data.position === 'static' && props.data.display !== 'inline' && (
|
||||||
|
<div style={style}>
|
||||||
|
<div style={{ ...animateProps }}>{state}</div>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
{/* 静态定位 行内 这里暂不考虑布局影响 */}
|
||||||
|
{props.data.position === 'static' && props.data.display === 'inline' && (
|
||||||
|
<span style={style}>
|
||||||
|
<span style={{ ...animateProps }}>{state}</span>
|
||||||
|
</span>
|
||||||
|
)}
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}, [
|
}, [
|
||||||
|
@@ -78,6 +78,8 @@ function Container(props: PropsWithChildren<ContainerProps>) {
|
|||||||
position: 'relative',
|
position: 'relative',
|
||||||
overflow: props.config.containerOverFlow ? 'hidden' : 'visible',
|
overflow: props.config.containerOverFlow ? 'hidden' : 'visible',
|
||||||
cursor: 'default',
|
cursor: 'default',
|
||||||
|
lineHeight: props.state.globalState?.lineHeight ?? 1.575,
|
||||||
|
fontSize: props.state.globalState?.fontSize ?? 14,
|
||||||
...editContainerStyle,
|
...editContainerStyle,
|
||||||
}}
|
}}
|
||||||
{...(props.context === 'edit' ? containerDragResolve(props.config) : null)}
|
{...(props.context === 'edit' ? containerDragResolve(props.config) : null)}
|
||||||
@@ -129,6 +131,8 @@ function Container(props: PropsWithChildren<ContainerProps>) {
|
|||||||
overflow: 'hidden',
|
overflow: 'hidden',
|
||||||
backgroundColor: bgColor(),
|
backgroundColor: bgColor(),
|
||||||
transform: transform,
|
transform: transform,
|
||||||
|
lineHeight: props.state.globalState?.lineHeight ?? 1.575,
|
||||||
|
fontSize: props.state.globalState?.fontSize ?? 14,
|
||||||
...previewContainerStyle,
|
...previewContainerStyle,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
* @Author: yehuozhili
|
* @Author: yehuozhili
|
||||||
* @Date: 2021-03-14 05:42:13
|
* @Date: 2021-03-14 05:42:13
|
||||||
* @LastEditors: yehuozhili
|
* @LastEditors: yehuozhili
|
||||||
* @LastEditTime: 2022-04-23 18:12:53
|
* @LastEditTime: 2022-04-29 23:36:45
|
||||||
* @FilePath: \dooringx\packages\dooringx-lib\src\components\rightConfig.tsx
|
* @FilePath: \dooringx\packages\dooringx-lib\src\components\rightConfig.tsx
|
||||||
*/
|
*/
|
||||||
import { CreateOptionsRes } from '../core/components/formTypes';
|
import { CreateOptionsRes } from '../core/components/formTypes';
|
||||||
@@ -21,6 +21,12 @@ const colStyle: CSSProperties = {
|
|||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
justifyContent: 'flex-end',
|
justifyContent: 'flex-end',
|
||||||
};
|
};
|
||||||
|
const titletStyle: CSSProperties = {
|
||||||
|
display: 'flex',
|
||||||
|
alignItems: 'center',
|
||||||
|
userSelect: 'none',
|
||||||
|
height: 32,
|
||||||
|
};
|
||||||
interface RightConfigProps {
|
interface RightConfigProps {
|
||||||
state: IStoreData;
|
state: IStoreData;
|
||||||
config: UserConfig;
|
config: UserConfig;
|
||||||
@@ -156,7 +162,7 @@ function RightConfig(props: PropsWithChildren<RightConfigProps>) {
|
|||||||
{replaceLocale('right.global', '全局设置', props.config)}
|
{replaceLocale('right.global', '全局设置', props.config)}
|
||||||
</Row>
|
</Row>
|
||||||
<Row style={{ padding: '10px 0' }}>
|
<Row style={{ padding: '10px 0' }}>
|
||||||
<Col span={6} style={{ userSelect: 'none' }}>
|
<Col span={6} style={{ ...titletStyle }}>
|
||||||
{replaceLocale('title', '标题', props.config)}
|
{replaceLocale('title', '标题', props.config)}
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={18} style={colStyle}>
|
<Col span={18} style={colStyle}>
|
||||||
@@ -173,7 +179,7 @@ function RightConfig(props: PropsWithChildren<RightConfigProps>) {
|
|||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
<Row style={{ padding: '10px 0' }}>
|
<Row style={{ padding: '10px 0' }}>
|
||||||
<Col span={6} style={{ userSelect: 'none' }}>
|
<Col span={6} style={{ ...titletStyle }}>
|
||||||
{replaceLocale('right.containerheight', '容器高度', props.config)}
|
{replaceLocale('right.containerheight', '容器高度', props.config)}
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={18} style={colStyle}>
|
<Col span={18} style={colStyle}>
|
||||||
@@ -190,7 +196,7 @@ function RightConfig(props: PropsWithChildren<RightConfigProps>) {
|
|||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
<Row style={{ padding: '10px 0' }}>
|
<Row style={{ padding: '10px 0' }}>
|
||||||
<Col span={6} style={{ userSelect: 'none' }}>
|
<Col span={6} style={{ ...titletStyle }}>
|
||||||
{replaceLocale('right.containerColor', '容器底色', props.config)}
|
{replaceLocale('right.containerColor', '容器底色', props.config)}
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={18} style={colStyle}>
|
<Col span={18} style={colStyle}>
|
||||||
@@ -205,7 +211,7 @@ function RightConfig(props: PropsWithChildren<RightConfigProps>) {
|
|||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
<Row style={{ padding: '10px 0' }}>
|
<Row style={{ padding: '10px 0' }}>
|
||||||
<Col span={6} style={{ userSelect: 'none' }}>
|
<Col span={6} style={{ ...titletStyle }}>
|
||||||
{replaceLocale('right.bodyColor', 'body底色', props.config)}
|
{replaceLocale('right.bodyColor', 'body底色', props.config)}
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={18} style={colStyle}>
|
<Col span={18} style={colStyle}>
|
||||||
@@ -219,6 +225,41 @@ function RightConfig(props: PropsWithChildren<RightConfigProps>) {
|
|||||||
></ColorPicker>
|
></ColorPicker>
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
|
<Row style={{ padding: '10px 0' }}>
|
||||||
|
<Col span={6} style={{ ...titletStyle }}>
|
||||||
|
{replaceLocale('right.lineHeight', '容器行高', props.config)}
|
||||||
|
</Col>
|
||||||
|
<Col span={18} style={colStyle}>
|
||||||
|
<InputNumber
|
||||||
|
min={0}
|
||||||
|
step="0.1"
|
||||||
|
value={props.config.getStore().getData().globalState?.lineHeight ?? 1.575}
|
||||||
|
onChange={(e) => {
|
||||||
|
const val = e;
|
||||||
|
const originData = deepcopy(props.config.getStore().getData());
|
||||||
|
originData.globalState.lineHeight = val;
|
||||||
|
props.config.getStore().setData(originData);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
|
<Row style={{ padding: '10px 0' }}>
|
||||||
|
<Col span={6} style={{ ...titletStyle }}>
|
||||||
|
{replaceLocale('right.fontSize', '容器字号', props.config)}
|
||||||
|
</Col>
|
||||||
|
<Col span={18} style={colStyle}>
|
||||||
|
<InputNumber
|
||||||
|
min={0}
|
||||||
|
value={props.config.getStore().getData().globalState?.fontSize ?? 14}
|
||||||
|
onChange={(e) => {
|
||||||
|
const val = e;
|
||||||
|
const originData = deepcopy(props.config.getStore().getData());
|
||||||
|
originData.globalState.fontSize = val;
|
||||||
|
props.config.getStore().setData(originData);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
{props.globalExtra && props.globalExtra}
|
{props.globalExtra && props.globalExtra}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
@@ -229,7 +270,7 @@ function RightConfig(props: PropsWithChildren<RightConfigProps>) {
|
|||||||
{replaceLocale('modal.control', '弹窗配置', props.config)}
|
{replaceLocale('modal.control', '弹窗配置', props.config)}
|
||||||
</Row>
|
</Row>
|
||||||
<Row style={{ padding: '10px 0' }}>
|
<Row style={{ padding: '10px 0' }}>
|
||||||
<Col span={8}>
|
<Col span={8} style={{ ...titletStyle }}>
|
||||||
{replaceLocale('modal.control.remove', '取消点击删除弹窗', props.config)}
|
{replaceLocale('modal.control.remove', '取消点击删除弹窗', props.config)}
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={16} style={{ ...colStyle }}>
|
<Col span={16} style={{ ...colStyle }}>
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
* @Author: yehuozhili
|
* @Author: yehuozhili
|
||||||
* @Date: 2021-02-25 21:16:58
|
* @Date: 2021-02-25 21:16:58
|
||||||
* @LastEditors: yehuozhili
|
* @LastEditors: yehuozhili
|
||||||
* @LastEditTime: 2022-04-23 23:03:56
|
* @LastEditTime: 2022-04-29 23:23:42
|
||||||
* @FilePath: \dooringx\packages\dooringx-lib\src\config\index.tsx
|
* @FilePath: \dooringx\packages\dooringx-lib\src\config\index.tsx
|
||||||
*/
|
*/
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
@@ -174,6 +174,8 @@ export const defaultStore: IMainStoreData = {
|
|||||||
bodyColor: 'rgba(255,255,255,1)',
|
bodyColor: 'rgba(255,255,255,1)',
|
||||||
script: [],
|
script: [],
|
||||||
customAnimate: [],
|
customAnimate: [],
|
||||||
|
lineHeight: 1.575,
|
||||||
|
fontSize: 14,
|
||||||
},
|
},
|
||||||
modalConfig: {},
|
modalConfig: {},
|
||||||
modalEditName: '',
|
modalEditName: '',
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
* @Author: yehuozhili
|
* @Author: yehuozhili
|
||||||
* @Date: 2021-03-14 04:29:09
|
* @Date: 2021-03-14 04:29:09
|
||||||
* @LastEditors: yehuozhili
|
* @LastEditors: yehuozhili
|
||||||
* @LastEditTime: 2022-04-23 17:07:19
|
* @LastEditTime: 2022-04-29 23:15:50
|
||||||
* @FilePath: \dooringx\packages\dooringx-lib\src\core\store\storetype.ts
|
* @FilePath: \dooringx\packages\dooringx-lib\src\core\store\storetype.ts
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -15,6 +15,8 @@ export interface GlobalState {
|
|||||||
title: string;
|
title: string;
|
||||||
bodyColor: string;
|
bodyColor: string;
|
||||||
script: string[];
|
script: string[];
|
||||||
|
lineHeight: number;
|
||||||
|
fontSize: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IStoreData {
|
export interface IStoreData {
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
* @Author: yehuozhili
|
* @Author: yehuozhili
|
||||||
* @Date: 2021-08-27 10:20:23
|
* @Date: 2021-08-27 10:20:23
|
||||||
* @LastEditors: yehuozhili
|
* @LastEditors: yehuozhili
|
||||||
* @LastEditTime: 2022-04-23 18:58:39
|
* @LastEditTime: 2022-04-29 23:23:13
|
||||||
* @FilePath: \dooringx\packages\dooringx-lib\src\locale\en.ts
|
* @FilePath: \dooringx\packages\dooringx-lib\src\locale\en.ts
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -38,6 +38,8 @@ export const en: typeof zhCN = {
|
|||||||
'right.containerheight': 'Container height',
|
'right.containerheight': 'Container height',
|
||||||
'right.containerColor': 'Container background color',
|
'right.containerColor': 'Container background color',
|
||||||
'right.bodyColor': 'Body background color',
|
'right.bodyColor': 'Body background color',
|
||||||
|
'right.fontSize': 'Container font size',
|
||||||
|
'right.lineHeight': 'Container line height',
|
||||||
title: 'Title',
|
title: 'Title',
|
||||||
'system.setting': 'System Settings',
|
'system.setting': 'System Settings',
|
||||||
'settings.openabsorb': 'Turn on adsorption',
|
'settings.openabsorb': 'Turn on adsorption',
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
* @Author: yehuozhili
|
* @Author: yehuozhili
|
||||||
* @Date: 2021-08-27 10:20:15
|
* @Date: 2021-08-27 10:20:15
|
||||||
* @LastEditors: yehuozhili
|
* @LastEditors: yehuozhili
|
||||||
* @LastEditTime: 2022-04-23 18:58:26
|
* @LastEditTime: 2022-04-29 23:19:30
|
||||||
* @FilePath: \dooringx\packages\dooringx-lib\src\locale\zh-CN.ts
|
* @FilePath: \dooringx\packages\dooringx-lib\src\locale\zh-CN.ts
|
||||||
*/
|
*/
|
||||||
export const zhCN = {
|
export const zhCN = {
|
||||||
@@ -35,6 +35,8 @@ export const zhCN = {
|
|||||||
'right.containerheight': '容器高度',
|
'right.containerheight': '容器高度',
|
||||||
'right.containerColor': '容器底色',
|
'right.containerColor': '容器底色',
|
||||||
'right.bodyColor': 'body底色',
|
'right.bodyColor': 'body底色',
|
||||||
|
'right.fontSize': '容器字号',
|
||||||
|
'right.lineHeight': '容器行高',
|
||||||
title: '标题',
|
title: '标题',
|
||||||
'system.setting': '系统设置',
|
'system.setting': '系统设置',
|
||||||
'settings.openabsorb': '开启吸附',
|
'settings.openabsorb': '开启吸附',
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "dooringx-plugin-template",
|
"name": "dooringx-plugin-template",
|
||||||
"version": "0.15.1",
|
"version": "0.15.2",
|
||||||
"description": "> TODO: description",
|
"description": "> TODO: description",
|
||||||
"author": "yehuozhili <673632758@qq.com>",
|
"author": "yehuozhili <673632758@qq.com>",
|
||||||
"homepage": "https://github.com/H5-Dooring/dooringx#readme",
|
"homepage": "https://github.com/H5-Dooring/dooringx#readme",
|
||||||
|
@@ -40,7 +40,7 @@
|
|||||||
"@rollup/plugin-node-resolve": "^13.0.4",
|
"@rollup/plugin-node-resolve": "^13.0.4",
|
||||||
"@rollup/plugin-url": "^6.1.0",
|
"@rollup/plugin-url": "^6.1.0",
|
||||||
"@svgr/rollup": "^5.5.0",
|
"@svgr/rollup": "^5.5.0",
|
||||||
"dooringx-lib": "^0.15.1",
|
"dooringx-lib": "^0.15.2",
|
||||||
"postcss": "^8.3.6",
|
"postcss": "^8.3.6",
|
||||||
"rollup-plugin-peer-deps-external": "^2.2.4",
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
||||||
"rollup-plugin-postcss": "^4.0.1",
|
"rollup-plugin-postcss": "^4.0.1",
|
||||||
|
Reference in New Issue
Block a user