feat:css整理

This commit is contained in:
shixiaohua 2024-02-21 13:28:03 +08:00
parent 1d5a56b4b0
commit ef209357c6
9 changed files with 26 additions and 26 deletions

View File

@ -307,16 +307,14 @@ const ItemTree = (prop) => {
<Menu.Item key='6' onClick={() => {setState("")}}>关闭菜单</Menu.Item>
]
return (
<div>
<Menu style={tmpStyle}>
{menuItem}
</Menu>
</div>
)
}
return (
<div style={{height: "100%"}}>
<div style={{height: "100%",width:"200px"}}>
{getNodeTreeRightClickMenu()}
<Search
style={{marginBottom: 8,}}
@ -332,11 +330,13 @@ const ItemTree = (prop) => {
autoExpandParent={autoExpandParent}
showIcon={true}
selectedKeys={[useSelector(state => state.tableBarItem.activeKey)]}
defaultExpandedKeys={useSelector(state => state.tableBarItem.expandedKeyList)}
// defaultExpandedKeys={useSelector(state => state.tableBarItem.expandedKeyList)}
// treeNodes TreeNode key
treeData={defaultValueState}
onSelect={onSelect}
onRightClick={treeNodeOnRightClick}
//
blockNode
/>
</div>
);

View File

@ -1,30 +1,25 @@
@import '~antd/dist/antd.less';
.ant-tree{
overflow: auto scroll;
height: 95.7%;
}
.ant-tree-node-content-wrapper {
display: inline-block;
width: 200px;
white-space: nowrap;
overflow: hidden;
}
.ant-tree-treenode-switcher-close{
display: inline-block;
white-space: nowrap;
text-overflow: ellipsis;
}
.ant-tree-treenode-switcher-close{
display: inline-block;
width: 200px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.ant-tree-treenode-switcher-close{
display: inline-block;
width: 200px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.ant-tree-treenode-switcher-open{
display: inline-block;
width: 200px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.ant-tabs{

View File

@ -73,7 +73,6 @@ function ImportFilePlugin(props) {
useEffect(() => {
if (props.filePath){
importFile(props.filePath).then(value => {
console.log("value",value,isEmpty(value))
if (isEmpty(value)){
return
}
@ -174,10 +173,10 @@ export default function Hlexical(props) {
return (
<LexicalComposer initialConfig={editorConfig}>
<div className="editor-container" style={{height:"100%"}}>
<div className="editor-container">
{/* 富文本插件 */}
<ToolbarPlugin/>
<div className="editor-inner" style={{height:"100%"}}>
<div className="editor-inner">
<RichTextPlugin
contentEditable={<ContentEditable className="editor-input"/>}
placeholder={<Placeholder/>}

View File

@ -50,12 +50,16 @@ body {
text-align: left;
border-top-left-radius: 10px;
border-top-right-radius: 10px;
height: auto;
height: 100%;
}
.toolbar{
height:4.9%;
margin-bottom:0.1%
}
.editor-inner {
background: #fff;
position: relative;
height:95%
}
.editor-input {

View File

@ -75,7 +75,7 @@ const Note = () => {
<p style={{color: colorBgContainer, 'fontSize': 60}}>上善若水</p>
</div>
</Sider>
<Sider trigger={null} collapsedWidth={0} width={217} collapsible collapsed={collapsed}
<Sider trigger={null} collapsedWidth={0} collapsible collapsed={collapsed}
style={{overflow:"auto"}}>
<ItemTree filePath={filePath}></ItemTree>
</Sider>

View File

@ -1,6 +1,6 @@
.HlexicalName {
// 顶上有标题设置100h后下面会多处一部分
// height: 100vh;
height: 100%;
width: auto;
}
.ant-tabs-top .ant-tabs-nav{

View File

@ -157,6 +157,7 @@ export const dirMessageSlice = createSlice({
})
},
dirFileRemove:(state,action)=>{
console.log("dirMessage:dirFileRemove", state, action)
let filePath = action.payload.filePath;
state.data = state.data.filter(file=>{
if (file.filePath === filePath && !file.dirFlag) {
@ -177,7 +178,7 @@ function dirFileRemoveChild(fileList, selectDirKey) {
if (file.filePath === selectDirKey && !file.dirFlag) {
return false
}else if (file.dirFlag && selectDirKey.startsWith(file.filePath) && Array.isArray(file.children) && file.children.length > 0) {
dirFileRemoveChild(file.children, selectDirKey)
file.children = dirFileRemoveChild(file.children, selectDirKey)
return true
}else {
return true

View File

@ -77,6 +77,7 @@ export const tableBarItemSlice = createSlice({
state.expandedKeyList=Array.from(new Set([...state.expandedKeyList]))
},
setExpandedKeys:(state, action)=>{
console.log("tableBarItemSlice:setExpandedKeys",action.payload)
state.expandedKeyList=action.payload
},
removeExpandedKeys:(state, action)=>{

View File

@ -8,7 +8,7 @@ export function getFileFullNameByPath(fileName){
}
export function replaceFileNameByFilePath(filePath,fileName){
let parsedPath = pathOperate.parse(fileName);
let parsedPath = pathOperate.parse(filePath);
return pathOperate.format({"dir":parsedPath.dir,"base":fileName+parsedPath.ext})
}
export function getFileDirByPath(fileName){