update 0.4.2
This commit is contained in:
		| @@ -104,11 +104,10 @@ function Blocks(props: PropsWithChildren<BlockProps>) { | ||||
| 	}, [props.data.animate]); | ||||
| 	const animateCount = useMemo(() => { | ||||
| 		const animate = props.data.animate; | ||||
|  | ||||
| 		if (Object.keys(animate).length > 0) { | ||||
| 			return { animationIterationCount: animate.animationIterationCount }; | ||||
| 		} | ||||
| 		return { animationIterationCount: 1 }; | ||||
| 		return { animationIterationCount: '' }; | ||||
| 	}, [props.data.animate]); | ||||
|  | ||||
| 	const render = useMemo(() => { | ||||
| @@ -185,6 +184,7 @@ function Blocks(props: PropsWithChildren<BlockProps>) { | ||||
| 		state, | ||||
| 		props.context, | ||||
| 		props.data, | ||||
| 		props.config, | ||||
| 		innerDragData, | ||||
| 		animatecss, | ||||
| 		animateCount, | ||||
|   | ||||
| @@ -2,14 +2,14 @@ | ||||
|  * @Author: yehuozhili | ||||
|  * @Date: 2021-03-14 05:42:13 | ||||
|  * @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 | ||||
|  */ | ||||
| import { CreateOptionsRes } from '../core/components/formTypes'; | ||||
| import { IBlockType, IStoreData } from '../core/store/storetype'; | ||||
| import { PropsWithChildren, useEffect, useMemo, useState } 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 { RGBColor, SketchPicker } from 'react-color'; | ||||
| import { rgba2Obj } from '../core/utils'; | ||||
| @@ -151,9 +151,13 @@ function RightConfig(props: PropsWithChildren<RightConfigProps>) { | ||||
| 			)} | ||||
| 			{!current && !isEdit && !customGlobal && ( | ||||
| 				<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' }}> | ||||
| 						<Col span={6}>标题</Col> | ||||
| 						<Col span={6} style={{ userSelect: 'none' }}> | ||||
| 							标题 | ||||
| 						</Col> | ||||
| 						<Col span={18}> | ||||
| 							<Input | ||||
| 								value={title} | ||||
| @@ -177,7 +181,36 @@ function RightConfig(props: PropsWithChildren<RightConfigProps>) { | ||||
| 						</Col> | ||||
| 					</Row> | ||||
| 					<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}> | ||||
| 							{ | ||||
| 								<div style={{ position: 'relative' }}> | ||||
| @@ -243,7 +276,9 @@ function RightConfig(props: PropsWithChildren<RightConfigProps>) { | ||||
| 						</Col> | ||||
| 					</Row> | ||||
| 					<Row style={{ padding: '10px 0' }}> | ||||
| 						<Col span={6}>body底色</Col> | ||||
| 						<Col span={6} style={{ userSelect: 'none' }}> | ||||
| 							body底色 | ||||
| 						</Col> | ||||
| 						<Col span={18}> | ||||
| 							{ | ||||
| 								<div style={{ position: 'relative' }}> | ||||
|   | ||||
| @@ -2,7 +2,7 @@ | ||||
|  * @Author: yehuozhili | ||||
|  * @Date: 2021-07-12 15:54:35 | ||||
|  * @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 | ||||
|  */ | ||||
| import React, { useEffect, useRef, useState } from 'react'; | ||||
| @@ -51,6 +51,7 @@ function Ticker(props: { config: UserConfig }) { | ||||
| 					height: width, | ||||
| 					display: 'flex', | ||||
| 					justifyContent: 'space-between', | ||||
| 					userSelect: 'none', | ||||
| 				}} | ||||
| 			> | ||||
| 				{Array(topRender) | ||||
| @@ -65,6 +66,7 @@ function Ticker(props: { config: UserConfig }) { | ||||
| 										width: '1px', | ||||
| 										height: '12px', | ||||
| 										position: 'relative', | ||||
| 										userSelect: 'none', | ||||
| 									}} | ||||
| 								> | ||||
| 									<div | ||||
| @@ -101,6 +103,7 @@ function Ticker(props: { config: UserConfig }) { | ||||
| 					display: 'flex', | ||||
| 					justifyContent: 'space-between', | ||||
| 					flexDirection: 'column', | ||||
| 					userSelect: 'none', | ||||
| 				}} | ||||
| 			> | ||||
| 				{Array(leftRender) | ||||
| @@ -115,6 +118,7 @@ function Ticker(props: { config: UserConfig }) { | ||||
| 										width: '12px', | ||||
| 										height: '1px', | ||||
| 										position: 'relative', | ||||
| 										userSelect: 'none', | ||||
| 									}} | ||||
| 								> | ||||
| 									<div | ||||
| @@ -134,7 +138,12 @@ function Ticker(props: { config: UserConfig }) { | ||||
| 							return ( | ||||
| 								<div | ||||
| 									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> | ||||
| 							); | ||||
| 						} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 hufeixiong
					hufeixiong