|
|
|
@ -7,6 +7,7 @@ import { getMyComponentList } from '@/api/componentBase';
|
|
|
|
import { updateComponentCodingPath } from '@/store/ideContainer';
|
|
|
|
import { updateComponentCodingPath } from '@/store/ideContainer';
|
|
|
|
import { getComponentBaseInfo } from '@/api/componentDevelopProcess';
|
|
|
|
import { getComponentBaseInfo } from '@/api/componentDevelopProcess';
|
|
|
|
import { gitCommit, gitPull } from '@/api/componentGitea';
|
|
|
|
import { gitCommit, gitPull } from '@/api/componentGitea';
|
|
|
|
|
|
|
|
import copy from 'copy-to-clipboard';
|
|
|
|
|
|
|
|
|
|
|
|
const Option = Select.Option;
|
|
|
|
const Option = Select.Option;
|
|
|
|
|
|
|
|
|
|
|
|
@ -102,8 +103,20 @@ const ComponentCoding = () => {
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
const copyGitUrlHandler = () => {
|
|
|
|
const copyGitUrlHandler = () => {
|
|
|
|
navigator.clipboard.writeText(currentComponent.repoHtmlUrl);
|
|
|
|
if (!currentComponent.repoHtmlUrl) {
|
|
|
|
|
|
|
|
Message.error('当前组件没有Git仓库,请选择组件!');
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
const textToCopy = currentComponent.repoHtmlUrl;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const success = copy(textToCopy);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (success) {
|
|
|
|
Message.success('复制成功');
|
|
|
|
Message.success('复制成功');
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else {
|
|
|
|
|
|
|
|
Message.error('复制失败');
|
|
|
|
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
|
|
useEffect(() => {
|
|
|
|
|