mirror of
https://github.com/Powerful-517/yys-editor.git
synced 2025-07-03 10:01:53 +00:00
修复截图宽度和新增文件问题
This commit is contained in:
22
src/App.vue
22
src/App.vue
@ -87,7 +87,24 @@ const handleTabsEdit = (
|
|||||||
filesStore.closeTab(targetName);
|
filesStore.closeTab(targetName);
|
||||||
} else if (action === 'add') {
|
} else if (action === 'add') {
|
||||||
const newFileName = `File ${filesStore.fileList.length + 1}`;
|
const newFileName = `File ${filesStore.fileList.length + 1}`;
|
||||||
filesStore.addFile({ label: newFileName, name: newFileName });
|
|
||||||
|
filesStore.addFile({
|
||||||
|
label: newFileName,
|
||||||
|
name: newFileName,
|
||||||
|
visible: true,
|
||||||
|
groups:[
|
||||||
|
{
|
||||||
|
shortDescription: '',
|
||||||
|
groupInfo: [{}, {}, {}, {}, {}],
|
||||||
|
details: ''
|
||||||
|
},
|
||||||
|
{
|
||||||
|
shortDescription: '',
|
||||||
|
groupInfo: [{}, {}, {}, {}, {}],
|
||||||
|
details: ''
|
||||||
|
}
|
||||||
|
]
|
||||||
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -181,5 +198,8 @@ const activeFileGroups = computed(() => {
|
|||||||
position: relative;
|
position: relative;
|
||||||
height: 100%; /* 确保内容区域占满父容器 */
|
height: 100%; /* 确保内容区域占满父容器 */
|
||||||
overflow-y: auto; /* 允许内容滚动 */
|
overflow-y: auto; /* 允许内容滚动 */
|
||||||
|
min-height: 100vh; /* 允许容器扩展 */
|
||||||
|
display: inline-block;
|
||||||
|
max-width: 100%;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
@ -42,7 +42,7 @@ export const useFilesStore = defineStore('files', {
|
|||||||
visibleFiles: (state) => state.fileList.filter(file => file.visible),
|
visibleFiles: (state) => state.fileList.filter(file => file.visible),
|
||||||
},
|
},
|
||||||
actions: {
|
actions: {
|
||||||
addFile(file: { label: string; name: number }) {
|
addFile(file) {
|
||||||
this.fileList.push({...file, visible: true});
|
this.fileList.push({...file, visible: true});
|
||||||
this.activeFile = file.name;
|
this.activeFile = file.name;
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user