mirror of
https://github.com/whyour/qinglong.git
synced 2026-12-01 09:45:36 +08:00
脚本管理支持新增文件
This commit is contained in:
1 parent
646443deb5
commit
0baf0d23ae
9 files changed
+234
-54
No files matched your search
@@ -41,7 +41,7 @@ function getFilterData(keyword: string, data: any) {
|
||||
const Log = ({ headerStyle, isPhone, theme }: any) => {
|
||||
const [title, setTitle] = useState('请选择日志文件');
|
||||
const [value, setValue] = useState('请选择日志文件');
|
||||
const [select, setSelect] = useState();
|
||||
const [select, setSelect] = useState<any>();
|
||||
const [data, setData] = useState<any[]>([]);
|
||||
const [filterData, setFilterData] = useState<any[]>([]);
|
||||
const [loading, setLoading] = useState(false);
|
||||
@@ -84,6 +84,9 @@ const Log = ({ headerStyle, isPhone, theme }: any) => {
|
||||
};
|
||||
|
||||
const onSelect = (value: any, node: any) => {
|
||||
if (node.key === select || !value) {
|
||||
return;
|
||||
}
|
||||
setValue('加载中...');
|
||||
setSelect(value);
|
||||
setTitle(node.parent || node.value);
|
||||
@@ -147,6 +150,7 @@ const Log = ({ headerStyle, isPhone, theme }: any) => {
|
||||
treeData={filterData}
|
||||
showIcon={true}
|
||||
height={height}
|
||||
selectedKeys={[select]}
|
||||
showLine={{ showLeafIcon: true }}
|
||||
onSelect={onTreeSelect}
|
||||
></Tree>
|
||||
|
||||
Reference in new issue
Block a user