nowarp for explore item title
This commit is contained in:
1 parent
024f36a151
commit
06f9665d6d
3 files changed
+38
-8
No files matched your search
@@ -1185,8 +1185,8 @@ export const Editor: FC<EditorProps> = ({ onUpdate: updateState, data: editor, .
|
|||||||
type="text"
|
type="text"
|
||||||
size="small"
|
size="small"
|
||||||
className={mergeClassNames(
|
className={mergeClassNames(
|
||||||
"b3-editor-button-filter",
|
"b3-editor-filter",
|
||||||
filterOption.filterCase && "b3-editor-button-filter-selected"
|
filterOption.filterCase && "b3-editor-filter-selected"
|
||||||
)}
|
)}
|
||||||
icon={<VscCaseSensitive style={{ width: "18px", height: "18px" }} />}
|
icon={<VscCaseSensitive style={{ width: "18px", height: "18px" }} />}
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
@@ -1201,8 +1201,8 @@ export const Editor: FC<EditorProps> = ({ onUpdate: updateState, data: editor, .
|
|||||||
type="text"
|
type="text"
|
||||||
size="small"
|
size="small"
|
||||||
className={mergeClassNames(
|
className={mergeClassNames(
|
||||||
"b3-editor-button-filter",
|
"b3-editor-filter",
|
||||||
filterOption.filterFocus && "b3-editor-button-filter-selected"
|
filterOption.filterFocus && "b3-editor-filter-selected"
|
||||||
)}
|
)}
|
||||||
icon={<RiFocus3Line />}
|
icon={<RiFocus3Line />}
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
|
|||||||
@@ -804,7 +804,19 @@ export const Explorer: FC = () => {
|
|||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
return <span key={node.path}>{node.title}</span>;
|
return (
|
||||||
|
<div style={{ flex: 1, width: 0, minWidth: 0 }}>
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
whiteSpace: "nowrap",
|
||||||
|
overflow: "hidden",
|
||||||
|
textOverflow: "ellipsis",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{node.title}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
allowDrop={(options) => {
|
allowDrop={(options) => {
|
||||||
@@ -826,6 +838,19 @@ export const Explorer: FC = () => {
|
|||||||
fieldNames={{ key: "title" }}
|
fieldNames={{ key: "title" }}
|
||||||
treeData={nodeTree ? [nodeTree] : []}
|
treeData={nodeTree ? [nodeTree] : []}
|
||||||
draggable={{ icon: false, nodeDraggable: (node) => !!node.isLeaf }}
|
draggable={{ icon: false, nodeDraggable: (node) => !!node.isLeaf }}
|
||||||
|
titleRender={(node) => (
|
||||||
|
<div style={{ flex: 1, width: 0, minWidth: 0 }}>
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
whiteSpace: "nowrap",
|
||||||
|
overflow: "hidden",
|
||||||
|
textOverflow: "ellipsis",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{node.title}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
onSelect={(_, info) => {
|
onSelect={(_, info) => {
|
||||||
const node = info.node;
|
const node = info.node;
|
||||||
if (node && node.isLeaf) {
|
if (node && node.isLeaf) {
|
||||||
|
|||||||
+8
-3
@@ -86,8 +86,13 @@ body {
|
|||||||
cursor: pointer !important;
|
cursor: pointer !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ant-tree .ant-tree-node-content-wrapper {
|
.ant-tree-node-content-wrapper {
|
||||||
padding-left: 0 !important;
|
padding-left: 0 !important;
|
||||||
|
display: inline-flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ant-tree-title {
|
||||||
|
display: contents;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ant-tree-switcher.ant-tree-switcher-noop,
|
.ant-tree-switcher.ant-tree-switcher-noop,
|
||||||
@@ -179,11 +184,11 @@ body {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// editor
|
// editor
|
||||||
.b3-editor-button-filter {
|
.b3-editor-filter {
|
||||||
width: 20px !important;
|
width: 20px !important;
|
||||||
height: 20px !important;
|
height: 20px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.b3-editor-button-filter-selected {
|
.b3-editor-filter-selected {
|
||||||
background-color: var(--b3-color-selected) !important;
|
background-color: var(--b3-color-selected) !important;
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user