update 允许打开窗口时传入参数,通过props.param接收
This commit is contained in:
@@ -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,
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user