修复脚本与地址栏显示不一致

This commit is contained in:
kilo5hz 2021-12-23 16:32:17 +08:00
parent 04760c53db
commit 133481053e
2 changed files with 7 additions and 5 deletions

View File

@ -116,8 +116,8 @@ export GOBOT_QQ=""
## gotify_url 填写gotify地址,如https://push.example.de:8080
## gotify_token 填写gotify的消息应用token
## gotify_priority 填写推送消息优先级,默认为0
export GOTIFY_URL="";
export GOTIFY_TOKEN="";
export GOTIFY_PRIORITY=0;
export GOTIFY_URL=""
export GOTIFY_TOKEN=""
export GOTIFY_PRIORITY=0
## 其他需要的变量,脚本中需要的变量使用 export 变量名= 声明即可

View File

@ -112,17 +112,19 @@ const Script = ({ headerStyle, isPhone, theme, socketMessage }: any) => {
const initGetScript = () => {
const { p, s } = history.location.query as any;
if (s) {
const vkey = `${p}/${s}`;
const obj = {
node: {
title: s,
value: s,
key: p ? `${p}/${s}` : s,
key: p ? vkey : s,
parent: p,
},
};
setExpandedKeys([p]);
onTreeSelect([`${p}/${s}`], obj);
onTreeSelect([vkey], obj);
}
history.push('/script');
};
const onSelect = (value: any, node: any) => {