fix: 修复迁移后产生的问题,并统一图标按钮的显示方式

pull/81/head
moonrailgun 4 years ago
parent f156fe6410
commit b9c91f243d

@ -1,10 +1,10 @@
import React, { useState, useCallback, useEffect } from 'react'; import React, { useState, useCallback, useEffect } from 'react';
import _isString from 'lodash/isString'; import _isString from 'lodash/isString';
import _isNil from 'lodash/isNil'; import _isNil from 'lodash/isNil';
import { Button, Input, Space } from 'antd'; import { Input, Space } from 'antd';
import { Icon } from '@iconify/react';
import { t } from 'tailchat-shared'; import { t } from 'tailchat-shared';
import { DelayTip } from '../DelayTip'; import { DelayTip } from '../DelayTip';
import { IconBtn } from '../IconBtn';
export type FullModalFieldEditorRenderComponent = React.FC<{ export type FullModalFieldEditorRenderComponent = React.FC<{
value: string; value: string;
@ -86,25 +86,15 @@ const FullModalFieldEditor: React.FC<FullModalFieldProps> = React.memo(
{!isEditing ? ( {!isEditing ? (
<DelayTip title={t('编辑')}> <DelayTip title={t('编辑')}>
<Button <IconBtn icon="mdi:square-edit-outline" onClick={handleEditing} />
icon={<Icon className="anticon" icon="mdi:square-edit-outline" />}
onClick={handleEditing}
/>
</DelayTip> </DelayTip>
) : ( ) : (
<> <>
<DelayTip title={t('取消')}> <DelayTip title={t('取消')}>
<Button <IconBtn icon="mdi:close" onClick={handleEditing} />
icon={<Icon className="anticon" icon="mdi:close" />}
onClick={handleEditing}
/>
</DelayTip> </DelayTip>
<DelayTip title={t('保存变更')}> <DelayTip title={t('保存变更')}>
<Button <IconBtn type="primary" icon="mdi:check" onClick={handleSave} />
type="primary"
icon={<Icon className="anticon" icon="mdi:check" />}
onClick={handleSave}
/>
</DelayTip> </DelayTip>
</> </>
)} )}

@ -1,20 +1,48 @@
import { Icon } from '@iconify/react'; import { Icon } from '@iconify/react';
import { Button, ButtonProps } from 'antd'; import { Button, ButtonProps, Tooltip } from 'antd';
import React from 'react'; import React from 'react';
import { isValidStr } from 'tailchat-shared';
interface IconBtnProps extends ButtonProps { const btnClassName =
'border-0 bg-black bg-opacity-20 text-white text-opacity-80 hover:text-opacity-100 hover:bg-opacity-60';
type IconBtnShapeType = 'circle' | 'square';
function calcShape(
inputShape: IconBtnShapeType = 'circle'
): ButtonProps['shape'] {
if (inputShape === 'circle') {
return 'circle';
}
return 'default';
}
interface IconBtnProps extends Omit<ButtonProps, 'shape'> {
icon: string; icon: string;
iconClassName?: string;
shape?: IconBtnShapeType;
title?: string;
} }
export const IconBtn: React.FC<IconBtnProps> = React.memo( export const IconBtn: React.FC<IconBtnProps> = React.memo(
({ icon, ...props }) => { ({ icon, iconClassName, title, ...props }) => {
return ( const shape = calcShape(props.shape);
<Button
className="border-0 bg-black bg-opacity-30 text-white text-opacity-80 hover:text-opacity-100 hover:bg-opacity-60" const iconEl = (
shape="circle" <span className="anticon">
{...props} <Icon className={iconClassName} icon={icon} />
icon={<Icon className="anticon" icon={icon} />} </span>
/>
); );
const btnEl = (
<Button className={btnClassName} {...props} shape={shape} icon={iconEl} />
);
if (isValidStr(title)) {
return <Tooltip title={title}>{btnEl}</Tooltip>;
} else {
return btnEl;
}
} }
); );
IconBtn.displayName = 'IconBtn'; IconBtn.displayName = 'IconBtn';

@ -1,9 +1,8 @@
import React, { useState } from 'react'; import React, { useState } from 'react';
import { PanelCommonHeader } from '../common/Header'; import { PanelCommonHeader } from '../common/Header';
import { Icon } from '@iconify/react';
import { Button } from 'antd';
import clsx from 'clsx'; import clsx from 'clsx';
import { useIsMobile } from '@/hooks/useIsMobile'; import { useIsMobile } from '@/hooks/useIsMobile';
import { IconBtn } from '@/components/IconBtn';
interface RightPanelType { interface RightPanelType {
name: string; name: string;
@ -54,9 +53,11 @@ export const CommonPanelWrapper: React.FC<CommonPanelWrapperProps> = React.memo(
<PanelCommonHeader <PanelCommonHeader
actions={[ actions={[
// 关闭按钮 // 关闭按钮
<Button <IconBtn
key="close" key="close"
icon={<Icon className="anticon text-2xl" icon="mdi:close" />} shape="square"
icon="mdi:close"
iconClassName="text-2xl"
onClick={() => setRightPanel(undefined)} onClick={() => setRightPanel(undefined)}
/>, />,
]} ]}

@ -1,12 +1,11 @@
import React from 'react'; import React from 'react';
import { t, useGroupPanel } from 'tailchat-shared'; import { t, useGroupPanel } from 'tailchat-shared';
import _isNil from 'lodash/isNil'; import _isNil from 'lodash/isNil';
import { Icon } from '@iconify/react';
import { Button, Tooltip } from 'antd';
import { MembersPanel } from './MembersPanel'; import { MembersPanel } from './MembersPanel';
import { CommonPanelWrapper } from '../common/Wrapper'; import { CommonPanelWrapper } from '../common/Wrapper';
import { usePanelWindow } from '@/hooks/usePanelWindow'; import { usePanelWindow } from '@/hooks/usePanelWindow';
import { OpenedPanelTip } from '@/components/OpenedPanelTip'; import { OpenedPanelTip } from '@/components/OpenedPanelTip';
import { IconBtn } from '@/components/IconBtn';
/** /**
* *
@ -33,30 +32,27 @@ export const GroupPanelWrapper: React.FC<GroupPanelWrapperProps> = React.memo(
<CommonPanelWrapper <CommonPanelWrapper
header={panelInfo.name} header={panelInfo.name}
actions={(setRightPanel) => [ actions={(setRightPanel) => [
<Tooltip key="open" title={t('在新窗口打开')}> <IconBtn
<Button key="open"
icon={ title={t('在新窗口打开')}
<Icon className="anticon text-2xl" icon="mdi:dock-window" /> shape="square"
} icon="mdi:dock-window"
onClick={openPanelWindow} iconClassName="text-2xl"
/> onClick={openPanelWindow}
</Tooltip>, />,
<Tooltip key="members" title={t('成员列表')}> <IconBtn
<Button key="members"
icon={ title={t('成员列表')}
<Icon shape="square"
className="anticon text-2xl" icon="mdi:account-supervisor-outline"
icon="mdi:account-supervisor-outline" iconClassName="text-2xl"
/> onClick={() =>
} setRightPanel({
onClick={() => name: t('成员'),
setRightPanel({ panel: <MembersPanel groupId={props.groupId} />,
name: t('成员'), })
panel: <MembersPanel groupId={props.groupId} />, }
}) />,
}
/>
</Tooltip>,
]} ]}
> >
{props.children} {props.children}

@ -1,7 +1,5 @@
import { ChatBox } from '@/components/ChatBox'; import { ChatBox } from '@/components/ChatBox';
import { UserListItem } from '@/components/UserListItem'; import { UserListItem } from '@/components/UserListItem';
import { Icon } from '@iconify/react';
import { Button, Tooltip } from 'antd';
import React from 'react'; import React from 'react';
import { import {
ChatConverseState, ChatConverseState,
@ -15,6 +13,7 @@ import { openModal } from '@/components/Modal';
import { AppendDMConverseMembers } from '@/components/modals/AppendDMConverseMembers'; import { AppendDMConverseMembers } from '@/components/modals/AppendDMConverseMembers';
import { usePanelWindow } from '@/hooks/usePanelWindow'; import { usePanelWindow } from '@/hooks/usePanelWindow';
import { OpenedPanelTip } from '@/components/OpenedPanelTip'; import { OpenedPanelTip } from '@/components/OpenedPanelTip';
import { IconBtn } from '@/components/IconBtn';
const ConversePanelTitle: React.FC<{ converse: ChatConverseState }> = const ConversePanelTitle: React.FC<{ converse: ChatConverseState }> =
React.memo(({ converse }) => { React.memo(({ converse }) => {
@ -61,52 +60,44 @@ export const ConversePanel: React.FC<ConversePanelProps> = React.memo(
} }
return _compact([ return _compact([
<Tooltip key="open" title={t('在新窗口打开')}> <IconBtn
<Button key="open"
icon={ title={t('在新窗口打开')}
<Icon className="anticon text-2xl" icon="mdi:dock-window" /> shape="square"
} icon="mdi:dock-window"
onClick={openPanelWindow} iconClassName="text-2xl"
/> onClick={openPanelWindow}
</Tooltip>, />,
<Tooltip key="add" title={t('邀请成员')}> <IconBtn
<Button key="add"
icon={ title={t('邀请成员')}
<Icon shape="square"
className="anticon text-2xl" icon="mdi:account-multiple-plus-outline"
icon="mdi:account-multiple-plus-outline" iconClassName="text-2xl"
onClick={() =>
openModal(
<AppendDMConverseMembers
converseId={converse._id}
withoutUserIds={converse.members}
/> />
} )
}
/>,
// 当成员数大于2时显示成员列表按钮
converse.members.length > 2 && (
<IconBtn
key="members"
title={t('成员列表')}
shape="square"
icon="mdi:account-supervisor-outline"
iconClassName="text-2xl"
onClick={() => onClick={() =>
openModal( setRightPanel({
<AppendDMConverseMembers name: t('成员'),
converseId={converse._id} panel: <ConversePanelMembers members={converse.members} />,
withoutUserIds={converse.members} })
/>
)
} }
/> />
</Tooltip>,
// 当成员数大于2时显示成员列表按钮
converse.members.length > 2 && (
<Tooltip key="members" title={t('成员列表')}>
<Button
icon={
<Icon
className="anticon text-2xl"
icon="mdi:account-supervisor-outline"
/>
}
onClick={() =>
setRightPanel({
name: t('成员'),
panel: (
<ConversePanelMembers members={converse.members} />
),
})
}
/>
</Tooltip>
), ),
]); ]);
}} }}

@ -3,10 +3,14 @@
exports[`IconBtn render 1`] = ` exports[`IconBtn render 1`] = `
<div> <div>
<button <button
class="ant-btn ant-btn-circle ant-btn-icon-only border-0 bg-black bg-opacity-30 text-white text-opacity-80 hover:text-opacity-100 hover:bg-opacity-60" class="ant-btn ant-btn-circle ant-btn-icon-only border-0 bg-black bg-opacity-20 text-white text-opacity-80 hover:text-opacity-100 hover:bg-opacity-60"
type="button" type="button"
> >
[iconify icon="mdi:close"] <span
class="anticon"
>
[iconify icon="mdi:close"]
</span>
</button> </button>
</div> </div>
`; `;

@ -5,13 +5,13 @@ import {
showAlert, showAlert,
t, t,
} from 'tailchat-shared'; } from 'tailchat-shared';
import { Button, Tree } from 'antd'; import { Space, Tree } from 'antd';
import type { DataNode } from 'antd/lib/tree'; import type { DataNode } from 'antd/lib/tree';
import { buildTreeDataWithGroupPanel } from './utils'; import { buildTreeDataWithGroupPanel } from './utils';
import { Icon } from '@iconify/react';
import { useGroupPanelTreeDrag } from './useGroupPanelTreeDrag'; import { useGroupPanelTreeDrag } from './useGroupPanelTreeDrag';
import { closeModal, openModal } from '@/components/Modal'; import { closeModal, openModal } from '@/components/Modal';
import { ModalModifyGroupPanel } from '../../GroupPanel/ModifyGroupPanel'; import { ModalModifyGroupPanel } from '../../GroupPanel/ModifyGroupPanel';
import { IconBtn } from '@/components/IconBtn';
interface GroupPanelTree { interface GroupPanelTree {
groupId: string; groupId: string;
@ -61,32 +61,36 @@ export const GroupPanelTree: React.FC<GroupPanelTree> = React.memo((props) => {
return ( return (
<div className="flex group"> <div className="flex group">
<span>{node.title}</span> <span>{node.title}</span>
<div className="opacity-0 group-hover:opacity-100"> <div className="opacity-0 group-hover:opacity-100 ml-2">
<Button <Space size="small">
type="text" <IconBtn
size="small" title={t('编辑')}
icon={<Icon className="anticon" icon="mdi:pencil-outline" />} type="text"
onClick={(e) => { size="small"
e.stopPropagation(); icon="mdi:pencil-outline"
e.preventDefault(); onClick={(e) => {
handleModifyPanel(String(node.key)); e.stopPropagation();
}} e.preventDefault();
/> handleModifyPanel(String(node.key));
}}
/>
<Button <IconBtn
type="text" title={t('删除')}
size="small" type="text"
icon={<Icon className="anticon" icon="mdi:trash-can-outline" />} size="small"
onClick={(e) => { icon="mdi:trash-can-outline"
e.stopPropagation(); onClick={(e) => {
e.preventDefault(); e.stopPropagation();
handleDeletePanel( e.preventDefault();
String(node.key), handleDeletePanel(
String(node.title), String(node.key),
!node.isLeaf String(node.title),
); !node.isLeaf
}} );
/> }}
/>
</Space>
</div> </div>
</div> </div>
); );
@ -103,6 +107,7 @@ export const GroupPanelTree: React.FC<GroupPanelTree> = React.memo((props) => {
defaultExpandAll={true} defaultExpandAll={true}
blockNode={true} blockNode={true}
draggable={true} draggable={true}
selectable={false}
titleRender={titleRender} titleRender={titleRender}
onDrop={handleDrop} onDrop={handleDrop}
// TODO: 待简化 https://github.com/react-component/tree/pull/482 // TODO: 待简化 https://github.com/react-component/tree/pull/482

@ -3,12 +3,12 @@
exports[`GroupPanelTree simple render snapshot 1`] = ` exports[`GroupPanelTree simple render snapshot 1`] = `
<div> <div>
<div <div
class="ant-tree ant-tree-icon-hide ant-tree-block-node" class="ant-tree ant-tree-icon-hide ant-tree-block-node ant-tree-unselectable"
role="tree"
> >
<div <div>
role="tree"
>
<input <input
aria-label="for screen reader"
style="width: 0px; height: 0px; display: flex; overflow: hidden; opacity: 0; border: 0px; padding: 0px; margin: 0px;" style="width: 0px; height: 0px; display: flex; overflow: hidden; opacity: 0; border: 0px; padding: 0px; margin: 0px;"
tabindex="0" tabindex="0"
value="" value=""
@ -40,12 +40,37 @@ exports[`GroupPanelTree simple render snapshot 1`] = `
style="display: flex; flex-direction: column;" style="display: flex; flex-direction: column;"
> >
<div <div
class="ant-tree-treenode ant-tree-treenode-switcher-open" aria-grabbed="false"
class="ant-tree-treenode ant-tree-treenode-switcher-open ant-tree-treenode-draggable"
draggable="true"
> >
<span <span
aria-hidden="true" aria-hidden="true"
class="ant-tree-indent" class="ant-tree-indent"
/> />
<span
class="ant-tree-draggable-icon"
>
<span
aria-label="holder"
class="anticon anticon-holder"
role="img"
>
<svg
aria-hidden="true"
data-icon="holder"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M300 276.5a56 56 0 1056-97 56 56 0 00-56 97zm0 284a56 56 0 1056-97 56 56 0 00-56 97zM640 228a56 56 0 10112 0 56 56 0 00-112 0zm0 284a56 56 0 10112 0 56 56 0 00-112 0zM300 844.5a56 56 0 1056-97 56 56 0 00-56 97zM640 796a56 56 0 10112 0 56 56 0 00-112 0z"
/>
</svg>
</span>
</span>
<span <span
class="ant-tree-switcher ant-tree-switcher_open" class="ant-tree-switcher ant-tree-switcher_open"
> >
@ -70,9 +95,7 @@ exports[`GroupPanelTree simple render snapshot 1`] = `
</span> </span>
</span> </span>
<span <span
aria-grabbed="true" class="ant-tree-node-content-wrapper ant-tree-node-content-wrapper-open"
class="ant-tree-node-content-wrapper ant-tree-node-content-wrapper-open draggable"
draggable="true"
title="section-1" title="section-1"
> >
<span <span
@ -85,27 +108,50 @@ exports[`GroupPanelTree simple render snapshot 1`] = `
section-1 section-1
</span> </span>
<div <div
class="opacity-0 group-hover:opacity-100" class="opacity-0 group-hover:opacity-100 ml-2"
> >
<button <div
class="ant-btn ant-btn-text ant-btn-sm ant-btn-icon-only" class="ant-space ant-space-horizontal ant-space-align-center"
type="button"
>
[iconify icon="mdi:pencil-outline"]
</button>
<button
class="ant-btn ant-btn-text ant-btn-sm ant-btn-icon-only"
type="button"
> >
[iconify icon="mdi:trash-can-outline"] <div
</button> class="ant-space-item"
style="margin-right: 8px;"
>
<button
class="ant-btn ant-btn-text ant-btn-circle ant-btn-sm ant-btn-icon-only border-0 bg-black bg-opacity-20 text-white text-opacity-80 hover:text-opacity-100 hover:bg-opacity-60"
type="button"
>
<span
class="anticon"
>
[iconify icon="mdi:pencil-outline"]
</span>
</button>
</div>
<div
class="ant-space-item"
>
<button
class="ant-btn ant-btn-text ant-btn-circle ant-btn-sm ant-btn-icon-only border-0 bg-black bg-opacity-20 text-white text-opacity-80 hover:text-opacity-100 hover:bg-opacity-60"
type="button"
>
<span
class="anticon"
>
[iconify icon="mdi:trash-can-outline"]
</span>
</button>
</div>
</div>
</div> </div>
</div> </div>
</span> </span>
</span> </span>
</div> </div>
<div <div
class="ant-tree-treenode" aria-grabbed="false"
class="ant-tree-treenode ant-tree-treenode-draggable"
draggable="true"
> >
<span <span
aria-hidden="true" aria-hidden="true"
@ -115,13 +161,34 @@ exports[`GroupPanelTree simple render snapshot 1`] = `
class="ant-tree-indent-unit ant-tree-indent-unit-start" class="ant-tree-indent-unit ant-tree-indent-unit-start"
/> />
</span> </span>
<span
class="ant-tree-draggable-icon"
>
<span
aria-label="holder"
class="anticon anticon-holder"
role="img"
>
<svg
aria-hidden="true"
data-icon="holder"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M300 276.5a56 56 0 1056-97 56 56 0 00-56 97zm0 284a56 56 0 1056-97 56 56 0 00-56 97zM640 228a56 56 0 10112 0 56 56 0 00-112 0zm0 284a56 56 0 10112 0 56 56 0 00-112 0zM300 844.5a56 56 0 1056-97 56 56 0 00-56 97zM640 796a56 56 0 10112 0 56 56 0 00-112 0z"
/>
</svg>
</span>
</span>
<span <span
class="ant-tree-switcher ant-tree-switcher-noop" class="ant-tree-switcher ant-tree-switcher-noop"
/> />
<span <span
aria-grabbed="true" class="ant-tree-node-content-wrapper ant-tree-node-content-wrapper-normal"
class="ant-tree-node-content-wrapper ant-tree-node-content-wrapper-normal draggable"
draggable="true"
title="panel-01" title="panel-01"
> >
<span <span
@ -134,27 +201,50 @@ exports[`GroupPanelTree simple render snapshot 1`] = `
panel-01 panel-01
</span> </span>
<div <div
class="opacity-0 group-hover:opacity-100" class="opacity-0 group-hover:opacity-100 ml-2"
> >
<button <div
class="ant-btn ant-btn-text ant-btn-sm ant-btn-icon-only" class="ant-space ant-space-horizontal ant-space-align-center"
type="button"
> >
[iconify icon="mdi:pencil-outline"] <div
</button> class="ant-space-item"
<button style="margin-right: 8px;"
class="ant-btn ant-btn-text ant-btn-sm ant-btn-icon-only" >
type="button" <button
> class="ant-btn ant-btn-text ant-btn-circle ant-btn-sm ant-btn-icon-only border-0 bg-black bg-opacity-20 text-white text-opacity-80 hover:text-opacity-100 hover:bg-opacity-60"
[iconify icon="mdi:trash-can-outline"] type="button"
</button> >
<span
class="anticon"
>
[iconify icon="mdi:pencil-outline"]
</span>
</button>
</div>
<div
class="ant-space-item"
>
<button
class="ant-btn ant-btn-text ant-btn-circle ant-btn-sm ant-btn-icon-only border-0 bg-black bg-opacity-20 text-white text-opacity-80 hover:text-opacity-100 hover:bg-opacity-60"
type="button"
>
<span
class="anticon"
>
[iconify icon="mdi:trash-can-outline"]
</span>
</button>
</div>
</div>
</div> </div>
</div> </div>
</span> </span>
</span> </span>
</div> </div>
<div <div
class="ant-tree-treenode ant-tree-treenode-leaf-last" aria-grabbed="false"
class="ant-tree-treenode ant-tree-treenode-leaf-last ant-tree-treenode-draggable"
draggable="true"
> >
<span <span
aria-hidden="true" aria-hidden="true"
@ -164,13 +254,34 @@ exports[`GroupPanelTree simple render snapshot 1`] = `
class="ant-tree-indent-unit ant-tree-indent-unit-start" class="ant-tree-indent-unit ant-tree-indent-unit-start"
/> />
</span> </span>
<span
class="ant-tree-draggable-icon"
>
<span
aria-label="holder"
class="anticon anticon-holder"
role="img"
>
<svg
aria-hidden="true"
data-icon="holder"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M300 276.5a56 56 0 1056-97 56 56 0 00-56 97zm0 284a56 56 0 1056-97 56 56 0 00-56 97zM640 228a56 56 0 10112 0 56 56 0 00-112 0zm0 284a56 56 0 10112 0 56 56 0 00-112 0zM300 844.5a56 56 0 1056-97 56 56 0 00-56 97zM640 796a56 56 0 10112 0 56 56 0 00-112 0z"
/>
</svg>
</span>
</span>
<span <span
class="ant-tree-switcher ant-tree-switcher-noop" class="ant-tree-switcher ant-tree-switcher-noop"
/> />
<span <span
aria-grabbed="true" class="ant-tree-node-content-wrapper ant-tree-node-content-wrapper-normal"
class="ant-tree-node-content-wrapper ant-tree-node-content-wrapper-normal draggable"
draggable="true"
title="panel-02" title="panel-02"
> >
<span <span
@ -183,32 +294,78 @@ exports[`GroupPanelTree simple render snapshot 1`] = `
panel-02 panel-02
</span> </span>
<div <div
class="opacity-0 group-hover:opacity-100" class="opacity-0 group-hover:opacity-100 ml-2"
> >
<button <div
class="ant-btn ant-btn-text ant-btn-sm ant-btn-icon-only" class="ant-space ant-space-horizontal ant-space-align-center"
type="button"
> >
[iconify icon="mdi:pencil-outline"] <div
</button> class="ant-space-item"
<button style="margin-right: 8px;"
class="ant-btn ant-btn-text ant-btn-sm ant-btn-icon-only" >
type="button" <button
> class="ant-btn ant-btn-text ant-btn-circle ant-btn-sm ant-btn-icon-only border-0 bg-black bg-opacity-20 text-white text-opacity-80 hover:text-opacity-100 hover:bg-opacity-60"
[iconify icon="mdi:trash-can-outline"] type="button"
</button> >
<span
class="anticon"
>
[iconify icon="mdi:pencil-outline"]
</span>
</button>
</div>
<div
class="ant-space-item"
>
<button
class="ant-btn ant-btn-text ant-btn-circle ant-btn-sm ant-btn-icon-only border-0 bg-black bg-opacity-20 text-white text-opacity-80 hover:text-opacity-100 hover:bg-opacity-60"
type="button"
>
<span
class="anticon"
>
[iconify icon="mdi:trash-can-outline"]
</span>
</button>
</div>
</div>
</div> </div>
</div> </div>
</span> </span>
</span> </span>
</div> </div>
<div <div
class="ant-tree-treenode ant-tree-treenode-switcher-open ant-tree-treenode-leaf-last" aria-grabbed="false"
class="ant-tree-treenode ant-tree-treenode-switcher-open ant-tree-treenode-leaf-last ant-tree-treenode-draggable"
draggable="true"
> >
<span <span
aria-hidden="true" aria-hidden="true"
class="ant-tree-indent" class="ant-tree-indent"
/> />
<span
class="ant-tree-draggable-icon"
>
<span
aria-label="holder"
class="anticon anticon-holder"
role="img"
>
<svg
aria-hidden="true"
data-icon="holder"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M300 276.5a56 56 0 1056-97 56 56 0 00-56 97zm0 284a56 56 0 1056-97 56 56 0 00-56 97zM640 228a56 56 0 10112 0 56 56 0 00-112 0zm0 284a56 56 0 10112 0 56 56 0 00-112 0zM300 844.5a56 56 0 1056-97 56 56 0 00-56 97zM640 796a56 56 0 10112 0 56 56 0 00-112 0z"
/>
</svg>
</span>
</span>
<span <span
class="ant-tree-switcher ant-tree-switcher_open" class="ant-tree-switcher ant-tree-switcher_open"
> >
@ -233,9 +390,7 @@ exports[`GroupPanelTree simple render snapshot 1`] = `
</span> </span>
</span> </span>
<span <span
aria-grabbed="true" class="ant-tree-node-content-wrapper ant-tree-node-content-wrapper-open"
class="ant-tree-node-content-wrapper ant-tree-node-content-wrapper-open draggable"
draggable="true"
title="section-2" title="section-2"
> >
<span <span
@ -248,27 +403,50 @@ exports[`GroupPanelTree simple render snapshot 1`] = `
section-2 section-2
</span> </span>
<div <div
class="opacity-0 group-hover:opacity-100" class="opacity-0 group-hover:opacity-100 ml-2"
> >
<button <div
class="ant-btn ant-btn-text ant-btn-sm ant-btn-icon-only" class="ant-space ant-space-horizontal ant-space-align-center"
type="button"
> >
[iconify icon="mdi:pencil-outline"] <div
</button> class="ant-space-item"
<button style="margin-right: 8px;"
class="ant-btn ant-btn-text ant-btn-sm ant-btn-icon-only" >
type="button" <button
> class="ant-btn ant-btn-text ant-btn-circle ant-btn-sm ant-btn-icon-only border-0 bg-black bg-opacity-20 text-white text-opacity-80 hover:text-opacity-100 hover:bg-opacity-60"
[iconify icon="mdi:trash-can-outline"] type="button"
</button> >
<span
class="anticon"
>
[iconify icon="mdi:pencil-outline"]
</span>
</button>
</div>
<div
class="ant-space-item"
>
<button
class="ant-btn ant-btn-text ant-btn-circle ant-btn-sm ant-btn-icon-only border-0 bg-black bg-opacity-20 text-white text-opacity-80 hover:text-opacity-100 hover:bg-opacity-60"
type="button"
>
<span
class="anticon"
>
[iconify icon="mdi:trash-can-outline"]
</span>
</button>
</div>
</div>
</div> </div>
</div> </div>
</span> </span>
</span> </span>
</div> </div>
<div <div
class="ant-tree-treenode" aria-grabbed="false"
class="ant-tree-treenode ant-tree-treenode-draggable"
draggable="true"
> >
<span <span
aria-hidden="true" aria-hidden="true"
@ -278,13 +456,34 @@ exports[`GroupPanelTree simple render snapshot 1`] = `
class="ant-tree-indent-unit ant-tree-indent-unit-end" class="ant-tree-indent-unit ant-tree-indent-unit-end"
/> />
</span> </span>
<span
class="ant-tree-draggable-icon"
>
<span
aria-label="holder"
class="anticon anticon-holder"
role="img"
>
<svg
aria-hidden="true"
data-icon="holder"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M300 276.5a56 56 0 1056-97 56 56 0 00-56 97zm0 284a56 56 0 1056-97 56 56 0 00-56 97zM640 228a56 56 0 10112 0 56 56 0 00-112 0zm0 284a56 56 0 10112 0 56 56 0 00-112 0zM300 844.5a56 56 0 1056-97 56 56 0 00-56 97zM640 796a56 56 0 10112 0 56 56 0 00-112 0z"
/>
</svg>
</span>
</span>
<span <span
class="ant-tree-switcher ant-tree-switcher-noop" class="ant-tree-switcher ant-tree-switcher-noop"
/> />
<span <span
aria-grabbed="true" class="ant-tree-node-content-wrapper ant-tree-node-content-wrapper-normal"
class="ant-tree-node-content-wrapper ant-tree-node-content-wrapper-normal draggable"
draggable="true"
title="panel-11" title="panel-11"
> >
<span <span
@ -297,27 +496,50 @@ exports[`GroupPanelTree simple render snapshot 1`] = `
panel-11 panel-11
</span> </span>
<div <div
class="opacity-0 group-hover:opacity-100" class="opacity-0 group-hover:opacity-100 ml-2"
> >
<button <div
class="ant-btn ant-btn-text ant-btn-sm ant-btn-icon-only" class="ant-space ant-space-horizontal ant-space-align-center"
type="button"
>
[iconify icon="mdi:pencil-outline"]
</button>
<button
class="ant-btn ant-btn-text ant-btn-sm ant-btn-icon-only"
type="button"
> >
[iconify icon="mdi:trash-can-outline"] <div
</button> class="ant-space-item"
style="margin-right: 8px;"
>
<button
class="ant-btn ant-btn-text ant-btn-circle ant-btn-sm ant-btn-icon-only border-0 bg-black bg-opacity-20 text-white text-opacity-80 hover:text-opacity-100 hover:bg-opacity-60"
type="button"
>
<span
class="anticon"
>
[iconify icon="mdi:pencil-outline"]
</span>
</button>
</div>
<div
class="ant-space-item"
>
<button
class="ant-btn ant-btn-text ant-btn-circle ant-btn-sm ant-btn-icon-only border-0 bg-black bg-opacity-20 text-white text-opacity-80 hover:text-opacity-100 hover:bg-opacity-60"
type="button"
>
<span
class="anticon"
>
[iconify icon="mdi:trash-can-outline"]
</span>
</button>
</div>
</div>
</div> </div>
</div> </div>
</span> </span>
</span> </span>
</div> </div>
<div <div
class="ant-tree-treenode ant-tree-treenode-leaf-last" aria-grabbed="false"
class="ant-tree-treenode ant-tree-treenode-leaf-last ant-tree-treenode-draggable"
draggable="true"
> >
<span <span
aria-hidden="true" aria-hidden="true"
@ -327,13 +549,34 @@ exports[`GroupPanelTree simple render snapshot 1`] = `
class="ant-tree-indent-unit ant-tree-indent-unit-end" class="ant-tree-indent-unit ant-tree-indent-unit-end"
/> />
</span> </span>
<span
class="ant-tree-draggable-icon"
>
<span
aria-label="holder"
class="anticon anticon-holder"
role="img"
>
<svg
aria-hidden="true"
data-icon="holder"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M300 276.5a56 56 0 1056-97 56 56 0 00-56 97zm0 284a56 56 0 1056-97 56 56 0 00-56 97zM640 228a56 56 0 10112 0 56 56 0 00-112 0zm0 284a56 56 0 10112 0 56 56 0 00-112 0zM300 844.5a56 56 0 1056-97 56 56 0 00-56 97zM640 796a56 56 0 10112 0 56 56 0 00-112 0z"
/>
</svg>
</span>
</span>
<span <span
class="ant-tree-switcher ant-tree-switcher-noop" class="ant-tree-switcher ant-tree-switcher-noop"
/> />
<span <span
aria-grabbed="true" class="ant-tree-node-content-wrapper ant-tree-node-content-wrapper-normal"
class="ant-tree-node-content-wrapper ant-tree-node-content-wrapper-normal draggable"
draggable="true"
title="panel-12" title="panel-12"
> >
<span <span
@ -346,20 +589,41 @@ exports[`GroupPanelTree simple render snapshot 1`] = `
panel-12 panel-12
</span> </span>
<div <div
class="opacity-0 group-hover:opacity-100" class="opacity-0 group-hover:opacity-100 ml-2"
> >
<button <div
class="ant-btn ant-btn-text ant-btn-sm ant-btn-icon-only" class="ant-space ant-space-horizontal ant-space-align-center"
type="button"
>
[iconify icon="mdi:pencil-outline"]
</button>
<button
class="ant-btn ant-btn-text ant-btn-sm ant-btn-icon-only"
type="button"
> >
[iconify icon="mdi:trash-can-outline"] <div
</button> class="ant-space-item"
style="margin-right: 8px;"
>
<button
class="ant-btn ant-btn-text ant-btn-circle ant-btn-sm ant-btn-icon-only border-0 bg-black bg-opacity-20 text-white text-opacity-80 hover:text-opacity-100 hover:bg-opacity-60"
type="button"
>
<span
class="anticon"
>
[iconify icon="mdi:pencil-outline"]
</span>
</button>
</div>
<div
class="ant-space-item"
>
<button
class="ant-btn ant-btn-text ant-btn-circle ant-btn-sm ant-btn-icon-only border-0 bg-black bg-opacity-20 text-white text-opacity-80 hover:text-opacity-100 hover:bg-opacity-60"
type="button"
>
<span
class="anticon"
>
[iconify icon="mdi:trash-can-outline"]
</span>
</button>
</div>
</div>
</div> </div>
</div> </div>
</span> </span>

Loading…
Cancel
Save