fix string params for controllers
This commit is contained in:
parent
85acdb3868
commit
3b960e44f3
1 changed files with 11 additions and 8 deletions
|
@ -97,21 +97,24 @@ function dispatchViewEvent(view, eventInfo, eventName, isCancellable) {
|
|||
return eventResult;
|
||||
}
|
||||
|
||||
function getViewEventDetail(view, options, isRestore) {
|
||||
const url = options.url;
|
||||
function getViewEventDetail(view, {state, url, options = {}}, isRestored) {
|
||||
const index = url.indexOf('?');
|
||||
const params = new URLSearchParams(url.substring(index + 1));
|
||||
const searchParams = new URLSearchParams(url.substring(index + 1));
|
||||
const params = {};
|
||||
|
||||
searchParams.forEach((value, key) =>
|
||||
params[key] = value
|
||||
);
|
||||
|
||||
return {
|
||||
detail: {
|
||||
type: view.getAttribute('data-type'),
|
||||
properties: getProperties(view),
|
||||
params: params,
|
||||
isRestored: isRestore,
|
||||
state: options.state,
|
||||
|
||||
params,
|
||||
isRestored,
|
||||
state,
|
||||
// The route options
|
||||
options: options.options || {}
|
||||
options
|
||||
},
|
||||
bubbles: true,
|
||||
cancelable: false
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue