mirror of
https://github.com/whyour/qinglong.git
synced 2025-05-23 23:06:06 +08:00
修复调试脚本选择脚本
This commit is contained in:
parent
75fca715e3
commit
d4b6cc5e4d
|
@ -80,6 +80,7 @@ const Config = () => {
|
|||
loading={loading}
|
||||
extra={[
|
||||
<TreeSelect
|
||||
treeExpandAction="click"
|
||||
className="config-select"
|
||||
value={select}
|
||||
dropdownStyle={{ maxHeight: 400, overflow: 'auto' }}
|
||||
|
|
|
@ -185,6 +185,7 @@ const Log = () => {
|
|||
isPhone
|
||||
? [
|
||||
<TreeSelect
|
||||
treeExpandAction="click"
|
||||
className="log-select"
|
||||
value={select}
|
||||
dropdownStyle={{ maxHeight: 400, overflow: 'auto' }}
|
||||
|
|
|
@ -57,6 +57,11 @@ const EditModal = ({
|
|||
if (node.key === selectedKey || !value) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (node.type === 'directory') {
|
||||
return;
|
||||
}
|
||||
|
||||
const newMode = LangMap[value.slice(-3)] || '';
|
||||
setCNode(node);
|
||||
setLanguage(newMode);
|
||||
|
@ -136,10 +141,13 @@ const EditModal = ({
|
|||
}, [socketMessage]);
|
||||
|
||||
useEffect(() => {
|
||||
setLog('');
|
||||
if (currentNode) {
|
||||
setCNode(currentNode);
|
||||
setValue(content as string);
|
||||
setSelectedKey(currentNode.key);
|
||||
const newMode = LangMap[value.slice(-3)] || '';
|
||||
setLanguage(newMode);
|
||||
}
|
||||
}, [content, currentNode]);
|
||||
|
||||
|
@ -150,6 +158,7 @@ const EditModal = ({
|
|||
title={
|
||||
<>
|
||||
<TreeSelect
|
||||
treeExpandAction="click"
|
||||
style={{ marginRight: 8, width: 150 }}
|
||||
value={selectedKey}
|
||||
dropdownStyle={{ maxHeight: 400, overflow: 'auto' }}
|
||||
|
|
|
@ -82,7 +82,11 @@ const Script = () => {
|
|||
|
||||
const getDetail = (node: any) => {
|
||||
request
|
||||
.get(`${config.apiPrefix}scripts/${node.title}?path=${node.parent || ''}`)
|
||||
.get(
|
||||
`${config.apiPrefix}scripts/${encodeURIComponent(node.title)}?path=${
|
||||
node.parent || ''
|
||||
}`,
|
||||
)
|
||||
.then(({ code, data }) => {
|
||||
if (code === 200) {
|
||||
setValue(data);
|
||||
|
|
Loading…
Reference in New Issue
Block a user