添加标签功能 (#1026)

* 添加标签功能
This commit is contained in:
kilo5hz
2022-01-07 22:01:13 +08:00
committed by GitHub
parent 5a5f4b8065
commit 89ed8527d6
7 changed files with 262 additions and 44 deletions
+4 -2
View File
@@ -113,17 +113,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) => {