From 62d7a62ce1988cdc7e49b4432576a742eda4e1f9 Mon Sep 17 00:00:00 2001 From: baiqi Date: Wed, 8 Nov 2023 14:36:53 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E7=89=88=E6=9C=AC=E7=AE=A1=E7=90=86):=20?= =?UTF-8?q?=E7=89=88=E6=9C=AC=E7=AE=A1=E7=90=86&=E8=84=91=E5=9B=BE?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../project-management/projectVersion.ts | 60 ++ .../project-management/projectVersion.ts | 9 + frontend/src/assets/images/project_assign.png | Bin 0 -> 2535 bytes .../src/assets/images/project_compare.png | Bin 0 -> 3169 bytes frontend/src/assets/images/project_filter.png | Bin 0 -> 3170 bytes frontend/src/assets/style/arco-reset.less | 6 + frontend/src/assets/style/var.less | 15 + .../pure/minder-editor/locale/en-US.ts | 1 + .../pure/minder-editor/locale/zh-CN.ts | 7 +- .../pure/minder-editor/main/header.vue | 109 +-- .../pure/minder-editor/menu/edit/editDel.vue | 50 +- .../pure/minder-editor/menu/edit/editMenu.vue | 110 ++- .../pure/minder-editor/menu/edit/expand.vue | 25 +- .../minder-editor/menu/edit/insertBox.vue | 56 +- .../pure/minder-editor/menu/edit/moveBox.vue | 36 +- .../minder-editor/menu/edit/sequenceBox.vue | 22 +- .../pure/minder-editor/menu/edit/tagBox.vue | 17 +- .../pure/minder-editor/style/header.less | 276 +------ .../src/components/pure/ms-button/index.vue | 8 +- .../components/pure/ms-table/base-table.vue | 2 +- .../projectManagement/projectVersion.ts | 23 + .../featureCase/components/caseTable.vue | 2 + .../projectVersion/index.vue | 723 ++++++++++++++---- .../projectVersion/locale/en-US.ts | 37 + .../projectVersion/locale/zh-CN.ts | 35 + 25 files changed, 970 insertions(+), 659 deletions(-) create mode 100644 frontend/src/api/modules/project-management/projectVersion.ts create mode 100644 frontend/src/api/requrls/project-management/projectVersion.ts create mode 100644 frontend/src/assets/images/project_assign.png create mode 100644 frontend/src/assets/images/project_compare.png create mode 100644 frontend/src/assets/images/project_filter.png create mode 100644 frontend/src/models/projectManagement/projectVersion.ts create mode 100644 frontend/src/views/project-management/projectAndPermission/projectVersion/locale/en-US.ts create mode 100644 frontend/src/views/project-management/projectAndPermission/projectVersion/locale/zh-CN.ts diff --git a/frontend/src/api/modules/project-management/projectVersion.ts b/frontend/src/api/modules/project-management/projectVersion.ts new file mode 100644 index 0000000000..2e1f0d85e7 --- /dev/null +++ b/frontend/src/api/modules/project-management/projectVersion.ts @@ -0,0 +1,60 @@ +import MSR from '@/api/http'; +import { + AddVersion, + DeleteVersion, + EnableVersion, + GetVersionOptions, + GetVersionStatus, + ToggleVersionStatus, + UpdateVersion, + UseLatestVersion, + VersionPage, +} from '@/api/requrls/project-management/projectVersion'; + +import type { CommonList, TableQueryParams } from '@/models/common'; +import type { ProjectCommon, ProjectItem, ProjectVersionOption } from '@/models/projectManagement/projectVersion'; + +// 更新版本 +export function updateVersion(data: ProjectItem) { + return MSR.post({ url: UpdateVersion, data }); +} + +// 获取版本列表 +export function getVersionList(data: TableQueryParams) { + return MSR.post>({ url: VersionPage, data }); +} + +// 添加版本 +export function addVersion(data: ProjectCommon) { + return MSR.post({ url: AddVersion, data }); +} + +// 切换版本状态 +export function toggleVersionStatus(id: string) { + return MSR.get({ url: ToggleVersionStatus, params: id }); +} + +// 切换最新版本 +export function useLatestVersion(id: string) { + return MSR.get({ url: UseLatestVersion, params: id }); +} + +// 开启/关闭项目版本 +export function toggleVersion(id: string) { + return MSR.get({ url: EnableVersion, params: id }); +} + +// 获取项目版本列表选项 +export function getVersionOptions(id: string) { + return MSR.get({ url: GetVersionOptions, params: id }); +} + +// 获取版本状态 +export function getVersionStatus(id: string) { + return MSR.get({ url: GetVersionStatus, params: id }); +} + +// 删除版本 +export function deleteVersion(id: string) { + return MSR.get({ url: DeleteVersion, params: id }); +} diff --git a/frontend/src/api/requrls/project-management/projectVersion.ts b/frontend/src/api/requrls/project-management/projectVersion.ts new file mode 100644 index 0000000000..1afd376165 --- /dev/null +++ b/frontend/src/api/requrls/project-management/projectVersion.ts @@ -0,0 +1,9 @@ +export const UpdateVersion = '/project/version/update'; // 更新版本 +export const VersionPage = '/project/version/list'; // 版本列表 +export const AddVersion = '/project/version/add'; // 新增版本 +export const ToggleVersionStatus = '/project/version/switch/status'; // 启用/禁用版本 +export const UseLatestVersion = '/project/version/switch/latest'; // 使用最新版本 +export const EnableVersion = '/project/version/switch/enable'; // 启用版本 +export const GetVersionOptions = '/project/version/option'; // 获取版本下拉列表 +export const GetVersionStatus = '/project/version/enable'; // 获取版本状态 +export const DeleteVersion = '/project/version/delete'; // 获取版本状态 diff --git a/frontend/src/assets/images/project_assign.png b/frontend/src/assets/images/project_assign.png new file mode 100644 index 0000000000000000000000000000000000000000..c02ba96e2aafae2ccc73ba803d534b066f840c6d GIT binary patch literal 2535 zcmV*mFkqDE?9AE@JzdM~|R zUj~Db42MG@#FlEcD)qW6tE)BtBSgC=5Z%i314On*q57PEY#%*~kdRd){hrU%TB2ev1?r=&03NQ?EMEJV98}$~!;rUlKs8)d<7}AeK;w z3?Al-%|CB88#7T1-)l7Lm+r&!N%4WEpsguyLU0Ios^2yUZh|110>Po(^})a)j>+V56F45n-!~eKBi~DUUi{~zSPX}OwsvBB z`u<2Y`dPPo`7;PB+7H8dNYNTRD=JR&8T)W$!%4b;&Oek{uh+D&;sgQ_qVtdbUA0jgCg@Ixtwm>t`4qC@J68dlxij8Cj+L`*_W^m%aF#8$SNawjb zU`a~r4kq~l(?lMo9IT~>vFgJ`f!!R7`B#C(d2+MJYg-ERl_uUWBo&yOXg8$bNUo$3 zT%|%?{uH^1QImtA$R;yQK>({sS zvH$<)(mC$Sul{`R@`D{t1d~}Z3GTsbTk`RHU#sZ$Ku5OTXXi5Pj#MAcT!*`)-)Aa^ zGT?a)EAM0`!9ir+x~rpGd%q)&ig@_U2mLc9swoHfKii~Tv+78NmAw0>m-Xx2$1lmY zI`qS){WA8?%7ICtYxlp7-3UD%4|Iyui*q!S<~l~Bm>P+?f1z@OS5i)35(vi`eX$VXn@cL1FDTA6P<@kyiZaPjci!Xh)(=sbs@YG(d(VhUEXRmJR#-7dg8a! zIg1q%1Xr&&bP|)}<74^$`@^}W7;1J=Y~>`QAI_2W-KL!GcePDv<6%<^&u?Z|SL<@`-hCk?N+!X1 z8?N@hz4F?Ye*NVAec9N(75L#GywQl&q>E1_wo>FgG6`<`@uoce=NGC;ZOE7ZJTT&Y^ zv2?+b;Uo@|wLIOusUw_uAWfL$deELka)p8;xkAB_TuI%B^Y^6^630Rl62gtd%nf87 zOG`+Yl>5zbs=-PFt{)vem*hXLDw~^|ObJm!tP>J;yB%rocl9}P#Q9+L!Sl>g$LZ;* zwA<~u&uTWCb3JpUm}E*w2!{y7cKGx}r|$BdBCsSuaO>;qQm-d3ZJDJnu2z(h%n1p9 zK6Uzj^8U9{Q-a(5aH6;j`2X*vB_zb?5(x>TP9^_`lg~wqZ(Rvy z)0GFm-wLk#2F$CX7c*d%mrV8~Bp+OVcneGa+A#vR2(l^pKv3ATKuDBKfp2!yw9`ImLbkg+0uE^kjyz~s1 zjmDa4E|H-;T7ujOBAXFkrq-GioJ^{qm`GNvGGG!C$HJ=#0&c`2i-0mBxkAB_T%q7d zuF!xwJ;sVXRA#&x0k%%Zat%kO4DI3G%B9m@GkF zPL@)FyxCm4(k()F zW3A?!ZkLb&Gg^W?Otb_!t45PJSc0773QLfaYr_)cU6NYESizyj0_!Z0 ztQfJyw}uehGyNtcJ?twzKOazZ#2SdrOo?1f28X9AVK69E1>SFdp#d=B6#{o;seW&rSmQO-1*%I^GgO76)3-w;?v1 x%(S6OcspW*_Zyi;JVGpaCT1}DuW6Sp;764ZsG^LDS%v@r002ovPDHLkV1fb{(&YdE literal 0 HcmV?d00001 diff --git a/frontend/src/assets/images/project_compare.png b/frontend/src/assets/images/project_compare.png new file mode 100644 index 0000000000000000000000000000000000000000..c8e74e442c7b9d072e250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Z z2@OZLxpAWhHyiU&r5D@TP#(|Qe0+Rz@?#VLLC#Vzw=2im54$lGN%8U@rQ>}LcO^p{OPw(95$Zqk>UT^)um8IZT#nG4y5*0sx~|KlJi`4LS~Cgk!zY-T zT~YAf>fkz*N#qx`Zky`Y#x!rY54II3Vi7uZ2lyn*7v7u$%yVw36Eb>;F{*FwkTUgZ zXj>_jnja#@aE&h*lcYm$G%&rE%f(NRFmeF?Hw)6oaUDH}f$bv6Yvk1M0DEwwE!k|s zCnHqvmC-YE{7>@%O%EhF@AxgO#s038jMiPLGPJ@Q+El=^@?}wTHHgK*2!~aoCJxt| zmYUVHU}$Lk!Uu1M{^^bLLve^~N*aj$fIImCo*d-QCttB~Qntx0{^5!mcWZf`Q zG2cqT5OLm-^54`(gY`i9YJml7?C|sOQEKBva z>RU=ji)-Q!Rc@ODV@8N&U=fRy*F3bMuza`s^TFCw#Imk)1kVOHp3utt+yDEXTI zE0b4xQh0z$?}V<9Yn`ZVKwOTthz{E$SNq|Vb&5->!C|H~J{&q7z0{>)l^z9?;9~ba zwkqH1{f*-{HoMtf0z@exa{h>o;|RoVV*7`ISIuhOLtp}rA_hVr-5P6^4~mZY$%}ah zZ^%{Emx-}YOG9S68C1CF%Femyga(ebg-cF7XWot9xr50%{?i1VE4G^T=~`of-!f#` qSLe0Vjmqwj7+~xxb(`@@zn~v*L)v9ijs-4X0)U|&N|&T#AMrn`@9I_n literal 0 HcmV?d00001 diff --git a/frontend/src/assets/style/arco-reset.less b/frontend/src/assets/style/arco-reset.less index e53fbb0073..5879931398 100644 --- a/frontend/src/assets/style/arco-reset.less +++ b/frontend/src/assets/style/arco-reset.less @@ -171,6 +171,12 @@ .btn-text-sec-active(); .btn-text-sec-disabled(); } +.arco-btn-text--danger { + color: rgb(var(--danger-6)) !important; + .btn-text-danger-hover(); + .btn-text-danger-active(); + .btn-text-danger-disabled(); +} .arco-btn-outline { border: 1px solid rgb(var(--primary-5)) !important; color: rgb(var(--primary-5)) !important; diff --git a/frontend/src/assets/style/var.less b/frontend/src/assets/style/var.less index 83e6148be1..5248c3c65c 100644 --- a/frontend/src/assets/style/var.less +++ b/frontend/src/assets/style/var.less @@ -162,6 +162,21 @@ color: rgb(var(--primary-3)) !important; } } +.btn-text-danger-hover() { + &:not(:disabled):hover { + background-color: rgb(var(--danger-1)) !important; + } +} +.btn-text-danger-active() { + &:not(:disabled):active { + background-color: var(--danger-2) !important; + } +} +.btn-text-danger-disabled() { + &:disabled { + color: rgb(var(--danger-2)) !important; + } +} /** 滚动条 **/ .ms-scroll-bar() { diff --git a/frontend/src/components/pure/minder-editor/locale/en-US.ts b/frontend/src/components/pure/minder-editor/locale/en-US.ts index e5b0c38be0..580f066da0 100644 --- a/frontend/src/components/pure/minder-editor/locale/en-US.ts +++ b/frontend/src/components/pure/minder-editor/locale/en-US.ts @@ -22,6 +22,7 @@ export default { expand_six: 'Expand six level', }, insert: { + insert: 'Insert', down: 'Subordinate', up: 'Superior', same: 'Same', diff --git a/frontend/src/components/pure/minder-editor/locale/zh-CN.ts b/frontend/src/components/pure/minder-editor/locale/zh-CN.ts index 8e2e0a8a14..22971627d2 100644 --- a/frontend/src/components/pure/minder-editor/locale/zh-CN.ts +++ b/frontend/src/components/pure/minder-editor/locale/zh-CN.ts @@ -14,14 +14,9 @@ export default { expand: { expand: '展开', folding: '收起', - expand_one: '展开到一级节点', - expand_tow: '展开到二级节点', - expand_three: '展开到三级节点', - expand_four: '展开到四级节点', - expand_five: '展开到五级节点', - expand_six: '展开到六级节点', }, insert: { + insert: '插入', down: '插入下级主题', up: '插入上级主题', same: '插入同级主题', diff --git a/frontend/src/components/pure/minder-editor/main/header.vue b/frontend/src/components/pure/minder-editor/main/header.vue index 645126aa04..2d95948515 100644 --- a/frontend/src/components/pure/minder-editor/main/header.vue +++ b/frontend/src/components/pure/minder-editor/main/header.vue @@ -1,56 +1,31 @@ - - diff --git a/frontend/src/components/pure/minder-editor/menu/edit/editDel.vue b/frontend/src/components/pure/minder-editor/menu/edit/editDel.vue index 6c44be2871..37e5b67788 100644 --- a/frontend/src/components/pure/minder-editor/menu/edit/editDel.vue +++ b/frontend/src/components/pure/minder-editor/menu/edit/editDel.vue @@ -1,17 +1,17 @@ @@ -21,14 +21,13 @@ import { useI18n } from '@/hooks/useI18n'; import { delProps } from '../../props'; - import { isDeleteDisableNode, isDisableNode } from '../../script/tool/utils'; + import { isDeleteDisableNode } from '../../script/tool/utils'; const { t } = useI18n(); const props = defineProps(delProps); let minder = reactive({}); - const textDisabled = ref(true); const removeNodeDisabled = ref(true); function checkDisabled() { @@ -40,7 +39,6 @@ } const node = minder.getSelectedNode(); removeNodeDisabled.value = !node || !!isDeleteDisableNode(minder) || node.parent === null; - textDisabled.value = !node || !!isDisableNode(minder); } onMounted(() => { @@ -52,26 +50,6 @@ }); }); - function editNode() { - if (!minder.queryCommandValue) return; - const editor = window.minderEditor; - const receiverElement = editor.receiver.element; - const { fsm } = editor; - const { receiver } = editor; - - receiverElement.innerText = minder.queryCommandValue('text'); - fsm.jump('input', 'input-request'); - receiver.selectAll(); - } - - function edit() { - if (textDisabled.value || !minder.queryCommandState) { - return; - } - if (minder.queryCommandState('text') !== -1) { - editNode(); - } - } function del() { if (removeNodeDisabled.value || !minder.queryCommandState || !minder.execCommand) { return; diff --git a/frontend/src/components/pure/minder-editor/menu/edit/editMenu.vue b/frontend/src/components/pure/minder-editor/menu/edit/editMenu.vue index 0a4deeaf26..f49137f025 100644 --- a/frontend/src/components/pure/minder-editor/menu/edit/editMenu.vue +++ b/frontend/src/components/pure/minder-editor/menu/edit/editMenu.vue @@ -1,51 +1,97 @@ - + + /** + * 收起 + */ + function folding() { + if (hasSelectedNode.value) { + window.minder?.execCommand('Collapse'); + } else { + window.minder?.execCommand('ExpandToLevel', 1); + } + } + diff --git a/frontend/src/components/pure/minder-editor/menu/edit/expand.vue b/frontend/src/components/pure/minder-editor/menu/edit/expand.vue index 6340ff65e6..975c13a9a9 100644 --- a/frontend/src/components/pure/minder-editor/menu/edit/expand.vue +++ b/frontend/src/components/pure/minder-editor/menu/edit/expand.vue @@ -1,20 +1,7 @@ @@ -23,12 +10,8 @@ const { t } = useI18n(); - function handleCommand(command: string | number | Record | undefined) { - window.minder?.execCommand('ExpandToLevel', command); - } - - function expandAll() { - window.minder?.execCommand('ExpandToLevel', 9999); + function expand() { + window.minder?.execCommand('Expand', 9999); } diff --git a/frontend/src/components/pure/minder-editor/menu/edit/insertBox.vue b/frontend/src/components/pure/minder-editor/menu/edit/insertBox.vue index 1cd84da1e2..e6a90a7c9b 100644 --- a/frontend/src/components/pure/minder-editor/menu/edit/insertBox.vue +++ b/frontend/src/components/pure/minder-editor/menu/edit/insertBox.vue @@ -1,25 +1,23 @@ @@ -64,4 +62,20 @@ minder.value.execCommand(command); } } + + function handleCommand(val: string | number | Record | undefined) { + switch (val) { + case 'down': + execCommand('AppendChildNode'); + break; + case 'up': + execCommand('AppendParentNode'); + break; + case 'same': + execCommand('AppendSiblingNode'); + break; + default: + break; + } + } diff --git a/frontend/src/components/pure/minder-editor/menu/edit/moveBox.vue b/frontend/src/components/pure/minder-editor/menu/edit/moveBox.vue index 6484d29eea..2f85635d56 100644 --- a/frontend/src/components/pure/minder-editor/menu/edit/moveBox.vue +++ b/frontend/src/components/pure/minder-editor/menu/edit/moveBox.vue @@ -1,13 +1,31 @@ diff --git a/frontend/src/components/pure/minder-editor/menu/edit/sequenceBox.vue b/frontend/src/components/pure/minder-editor/menu/edit/sequenceBox.vue index a7dd19ddee..b8f93fc71d 100644 --- a/frontend/src/components/pure/minder-editor/menu/edit/sequenceBox.vue +++ b/frontend/src/components/pure/minder-editor/menu/edit/sequenceBox.vue @@ -1,6 +1,11 @@  @@ -92,10 +93,10 @@ .arco-tag:first-child { margin-left: 4px; } - .add-btn { - padding: 0 !important; - width: 36px; - height: 24px; - border-style: dashed !important; + .disabledTag { + @apply !cursor-not-allowed; + + color: var(--color-text-4); + background-color: var(--color-secondary-disabled); } diff --git a/frontend/src/components/pure/minder-editor/style/header.less b/frontend/src/components/pure/minder-editor/style/header.less index 6da04b0791..e77dded636 100644 --- a/frontend/src/components/pure/minder-editor/style/header.less +++ b/frontend/src/components/pure/minder-editor/style/header.less @@ -3,277 +3,19 @@ @apply h-full w-full; .menu-container { @apply flex; - & > div { - @apply inline-flex flex-wrap items-center overflow-hidden; - border-right: 1px dashed #eeeeee; - } - & > div:last-of-type { - @apply border-r-0; - } - } - .menu-btn { - @apply flex cursor-pointer items-center justify-center; - } - .menu-btn:not([disabled='true']):hover { - background-color: rgb(var(--primary-9)); - } - .menu-btn[disabled='true'] { - opacity: 0.7; - } - .tab-icons { - @apply inline-flex; + height: 60px; + .menu-group { + @apply flex; - width: 20px; - height: 20px; - } - .do-group { - @apply h-full; - - padding: 0 5px; - width: 40px; - p { - @apply m-0 flex items-center justify-center; - - height: 50%; - } - .undo i { - background-position: 0 -1240px; - } - .redo i { - background-position: 0 -1220px; - } - } - .insert-group { - width: 110px; - & > div { - margin: 0 5px; - } - .insert-sibling-box { - i { - background-position: 0 -20px; + padding: 4px 8px; + gap: 4px; + &:not(:last-child) { + border-right: 1px dashed #eeeeee; } - } - .insert-parent-box { - i { - background-position: 0 -40px; + .menu-item { + @apply flex flex-col items-center justify-center; } } } - .edit-del-group, - .move-group { - @apply flex items-center justify-center; - - width: 70px; - } - .move-group { - .move-up { - i { - background-position: 0 -280px; - } - } - .move-down { - i { - background-position: 0 -300px; - } - } - } - .edit-del-group { - .edit { - i { - background-position: 0 -60px; - } - } - .del { - i { - background-position: 0 -80px; - } - } - } - .attachment-group { - @apply flex items-center justify-center; - - width: 185px; - button { - @apply flex items-center justify-center border-none bg-transparent bg-no-repeat p-0 outline-none; - - width: 45px; - height: 20px; - background-position: right; - span { - margin-left: 15px; - } - } - button:hover { - background-color: rgb(var(--primary-9)); - } - & > div { - @apply flex h-full flex-wrap items-center justify-center; - - width: 60px; - } - .insert { - @apply bg-no-repeat; - - height: 25px; - } - .link { - .insert { - background-position: 50% -100px; - } - } - .img { - .insert { - background-position: 50% -125px; - } - } - .remark { - .insert { - background-position: 50% -1150px; - } - } - } - .progress-group, - .sequence-group { - @apply flex items-center justify-center; - - width: 135px; - ul { - @apply m-0 list-none p-0; - - width: 120px; - li { - @apply inline-block; - - margin: 2px; - width: 20px; - height: 20px; - } - } - } - .sequence-group { - .loop(@i) when (@i >= 0) { - .sequence-@{i} { - background-position: 0 -20px * (-1 + @i); - } - .loop(@i - 1); - } - .loop(9); - } - .progress-group { - .loop(@i) when (@i >= 0) { - .progress-@{i} { - background-position: 0 -20px * (-1 + @i); - } - .loop(@i - 1); - } - .loop(9); - } - .arrange-group { - width: 65px; - .arrange { - @apply flex flex-wrap items-center justify-center; - } - .tab-icons { - @apply m-0 inline-block bg-no-repeat; - - width: 25px; - height: 25px; - background-position: 0 -150px; - } - } - .style-group { - width: 150px; - .clear-style-btn { - @apply flex flex-wrap items-center justify-center; - - width: 65px; - .tab-icons { - @apply m-0 inline-block bg-no-repeat; - - width: 25px; - height: 25px; - background-position: 0 -175px; - } - } - .copy-paste-panel { - width: 70px; - .tab-icons { - @apply inline-block; - - width: 20px; - height: 20px; - } - .copy-style { - .tab-icons { - background-position: 0 -200px; - } - } - .paste-style { - .tab-icons { - background-position: 0 -220px; - } - } - } - } - .font-group { - width: 250px; - * { - font-size: 12px; - } - .font-family-select { - width: 150px; - } - .font-size-select { - margin-left: 5px; - width: 80px; - } - .font-bold, - .font-italic { - @apply my-0 inline-block; - - margin: 0 3px; - width: 20px; - height: 20px; - } - .font-bold { - background-position: 0 -242px; - } - .font-italic { - background-position: 0 -262px; - } - } - .expand-group, - .selection-group { - @apply flex items-center justify-center; - - margin: 0 5px; - width: 60px; - button { - @apply border-none outline-none; - } - span { - font-size: 12px; - } - } - .expand-group { - .expand { - width: 40px; - height: 25px; - background-position: center -995px; - } - i { - font-size: 12px; - } - } - .selection-group { - .selection { - width: 40px; - height: 25px; - background-position: 7px -1175px; - } - i { - font-size: 12px; - } - } } diff --git a/frontend/src/components/pure/ms-button/index.vue b/frontend/src/components/pure/ms-button/index.vue index 0a13eafbf0..85dcc31bfe 100644 --- a/frontend/src/components/pure/ms-button/index.vue +++ b/frontend/src/components/pure/ms-button/index.vue @@ -1,7 +1,7 @@ - + diff --git a/frontend/src/views/project-management/projectAndPermission/projectVersion/locale/en-US.ts b/frontend/src/views/project-management/projectAndPermission/projectVersion/locale/en-US.ts new file mode 100644 index 0000000000..95edce89c0 --- /dev/null +++ b/frontend/src/views/project-management/projectAndPermission/projectVersion/locale/en-US.ts @@ -0,0 +1,37 @@ +export default { + 'project.projectVersion.version': 'Project version', + 'project.projectVersion.tip': + 'Project version management is mainly divided into file management and use case management to ensure the traceability of project files during the project process.', + 'project.projectVersion.assign': 'Version designation', + 'project.projectVersion.assignTip': + 'You can specify that the content of a certain change in the resource is the content of the specified version number.', + 'project.projectVersion.compare': 'Version comparison', + 'project.projectVersion.compareTip': + 'The resource details page provides version switching and version comparison functions.', + 'project.projectVersion.filter': 'Version filter', + 'project.projectVersion.filterTip': 'Added version display column and version filtering function to resource list', + 'project.projectVersion.openVersion': 'Enable project version', + 'project.projectVersion.openVersionSuccess': 'Activated successfully', + 'project.projectVersion.versionName': 'Version name', + 'project.projectVersion.status': 'Status', + 'project.projectVersion.latest': 'Latest version', + 'project.projectVersion.publishTime': 'Release time', + 'project.projectVersion.createTime': 'Creation time', + 'project.projectVersion.creator': 'Creator', + 'project.projectVersion.searchPlaceholder': 'Search by ID/name', + 'project.projectVersion.quickCreate': 'Quickly create versions', + 'project.projectVersion.versionNamePlaceholder': 'Please enter version name', + 'project.projectVersion.versionNameRequired': 'Version name cannot be empty', + 'project.projectVersion.publishTimePlaceholder': 'Please select a release date', + 'project.projectVersion.open': '{name} is turned on', + 'project.projectVersion.close': '{name} is closed', + 'project.projectVersion.switchLatestSuccess': 'The latest version has been switched to {name}', + 'project.projectVersion.confirmCloseTitle': 'Are you sure you want to close {name}?', + 'project.projectVersion.confirmCloseTip': + 'After closing, the resource list will not display the data of this version, please operate with caution!', + 'project.projectVersion.confirmCloseTipContent1': + 'It is currently the latest version. After closing, the default display data of the list will be empty;', + 'project.projectVersion.confirmCloseTipContent2': 'You can switch other versions to the latest version', + 'project.projectVersion.replaceVersionPlaceholder': 'Please select an alternative version', + 'project.projectVersion.latestVersionDeleteTip': 'The latest version cannot be deleted', +}; diff --git a/frontend/src/views/project-management/projectAndPermission/projectVersion/locale/zh-CN.ts b/frontend/src/views/project-management/projectAndPermission/projectVersion/locale/zh-CN.ts new file mode 100644 index 0000000000..201b40e80d --- /dev/null +++ b/frontend/src/views/project-management/projectAndPermission/projectVersion/locale/zh-CN.ts @@ -0,0 +1,35 @@ +export default { + 'project.projectVersion.version': '项目版本', + 'project.projectVersion.tip': '项目版本管理主要分为文件管理和用例管理,保证项目文件在项目过程中可追溯性', + 'project.projectVersion.assign': '版本指定', + 'project.projectVersion.assignTip': '可指定资源的某一次变更内容为指定版本号的内容', + 'project.projectVersion.compare': '版本对比', + 'project.projectVersion.compareTip': '资源详情页提供版本切换和版本对比的功能', + 'project.projectVersion.filter': '版本筛选', + 'project.projectVersion.filterTip': '资源列表处增加版本展示列和版本过滤功能', + 'project.projectVersion.openVersion': '启用项目版本', + 'project.projectVersion.openVersionSuccess': '启用成功', + 'project.projectVersion.versionName': '版本名称', + 'project.projectVersion.status': '状态', + 'project.projectVersion.latest': '最新版', + 'project.projectVersion.publishTime': '发布时间', + 'project.projectVersion.createTime': '创建时间', + 'project.projectVersion.creator': '创建人', + 'project.projectVersion.searchPlaceholder': '通过ID/名称搜索', + 'project.projectVersion.quickCreate': '快速创建版本', + 'project.projectVersion.versionNamePlaceholder': '请输入版本名称', + 'project.projectVersion.versionNameRequired': '版本名称不能为空', + 'project.projectVersion.publishTimePlaceholder': '请选择发布日期', + 'project.projectVersion.open': '{name} 已开启', + 'project.projectVersion.close': '{name} 已关闭', + 'project.projectVersion.switchLatestSuccess': '最新版已切换为 {name}', + 'project.projectVersion.confirmCloseTitle': '确认关闭 {name} 吗?', + 'project.projectVersion.confirmCloseTip': '关闭后,资源列表将不展示该版本的数据,请谨慎操作!', + 'project.projectVersion.confirmCloseTipContent1': '当前为最新版本,关闭后,会导致列表默认展示数据为空;', + 'project.projectVersion.confirmCloseTipContent2': '可切换其他版本为最新版本', + 'project.projectVersion.replaceVersionPlaceholder': '请选择替换版本', + 'project.projectVersion.latestVersionDeleteTip': '最新版本不可删除', + 'project.projectVersion.statusTip': '关闭后在版本信息下拉框则不显示', + 'project.projectVersion.versionInfo': '版本信息示例', + 'project.projectVersion.versionLatest': '最新版本', +};