From ce92b15fe843099cc4ffbb55adda822c1a9102c8 Mon Sep 17 00:00:00 2001 From: 188633308 <188633308@qq.com> Date: Sun, 25 Apr 2021 21:57:46 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E5=85=81=E8=AE=B8=E6=89=93=E5=BC=80?= =?UTF-8?q?=E7=AA=97=E5=8F=A3=E6=97=B6=E4=BC=A0=E5=85=A5=E5=8F=82=E6=95=B0?= =?UTF-8?q?,=E9=80=9A=E8=BF=87props.param=E6=8E=A5=E6=94=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Web/src/views/main/_layout/content.vue | 2 +- Web/src/views/main/index.vue | 21 +++++++++------------ 2 files changed, 10 insertions(+), 13 deletions(-) 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, });