mirror of
https://github.com/Powerful-517/yys-editor.git
synced 2025-05-23 19:35:24 +00:00
修复截图宽度和新增文件问题
This commit is contained in:
parent
8839c37256
commit
d788fd0867
22
src/App.vue
22
src/App.vue
@ -87,7 +87,24 @@ const handleTabsEdit = (
|
||||
filesStore.closeTab(targetName);
|
||||
} else if (action === 'add') {
|
||||
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;
|
||||
height: 100%; /* 确保内容区域占满父容器 */
|
||||
overflow-y: auto; /* 允许内容滚动 */
|
||||
min-height: 100vh; /* 允许容器扩展 */
|
||||
display: inline-block;
|
||||
max-width: 100%;
|
||||
}
|
||||
</style>
|
@ -42,7 +42,7 @@ export const useFilesStore = defineStore('files', {
|
||||
visibleFiles: (state) => state.fileList.filter(file => file.visible),
|
||||
},
|
||||
actions: {
|
||||
addFile(file: { label: string; name: number }) {
|
||||
addFile(file) {
|
||||
this.fileList.push({...file, visible: true});
|
||||
this.activeFile = file.name;
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user