update 0.4.2

This commit is contained in:
hufeixiong
2021-07-13 21:18:22 +08:00
parent 213b776886
commit 601ebbbc43
7 changed files with 74 additions and 14 deletions

View File

@@ -3,6 +3,14 @@ title: CHANGELOG
order: 1 order: 1
--- ---
## 0.4.2
修复animate错误初始值。
修改markline样式。
全局设置增加容器高度。
## 0.4.1 ## 0.4.1
去除lib自动导入样式。 去除lib自动导入样式。

View File

@@ -2,13 +2,20 @@
* @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 15:31:15 * @LastEditTime: 2021-07-13 21:09:41
* @FilePath: \dooringx\packages\dooringx-lib\README.md * @FilePath: \dooringx\packages\dooringx-lib\README.md
--> -->
## Dooringx-lib ## Dooringx-lib
## changelog ## changelog
## 0.4.2
修复animate错误初始值。
修改markline样式。
全局设置增加容器高度。
## 0.4.1 ## 0.4.1
去除lib自动导入样式。 去除lib自动导入样式。

View File

@@ -104,11 +104,10 @@ function Blocks(props: PropsWithChildren<BlockProps>) {
}, [props.data.animate]); }, [props.data.animate]);
const animateCount = useMemo(() => { const animateCount = useMemo(() => {
const animate = props.data.animate; const animate = props.data.animate;
if (Object.keys(animate).length > 0) { if (Object.keys(animate).length > 0) {
return { animationIterationCount: animate.animationIterationCount }; return { animationIterationCount: animate.animationIterationCount };
} }
return { animationIterationCount: 1 }; return { animationIterationCount: '' };
}, [props.data.animate]); }, [props.data.animate]);
const render = useMemo(() => { const render = useMemo(() => {
@@ -185,6 +184,7 @@ function Blocks(props: PropsWithChildren<BlockProps>) {
state, state,
props.context, props.context,
props.data, props.data,
props.config,
innerDragData, innerDragData,
animatecss, animatecss,
animateCount, animateCount,

View File

@@ -2,14 +2,14 @@
* @Author: yehuozhili * @Author: yehuozhili
* @Date: 2021-03-14 05:42:13 * @Date: 2021-03-14 05:42:13
* @LastEditors: yehuozhili * @LastEditors: yehuozhili
* @LastEditTime: 2021-07-12 20:36:30 * @LastEditTime: 2021-07-13 21:08:46
* @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';
import { IBlockType, IStoreData } from '../core/store/storetype'; import { IBlockType, IStoreData } from '../core/store/storetype';
import { PropsWithChildren, useEffect, useMemo, useState } from 'react'; import { PropsWithChildren, useEffect, useMemo, useState } from 'react';
import React from 'react'; import React from 'react';
import { Tabs, Input, Row, Col, Checkbox } from 'antd'; import { Tabs, Input, Row, Col, Checkbox, InputNumber } from 'antd';
import UserConfig from '../config'; import UserConfig from '../config';
import { RGBColor, SketchPicker } from 'react-color'; import { RGBColor, SketchPicker } from 'react-color';
import { rgba2Obj } from '../core/utils'; import { rgba2Obj } from '../core/utils';
@@ -151,9 +151,13 @@ function RightConfig(props: PropsWithChildren<RightConfigProps>) {
)} )}
{!current && !isEdit && !customGlobal && ( {!current && !isEdit && !customGlobal && (
<div style={{ padding: '20px' }}> <div style={{ padding: '20px' }}>
<Row style={{ padding: '10 0 20px 0', fontWeight: 'bold' }}></Row> <Row style={{ padding: '10px 0 20px 0', fontWeight: 'bold', userSelect: 'none' }}>
</Row>
<Row style={{ padding: '10px 0' }}> <Row style={{ padding: '10px 0' }}>
<Col span={6}></Col> <Col span={6} style={{ userSelect: 'none' }}>
</Col>
<Col span={18}> <Col span={18}>
<Input <Input
value={title} value={title}
@@ -177,7 +181,36 @@ function RightConfig(props: PropsWithChildren<RightConfigProps>) {
</Col> </Col>
</Row> </Row>
<Row style={{ padding: '10px 0' }}> <Row style={{ padding: '10px 0' }}>
<Col span={6}></Col> <Col span={6} style={{ userSelect: 'none' }}>
</Col>
<Col span={18}>
<InputNumber
min={667}
value={props.config.getStore().getData().container.height}
onChange={(e) => {
const val = e;
console.log(val, 'kkkk');
const isEdit = props.config.getStoreChanger().isEdit();
if (isEdit) {
const originData: IStoreData = deepcopy(
props.config.getStoreChanger().getOrigin()!.now
);
originData.container.height = val;
props.config.getStoreChanger().updateOrigin(originData);
} else {
const originData = deepcopy(props.config.getStore().getData());
originData.container.height = val;
props.config.getStore().setData(originData);
}
}}
/>
</Col>
</Row>
<Row style={{ padding: '10px 0' }}>
<Col span={6} style={{ userSelect: 'none' }}>
</Col>
<Col span={18}> <Col span={18}>
{ {
<div style={{ position: 'relative' }}> <div style={{ position: 'relative' }}>
@@ -243,7 +276,9 @@ function RightConfig(props: PropsWithChildren<RightConfigProps>) {
</Col> </Col>
</Row> </Row>
<Row style={{ padding: '10px 0' }}> <Row style={{ padding: '10px 0' }}>
<Col span={6}>body底色</Col> <Col span={6} style={{ userSelect: 'none' }}>
body底色
</Col>
<Col span={18}> <Col span={18}>
{ {
<div style={{ position: 'relative' }}> <div style={{ position: 'relative' }}>

View File

@@ -2,7 +2,7 @@
* @Author: yehuozhili * @Author: yehuozhili
* @Date: 2021-07-12 15:54:35 * @Date: 2021-07-12 15:54:35
* @LastEditors: yehuozhili * @LastEditors: yehuozhili
* @LastEditTime: 2021-07-12 19:21:35 * @LastEditTime: 2021-07-13 21:07:22
* @FilePath: \dooringx\packages\dooringx-lib\src\components\wrapperMove\ticker.tsx * @FilePath: \dooringx\packages\dooringx-lib\src\components\wrapperMove\ticker.tsx
*/ */
import React, { useEffect, useRef, useState } from 'react'; import React, { useEffect, useRef, useState } from 'react';
@@ -51,6 +51,7 @@ function Ticker(props: { config: UserConfig }) {
height: width, height: width,
display: 'flex', display: 'flex',
justifyContent: 'space-between', justifyContent: 'space-between',
userSelect: 'none',
}} }}
> >
{Array(topRender) {Array(topRender)
@@ -65,6 +66,7 @@ function Ticker(props: { config: UserConfig }) {
width: '1px', width: '1px',
height: '12px', height: '12px',
position: 'relative', position: 'relative',
userSelect: 'none',
}} }}
> >
<div <div
@@ -101,6 +103,7 @@ function Ticker(props: { config: UserConfig }) {
display: 'flex', display: 'flex',
justifyContent: 'space-between', justifyContent: 'space-between',
flexDirection: 'column', flexDirection: 'column',
userSelect: 'none',
}} }}
> >
{Array(leftRender) {Array(leftRender)
@@ -115,6 +118,7 @@ function Ticker(props: { config: UserConfig }) {
width: '12px', width: '12px',
height: '1px', height: '1px',
position: 'relative', position: 'relative',
userSelect: 'none',
}} }}
> >
<div <div
@@ -134,7 +138,12 @@ function Ticker(props: { config: UserConfig }) {
return ( return (
<div <div
key={i} key={i}
style={{ background: 'rgb(204, 204, 204)', width: '6px', height: '1px' }} style={{
background: 'rgb(204, 204, 204)',
width: '6px',
height: '1px',
userSelect: 'none',
}}
></div> ></div>
); );
} }

View File

@@ -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: 2021-07-12 20:59:27 * @LastEditTime: 2021-07-13 20:38:59
* @FilePath: \dooringx\packages\dooringx-lib\src\core\markline\index.tsx * @FilePath: \dooringx\packages\dooringx-lib\src\core\markline\index.tsx
*/ */
import React from 'react'; import React from 'react';
@@ -37,7 +37,7 @@ export function MarklineX(props: any) {
<div <div
className="yh-markline" className="yh-markline"
style={{ style={{
borderTop: '1px dashed black', borderTop: '1px dotted #2196f3',
position: 'absolute', position: 'absolute',
width: '100%', width: '100%',
top: props.top, top: props.top,
@@ -52,7 +52,7 @@ export function MarklineY(props: any) {
<div <div
className="yh-markline" className="yh-markline"
style={{ style={{
borderLeft: '1px dashed black', borderLeft: '1px dotted #2196f3',
position: 'absolute', position: 'absolute',
height: '100%', height: '100%',
left: props.left, left: props.left,

View File

@@ -164,6 +164,7 @@ export function BlockResizer(props: BlockResizerProps) {
{directionArr.map((v) => { {directionArr.map((v) => {
return ( return (
<div <div
key={v}
className={classnames(styles.resizepoint, styles[v])} className={classnames(styles.resizepoint, styles[v])}
onMouseDown={(e) => { onMouseDown={(e) => {
onMouseDown(e, v, props.data, props.rect, props.config); onMouseDown(e, v, props.data, props.rect, props.config);