Unverified Commit 81f7697a authored by gaoyan's avatar gaoyan Committed by GitHub

Added resource center synchronization of oss (#3075)

parent c3ea3843
...@@ -56,6 +56,17 @@ import lombok.extern.slf4j.Slf4j; ...@@ -56,6 +56,17 @@ import lombok.extern.slf4j.Slf4j;
public class ResourceController { public class ResourceController {
private final ResourcesService resourcesService; private final ResourcesService resourcesService;
@GetMapping("/syncRemoteDirectory")
@ApiOperation("Sync Remote Directory Structure")
@Log(title = "Sync Remote Directory Structure", businessType = BusinessType.INSERT)
@SaCheckPermission(PermissionConstants.REGISTRATION_RESOURCE_UPLOAD)
public Result<TreeNodeDTO> syncRemoteDirectoryStructure() {
if (resourcesService.syncRemoteDirectoryStructure()) {
return Result.succeed(Status.SUCCESS);
}
return Result.failed(Status.FAILED);
}
@PostMapping("/createFolder") @PostMapping("/createFolder")
@ApiOperation("Create Folder") @ApiOperation("Create Folder")
@Log(title = "Create Folder", businessType = BusinessType.INSERT) @Log(title = "Create Folder", businessType = BusinessType.INSERT)
......
...@@ -37,17 +37,23 @@ import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer; ...@@ -37,17 +37,23 @@ import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
/** @TableName dinky_resources */ /** @TableName dinky_resources */
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@TableName(value = "dinky_resources") @TableName(value = "dinky_resources")
@Data @Data
@ApiModel(value = "Resources", description = "Resource Information") @ApiModel(value = "Resources", description = "Resource Information")
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class Resources extends Model<Resources> { public class Resources extends Model<Resources> {
@TableId(type = IdType.AUTO) @TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "ID", dataType = "Integer", example = "1", notes = "Unique identifier for the resource") @ApiModelProperty(value = "ID", dataType = "Integer", example = "1", notes = "Unique identifier for the resource")
private Integer id; private Integer id;
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
package org.dinky.service.resource; package org.dinky.service.resource;
import org.dinky.data.exception.DinkyException; import org.dinky.data.exception.DinkyException;
import org.dinky.data.model.Resources;
import org.dinky.data.model.SystemConfiguration; import org.dinky.data.model.SystemConfiguration;
import org.dinky.oss.OssTemplate; import org.dinky.oss.OssTemplate;
import org.dinky.service.resource.impl.HdfsResourceManager; import org.dinky.service.resource.impl.HdfsResourceManager;
...@@ -32,6 +33,7 @@ import org.apache.hadoop.fs.FileSystem; ...@@ -32,6 +33,7 @@ import org.apache.hadoop.fs.FileSystem;
import java.io.File; import java.io.File;
import java.io.InputStream; import java.io.InputStream;
import java.nio.charset.Charset; import java.nio.charset.Charset;
import java.util.List;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
...@@ -54,6 +56,8 @@ public interface BaseResourceManager { ...@@ -54,6 +56,8 @@ public interface BaseResourceManager {
String getFileContent(String path); String getFileContent(String path);
List<Resources> getFullDirectoryStructure(int rootId);
InputStream readFile(String path); InputStream readFile(String path);
static BaseResourceManager getInstance() { static BaseResourceManager getInstance() {
...@@ -102,8 +106,14 @@ public interface BaseResourceManager { ...@@ -102,8 +106,14 @@ public interface BaseResourceManager {
} }
default String getFilePath(String path) { default String getFilePath(String path) {
return FileUtil.normalize( return FileUtil.normalize(FileUtil.file(getBasePath(), path).toString());
FileUtil.file(instances.getResourcesUploadBasePath().getValue(), path) }
.toString());
default String getBasePath() {
String basePath = instances.getResourcesUploadBasePath().getValue();
if (!basePath.endsWith("/")) {
basePath += "/";
}
return basePath;
} }
} }
...@@ -34,6 +34,8 @@ import com.baomidou.mybatisplus.extension.service.IService; ...@@ -34,6 +34,8 @@ import com.baomidou.mybatisplus.extension.service.IService;
public interface ResourcesService extends IService<Resources> { public interface ResourcesService extends IService<Resources> {
boolean syncRemoteDirectoryStructure();
/** /**
* Create a new folder with the specified parameters. * Create a new folder with the specified parameters.
* *
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
package org.dinky.service.resource.impl; package org.dinky.service.resource.impl;
import org.dinky.data.exception.BusException; import org.dinky.data.exception.BusException;
import org.dinky.data.model.Resources;
import org.dinky.service.resource.BaseResourceManager; import org.dinky.service.resource.BaseResourceManager;
import org.apache.hadoop.fs.FSDataOutputStream; import org.apache.hadoop.fs.FSDataOutputStream;
...@@ -29,6 +30,7 @@ import org.apache.hadoop.fs.Path; ...@@ -29,6 +30,7 @@ import org.apache.hadoop.fs.Path;
import java.io.File; import java.io.File;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.util.List;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
...@@ -85,6 +87,11 @@ public class HdfsResourceManager implements BaseResourceManager { ...@@ -85,6 +87,11 @@ public class HdfsResourceManager implements BaseResourceManager {
return IoUtil.readUtf8(readFile(path)); return IoUtil.readUtf8(readFile(path));
} }
@Override
public List<Resources> getFullDirectoryStructure(int rootId) {
throw new RuntimeException("Sync HDFS Not implemented!");
}
@Override @Override
public InputStream readFile(String path) { public InputStream readFile(String path) {
try { try {
......
...@@ -20,12 +20,20 @@ ...@@ -20,12 +20,20 @@
package org.dinky.service.resource.impl; package org.dinky.service.resource.impl;
import org.dinky.data.exception.BusException; import org.dinky.data.exception.BusException;
import org.dinky.data.model.Resources;
import org.dinky.service.resource.BaseResourceManager; import org.dinky.service.resource.BaseResourceManager;
import java.io.BufferedInputStream; import java.io.BufferedInputStream;
import java.io.File; import java.io.File;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.List;
import java.util.Objects;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
...@@ -81,6 +89,40 @@ public class LocalResourceManager implements BaseResourceManager { ...@@ -81,6 +89,40 @@ public class LocalResourceManager implements BaseResourceManager {
return IoUtil.readUtf8(readFile(path)); return IoUtil.readUtf8(readFile(path));
} }
@Override
public List<Resources> getFullDirectoryStructure(int rootId) {
String basePath = getBasePath();
try (Stream<Path> paths = Files.walk(Paths.get(basePath))) {
return paths.map(path -> {
if (path.compareTo(Paths.get(basePath)) == 0) {
// 跳过根目录 | skip root directory
return null;
}
Path parentPath = path.getParent();
String parent = "";
if (parentPath != null) {
parent = parentPath.toString().replace(basePath, "");
}
String self = path.toString().replace(basePath, "");
int pid = parent.isEmpty() ? rootId : parent.hashCode();
File file = new File(path.toString());
return Resources.builder()
.id(self.hashCode())
.pid(pid)
.fullName(self)
.fileName(file.getName())
.isDirectory(file.isDirectory())
.type(0)
.size(file.length())
.build();
})
.filter(Objects::nonNull)
.collect(Collectors.toList());
} catch (IOException e) {
throw new RuntimeException(e);
}
}
@Override @Override
public InputStream readFile(String path) { public InputStream readFile(String path) {
return FileUtil.getInputStream(getFilePath(path)); return FileUtil.getInputStream(getFilePath(path));
......
...@@ -21,16 +21,22 @@ package org.dinky.service.resource.impl; ...@@ -21,16 +21,22 @@ package org.dinky.service.resource.impl;
import org.dinky.data.exception.BusException; import org.dinky.data.exception.BusException;
import org.dinky.data.exception.DinkyException; import org.dinky.data.exception.DinkyException;
import org.dinky.data.model.Resources;
import org.dinky.oss.OssTemplate; import org.dinky.oss.OssTemplate;
import org.dinky.service.resource.BaseResourceManager; import org.dinky.service.resource.BaseResourceManager;
import java.io.File; import java.io.File;
import java.io.InputStream; import java.io.InputStream;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import com.amazonaws.services.s3.model.CopyObjectRequest; import com.amazonaws.services.s3.model.CopyObjectRequest;
import com.amazonaws.services.s3.model.DeleteObjectRequest; import com.amazonaws.services.s3.model.DeleteObjectRequest;
import com.amazonaws.services.s3.model.S3ObjectSummary;
import cn.hutool.core.io.FileUtil; import cn.hutool.core.io.FileUtil;
import cn.hutool.core.io.IoUtil; import cn.hutool.core.io.IoUtil;
...@@ -80,6 +86,43 @@ public class OssResourceManager implements BaseResourceManager { ...@@ -80,6 +86,43 @@ public class OssResourceManager implements BaseResourceManager {
return IoUtil.readUtf8(readFile(path)); return IoUtil.readUtf8(readFile(path));
} }
@Override
public List<Resources> getFullDirectoryStructure(int rootId) {
String basePath = getBasePath();
List<S3ObjectSummary> listBucketObjects =
getOssTemplate().listBucketObjects(getOssTemplate().getBucketName(), basePath);
Map<Integer, Resources> resourcesMap = new HashMap<>();
for (S3ObjectSummary obj : listBucketObjects) {
obj.setKey(obj.getKey().replace(basePath, ""));
if (obj.getKey().isEmpty()) {
continue;
}
String[] split = obj.getKey().split("/");
String parent = "";
for (int i = 0; i < split.length; i++) {
String s = split[i];
int pid = parent.isEmpty() ? rootId : parent.hashCode();
parent = parent + "/" + s;
Resources.ResourcesBuilder builder = Resources.builder()
.id(parent.hashCode())
.pid(pid)
.fullName(parent)
.fileName(s)
.isDirectory(obj.getKey().endsWith("/"))
.size(obj.getSize());
if (i == split.length - 1) {
builder.isDirectory(obj.getKey().endsWith("/"));
} else {
builder.isDirectory(true);
}
resourcesMap.put(parent.hashCode(), builder.build());
}
}
return new ArrayList<>(resourcesMap.values());
}
@Override @Override
public InputStream readFile(String path) { public InputStream readFile(String path) {
return getOssTemplate() return getOssTemplate()
......
...@@ -33,6 +33,7 @@ import java.io.File; ...@@ -33,6 +33,7 @@ import java.io.File;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Comparator; import java.util.Comparator;
import java.util.List; import java.util.List;
import java.util.Map;
import java.util.function.Consumer; import java.util.function.Consumer;
import java.util.function.Function; import java.util.function.Function;
import java.util.stream.Collectors; import java.util.stream.Collectors;
...@@ -56,6 +57,37 @@ public class ResourceServiceImpl extends ServiceImpl<ResourcesMapper, Resources> ...@@ -56,6 +57,37 @@ public class ResourceServiceImpl extends ServiceImpl<ResourcesMapper, Resources>
private static final TimedCache<Integer, Resources> RESOURCES_CACHE = new TimedCache<>(30 * 1000); private static final TimedCache<Integer, Resources> RESOURCES_CACHE = new TimedCache<>(30 * 1000);
private static final long ALLOW_MAX_CAT_CONTENT_SIZE = 10 * 1024 * 1024; private static final long ALLOW_MAX_CAT_CONTENT_SIZE = 10 * 1024 * 1024;
@Override
@Transactional(rollbackFor = Exception.class)
public boolean syncRemoteDirectoryStructure() {
Resources rootResource = getOne(new LambdaQueryWrapper<Resources>().eq(Resources::getPid, -1));
if (rootResource == null) {
throw new BusException("root directory is not exists!! please check database");
}
List<Resources> local = list();
Map<Integer, Resources> localMap =
local.stream().collect(Collectors.toMap(Resources::getId, Function.identity()));
List<Resources> resourcesList =
getBaseResourceManager().getFullDirectoryStructure(rootResource.getId()).stream()
.filter(x -> x.getPid() != -1)
.peek(x -> {
// Restore the existing information. If the remotmap is not available,
// it means that the configuration is out of sync and no processing will be done.
Resources resources = localMap.get(x.getFileName().hashCode());
if (resources != null) {
x.setDescription(resources.getDescription());
x.setType(resources.getType());
x.setUserId(resources.getUserId());
}
})
.collect(Collectors.toList());
// not delete root directory
this.remove(new LambdaQueryWrapper<Resources>().ne(Resources::getPid, -1));
this.saveBatch(resourcesList);
return true;
}
@Override @Override
public TreeNodeDTO createFolder(Integer pid, String fileName, String desc) { public TreeNodeDTO createFolder(Integer pid, String fileName, String desc) {
long count = count( long count = count(
...@@ -212,7 +244,6 @@ public class ResourceServiceImpl extends ServiceImpl<ResourcesMapper, Resources> ...@@ -212,7 +244,6 @@ public class ResourceServiceImpl extends ServiceImpl<ResourcesMapper, Resources>
} }
/** /**
*
* @param pid pid * @param pid pid
* @param desc desc * @param desc desc
* @param uploadAction uploadAction * @param uploadAction uploadAction
...@@ -275,10 +306,6 @@ public class ResourceServiceImpl extends ServiceImpl<ResourcesMapper, Resources> ...@@ -275,10 +306,6 @@ public class ResourceServiceImpl extends ServiceImpl<ResourcesMapper, Resources>
== -1, == -1,
() -> new BusException(Status.ROOT_DIR_NOT_ALLOW_DELETE)); () -> new BusException(Status.ROOT_DIR_NOT_ALLOW_DELETE));
try { try {
if (id < 1) {
// todo 删除主目录,实际是清空
remove(new LambdaQueryWrapper<Resources>().ne(Resources::getId, 0));
}
Resources byId = getById(id); Resources byId = getById(id);
if (isExistsChildren(id)) { if (isExistsChildren(id)) {
if (byId.getIsDirectory()) { if (byId.getIsDirectory()) {
......
...@@ -43,6 +43,8 @@ import com.amazonaws.services.s3.AmazonS3Client; ...@@ -43,6 +43,8 @@ import com.amazonaws.services.s3.AmazonS3Client;
import com.amazonaws.services.s3.model.Bucket; import com.amazonaws.services.s3.model.Bucket;
import com.amazonaws.services.s3.model.CannedAccessControlList; import com.amazonaws.services.s3.model.CannedAccessControlList;
import com.amazonaws.services.s3.model.GeneratePresignedUrlRequest; import com.amazonaws.services.s3.model.GeneratePresignedUrlRequest;
import com.amazonaws.services.s3.model.ListObjectsV2Request;
import com.amazonaws.services.s3.model.ListObjectsV2Result;
import com.amazonaws.services.s3.model.ObjectListing; import com.amazonaws.services.s3.model.ObjectListing;
import com.amazonaws.services.s3.model.ObjectMetadata; import com.amazonaws.services.s3.model.ObjectMetadata;
import com.amazonaws.services.s3.model.PutObjectRequest; import com.amazonaws.services.s3.model.PutObjectRequest;
...@@ -303,6 +305,20 @@ public class OssTemplate { ...@@ -303,6 +305,20 @@ public class OssTemplate {
amazonS3.deleteObject(bucketName, objectName); amazonS3.deleteObject(bucketName, objectName);
} }
public List<S3ObjectSummary> listBucketObjects(String bucketName, String prefix) {
List<S3ObjectSummary> s3ObjectSummaries = new ArrayList<>();
ListObjectsV2Request listObjectsRequest =
new ListObjectsV2Request().withBucketName(bucketName).withPrefix(prefix);
ListObjectsV2Result listing;
do {
listing = amazonS3.listObjectsV2(listObjectsRequest);
s3ObjectSummaries.addAll(listing.getObjectSummaries());
String token = listing.getNextContinuationToken();
listObjectsRequest.setContinuationToken(token);
} while (listing.isTruncated());
return s3ObjectSummaries;
}
public AmazonS3 getAmazonS3() { public AmazonS3 getAmazonS3() {
return amazonS3; return amazonS3;
} }
......
...@@ -972,6 +972,8 @@ export default { ...@@ -972,6 +972,8 @@ export default {
'rc.resource.upload.tip1': 'Click or drag file to this area to upload', 'rc.resource.upload.tip1': 'Click or drag file to this area to upload',
'rc.resource.upload.tip2': 'rc.resource.upload.tip2':
'Support for a single or bulk upload. Strictly prohibited from uploading company data or\n other banned files.', 'Support for a single or bulk upload. Strictly prohibited from uploading company data or\n other banned files.',
'rc.resource.filelist': 'File list',
'rc.resource.sync': 'Sync remote files',
'rc.template.codeType': 'Code Type', 'rc.template.codeType': 'Code Type',
'rc.template.codeTypePlaceholder': 'Please select code type! ', 'rc.template.codeTypePlaceholder': 'Please select code type! ',
'rc.template.create': 'Create UDF Template', 'rc.template.create': 'Create UDF Template',
......
...@@ -930,6 +930,9 @@ export default { ...@@ -930,6 +930,9 @@ export default {
'rc.resource.upload.fail': '文件 【{fileName}】 上传失败', 'rc.resource.upload.fail': '文件 【{fileName}】 上传失败',
'rc.resource.upload.tip1': '点击或拖拽文件到此区域上传', 'rc.resource.upload.tip1': '点击或拖拽文件到此区域上传',
'rc.resource.upload.tip2': '支持单个或批量上传。严禁上传公司数据或其他禁止上传的文件。', 'rc.resource.upload.tip2': '支持单个或批量上传。严禁上传公司数据或其他禁止上传的文件。',
'rc.resource.filelist': '文件列表',
'rc.resource.sync': '同步目录结构',
'rc.template.codeType': '代码类型', 'rc.template.codeType': '代码类型',
'rc.template.codeTypePlaceholder': '请选择代码类型!', 'rc.template.codeTypePlaceholder': '请选择代码类型!',
'rc.template.create': '创建 UDF 模板', 'rc.template.create': '创建 UDF 模板',
......
...@@ -17,9 +17,11 @@ ...@@ -17,9 +17,11 @@
* *
*/ */
import { LoadingBtn } from '@/components/CallBackButton/LoadingBtn';
import { buildResourceTreeData } from '@/pages/RegCenter/Resource/components/FileTree/function'; import { buildResourceTreeData } from '@/pages/RegCenter/Resource/components/FileTree/function';
import { ResourceInfo } from '@/types/RegCenter/data'; import { ResourceInfo } from '@/types/RegCenter/data';
import { Empty, Tree } from 'antd'; import { l } from '@/utils/intl';
import { Divider, Empty, Flex, Tree, Typography } from 'antd';
import React from 'react'; import React from 'react';
const { DirectoryTree } = Tree; const { DirectoryTree } = Tree;
...@@ -28,14 +30,20 @@ type FileTreeProps = { ...@@ -28,14 +30,20 @@ type FileTreeProps = {
treeData: ResourceInfo[]; treeData: ResourceInfo[];
onNodeClick: (info: any) => void; onNodeClick: (info: any) => void;
onRightClick: (info: any) => void; onRightClick: (info: any) => void;
onSync: () => void;
selectedKeys: string[]; selectedKeys: string[];
}; };
const FileTree: React.FC<FileTreeProps> = (props) => { const FileTree: React.FC<FileTreeProps> = (props) => {
const { treeData, selectedKeys, onNodeClick, onRightClick } = props; const { treeData, selectedKeys, onNodeClick, onRightClick, onSync } = props;
return ( return (
<> <>
<Flex justify={'space-between'} align={'center'}>
<Typography.Text>{l('rc.resource.filelist')}</Typography.Text>
<LoadingBtn props={{ type: 'link' }} click={onSync} title={l('rc.resource.sync')} />
</Flex>
<Divider style={{ margin: '8px' }} />
{treeData.length > 0 ? ( {treeData.length > 0 ? (
<DirectoryTree <DirectoryTree
className={'treeList'} className={'treeList'}
......
...@@ -27,7 +27,12 @@ import FileShow from '@/pages/RegCenter/Resource/components/FileShow'; ...@@ -27,7 +27,12 @@ import FileShow from '@/pages/RegCenter/Resource/components/FileShow';
import FileTree from '@/pages/RegCenter/Resource/components/FileTree'; import FileTree from '@/pages/RegCenter/Resource/components/FileTree';
import ResourceModal from '@/pages/RegCenter/Resource/components/ResourceModal'; import ResourceModal from '@/pages/RegCenter/Resource/components/ResourceModal';
import ResourcesUploadModal from '@/pages/RegCenter/Resource/components/ResourcesUploadModal'; import ResourcesUploadModal from '@/pages/RegCenter/Resource/components/ResourcesUploadModal';
import { handleOption, handleRemoveById, queryDataByParams } from '@/services/BusinessCrud'; import {
handleGetOption,
handleOption,
handleRemoveById,
queryDataByParams
} from '@/services/BusinessCrud';
import { API_CONSTANTS } from '@/services/endpoints'; import { API_CONSTANTS } from '@/services/endpoints';
import { ResourceInfo } from '@/types/RegCenter/data'; import { ResourceInfo } from '@/types/RegCenter/data';
import { InitResourceState } from '@/types/RegCenter/init.d'; import { InitResourceState } from '@/types/RegCenter/init.d';
...@@ -180,6 +185,11 @@ const ResourceOverView: React.FC = () => { ...@@ -180,6 +185,11 @@ const ResourceOverView: React.FC = () => {
})); }));
}; };
const handleSync = async () => {
await handleGetOption(API_CONSTANTS.RESOURCE_SYNC_DATA, l('rc.resource.sync'), {});
await refreshTree();
};
/** /**
* the rename cancel * the rename cancel
*/ */
...@@ -260,6 +270,7 @@ const ResourceOverView: React.FC = () => { ...@@ -260,6 +270,7 @@ const ResourceOverView: React.FC = () => {
treeData={resourceState.treeData} treeData={resourceState.treeData}
onRightClick={handleRightClick} onRightClick={handleRightClick}
onNodeClick={(info: any) => handleNodeClick(info)} onNodeClick={(info: any) => handleNodeClick(info)}
onSync={handleSync}
/> />
<RightContextMenu <RightContextMenu
contextMenuPosition={resourceState.contextMenuPosition} contextMenuPosition={resourceState.contextMenuPosition}
......
...@@ -291,6 +291,7 @@ export enum API_CONSTANTS { ...@@ -291,6 +291,7 @@ export enum API_CONSTANTS {
RESOURCE_CREATE_FOLDER = '/api/resource/createFolder', RESOURCE_CREATE_FOLDER = '/api/resource/createFolder',
RESOURCE_RENAME = '/api/resource/rename', RESOURCE_RENAME = '/api/resource/rename',
RESOURCE_UPLOAD = '/api/resource/uploadFile', RESOURCE_UPLOAD = '/api/resource/uploadFile',
RESOURCE_SYNC_DATA = '/api/resource/syncRemoteDirectory',
// catalog // catalog
DELETE_CATALOGUE_BY_ID_URL = '/api/catalogue/deleteCatalogueById', DELETE_CATALOGUE_BY_ID_URL = '/api/catalogue/deleteCatalogueById',
......
...@@ -318,6 +318,6 @@ export type ButtonRoute = { ...@@ -318,6 +318,6 @@ export type ButtonRoute = {
click?: () => any; click?: () => any;
hotKey?: (e: KeyboardEvent) => boolean; hotKey?: (e: KeyboardEvent) => boolean;
hotKeyDesc?: string; hotKeyDesc?: string;
isShow: boolean; isShow?: boolean;
props?: ButtonProps; props?: ButtonProps;
}; };
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment