浏览代码

fix: Set route_options from links

version-14
Faris Ansari 3 年前
父节点
当前提交
67acd5d22e
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. +6
    -0
      frappe/public/js/frappe/router.js

+ 6
- 0
frappe/public/js/frappe/router.js 查看文件

@@ -58,6 +58,12 @@ $('body').on('click', 'a', function(e) {

if (frappe.router.is_app_route(e.currentTarget.pathname)) {
// target has "/app, this is a v2 style route.

frappe.route_options = {};
let params = new URLSearchParams(e.currentTarget.search);
for (const [key, value] of params) {
frappe.route_options[key] = value;
}
return override(e.currentTarget.pathname + e.currentTarget.hash);
}
});


正在加载...
取消
保存