diff --git a/Web/src/views/main/_layout/content.vue b/Web/src/views/main/_layout/content.vue index 40cf717..598c5b9 100644 --- a/Web/src/views/main/_layout/content.vue +++ b/Web/src/views/main/_layout/content.vue @@ -35,7 +35,7 @@ >关闭右侧标签页 - + diff --git a/Web/src/views/main/index.vue b/Web/src/views/main/index.vue index 4e24808..fad068b 100644 --- a/Web/src/views/main/index.vue +++ b/Web/src/views/main/index.vue @@ -97,19 +97,15 @@ export default { methods: { /** * 打开一个新的标签页 - * 第一个参数可以是json + * settings: { + * title: String, + * path: String, + * icon: String, + * param: Object, + * closable: Boolean = true, + * } */ - onOpenContentWindow(title, path, icon, closable = true) { - const settings = - typeof title === 'object' - ? title - : { - title, - path, - icon, - closable, - }; - + onOpenContentWindow(settings) { if (settings.path) { const key = settings.key || getNewID(); @@ -134,6 +130,7 @@ export default { title: settings.title || '新建窗口', component: null, path, + param: settings.param, loaded: false, });