Skip to content

Commit

Permalink
fix #142 自定义按钮添加url功能
Browse files Browse the repository at this point in the history
  • Loading branch information
newpanjing committed Sep 9, 2019
1 parent 6167744 commit 8bd98df
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions simpleui/static/admin/simpleui-x/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
}

window.addEventListener('hashchange', function (e) {
// console.log(e)
// console.log('hash')
if (e.newURL != e.oldURL) {
openByHash()
}
Expand All @@ -25,7 +23,9 @@
}

function changeUrl(data) {
location.href = '#' + (data.url || '/')
if(data.url.indexOf('http')!=0){
location.href = '#' + (data.url || '/')
}
}

window.callback = function () {
Expand Down
3 changes: 2 additions & 1 deletion simpleui/templates/admin/actions.html
Original file line number Diff line number Diff line change
Expand Up @@ -269,12 +269,13 @@
window.open(temp.action_url)
break;
}
console.log('中断后续操作')
return;
}
}
}
}

console.log('执行了')
if (url) {
window.location.href = url;
return;
Expand Down

0 comments on commit 8bd98df

Please sign in to comment.