add nanoid
This commit is contained in:
		| @@ -4,6 +4,7 @@ import { | ||||
| 	FullscreenExitOutlined, | ||||
| 	FullscreenOutlined, | ||||
| 	GatewayOutlined, | ||||
| 	LayoutOutlined, | ||||
| 	MenuOutlined, | ||||
| 	SyncOutlined, | ||||
| 	UnorderedListOutlined, | ||||
| @@ -13,7 +14,6 @@ import React, { CSSProperties, PropsWithChildren, useState } from 'react'; | ||||
| import { UserConfig } from '..'; | ||||
| import { IBlockType, IStoreData } from '../core/store/storetype'; | ||||
| import { deepCopy, arrayMove, changeItem, changeLayer, focusEle } from '../core/utils'; | ||||
|  | ||||
| import { SortEnd, SortableContainer, SortableElement, SortableHandle } from 'react-sortable-hoc'; | ||||
| import { wrapperMoveState } from './wrapperMove/event'; | ||||
| export interface ControlProps { | ||||
| @@ -151,8 +151,13 @@ export function Control(props: PropsWithChildren<ControlProps>) { | ||||
| 				<Popover style={{ minWidth: '208px' }} content={content} trigger="click"> | ||||
| 					<Button icon={<UnorderedListOutlined />}></Button> | ||||
| 				</Popover> | ||||
|  | ||||
| 				{/* <Button icon={<FolderOpenOutlined />}></Button> */} | ||||
| 				<Button | ||||
| 					icon={<LayoutOutlined />} | ||||
| 					onClick={() => { | ||||
| 						props.config.ticker = !props.config.ticker; | ||||
| 						props.config.getStore().forceUpdate(); | ||||
| 					}} | ||||
| 				></Button> | ||||
| 				<Popover | ||||
| 					placement="left" | ||||
| 					content={ | ||||
|   | ||||
| @@ -2,7 +2,7 @@ | ||||
|  * @Author: yehuozhili | ||||
|  * @Date: 2021-03-14 04:29:09 | ||||
|  * @LastEditors: yehuozhili | ||||
|  * @LastEditTime: 2021-07-12 19:47:39 | ||||
|  * @LastEditTime: 2021-07-13 10:49:33 | ||||
|  * @FilePath: \dooringx\packages\dooringx-lib\src\components\wrapperMove\index.tsx | ||||
|  */ | ||||
| import { AllHTMLAttributes, CSSProperties, PropsWithChildren, useRef } from 'react'; | ||||
| @@ -21,6 +21,7 @@ export interface ContainerWrapperProps extends AllHTMLAttributes<HTMLDivElement> | ||||
| function ContainerWrapper(props: PropsWithChildren<ContainerWrapperProps>) { | ||||
| 	const { children, style, classNames, ...rest } = props; | ||||
| 	const ref = useRef<HTMLDivElement>(null); | ||||
| 	const ticker = props.config.ticker; | ||||
| 	return ( | ||||
| 		<div | ||||
| 			className={`ant-menu ${classNames ? classNames : ''}`} | ||||
| @@ -41,7 +42,7 @@ function ContainerWrapper(props: PropsWithChildren<ContainerWrapperProps>) { | ||||
| 			{...rest} | ||||
| 		> | ||||
| 			{children} | ||||
| 			<Ticker config={props.config}></Ticker> | ||||
| 			{ticker && <Ticker config={props.config}></Ticker>} | ||||
| 		</div> | ||||
| 	); | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 hufeixiong
					hufeixiong