From 06a066436e36e0af3e8c9022f1ef251d8838f425 Mon Sep 17 00:00:00 2001 From: Marvin Zhang Date: Thu, 20 Jun 2024 18:27:35 +0800 Subject: [PATCH] refactor: added component names --- scripts/gen-index.js | 4 +- src/components/button/Button.vue | 1 - src/components/button/FaIconButton.vue | 1 - src/components/button/IconButton.vue | 1 - src/components/button/LabelButton.vue | 1 - src/components/dialog/CreateEditDialog.vue | 1 - src/components/dialog/Dialog.vue | 104 +++---- src/components/file/FileActions.vue | 1 - src/components/file/FileEditor.vue | 1 - src/components/file/FileEditorNavMenu.vue | 1 - src/components/file/FileTab.vue | 1 - src/components/file/FileUpload.vue | 1 - src/components/file/UploadFilesDialog.vue | 1 - src/components/form/Form.vue | 125 ++++---- src/components/form/FormItem.vue | 288 ++++++++---------- src/components/git/CreateGitBranchDialog.vue | 57 +++- src/components/git/GitStatus.vue | 1 - src/components/git/UploadGitFilesDialog.vue | 1 - src/components/icon/Icon.vue | 1 - src/components/nav/NavActionBack.vue | 1 - src/components/nav/NavActionButton.vue | 1 - src/components/nav/NavActionFaIcon.vue | 1 - .../nav/NavActionGroupDetailCommon.vue | 1 - src/components/nav/NavActionItem.vue | 28 +- src/components/nav/NavActions.vue | 1 - src/components/nav/NavSidebar.vue | 1 - src/components/nav/NavSidebarList.vue | 1 - src/components/nav/NavSidebarTree.vue | 1 - src/components/nav/NavTabs.vue | 1 - src/components/node/NodeStatus.vue | 1 - .../result/ResultDedupFieldsDialog.vue | 1 - .../spider/UploadSpiderFilesDialog.vue | 1 - src/components/tag/CheckTag.vue | 1 - src/components/tag/CheckTagGroup.vue | 1 - src/components/tag/LinkTag.vue | 1 - src/components/tag/Tag.vue | 1 - src/components/task/TaskStatus.vue | 1 - src/interfaces/components/dialog/Dialog.d.ts | 11 - src/interfaces/components/form/Form.d.ts | 8 - src/interfaces/store/modules/git.d.ts | 5 +- src/layouts/content/detail/DetailLayout.vue | 1 - src/store/modules/git.ts | 11 +- src/views/git/detail/GitDetail.vue | 1 - .../detail/actions/GitDetailActionsCommon.vue | 1 - .../detail/actions/GitDetailActionsFiles.vue | 1 - .../git/detail/tabs/GitDetailTabBranches.vue | 1 - .../git/detail/tabs/GitDetailTabChanges.vue | 1 - .../git/detail/tabs/GitDetailTabFiles.vue | 1 - .../git/detail/tabs/GitDetailTabIgnore.vue | 1 - .../git/detail/tabs/GitDetailTabLogs.vue | 1 - .../git/detail/tabs/GitDetailTabRemote.vue | 1 - .../git/detail/tabs/GitDetailTabTags.vue | 1 - src/views/git/list/GitList.vue | 1 - src/views/spider/detail/SpiderDetail.vue | 1 - .../actions/SpiderDetailActionsFiles.vue | 1 - .../detail/tabs/SpiderDetailTabFiles.vue | 1 - 56 files changed, 291 insertions(+), 396 deletions(-) diff --git a/scripts/gen-index.js b/scripts/gen-index.js index 1f4b6ab917915..cd45097b85d70 100644 --- a/scripts/gen-index.js +++ b/scripts/gen-index.js @@ -89,8 +89,8 @@ function genIndex(moduleName) { function addComponentName(content, componentName) { const setupScriptTagRegex = /(]*lang=["']ts["'][^>]*>)/; - const defineOptionsRegex = /defineOptions\(\{[^}]*}\);?(\n+)?/; - const newDefineOptions = `defineOptions({ name: '${COMPONENT_PREFIX}${componentName}' });\n\n`; + const defineOptionsRegex = /defineOptions\(\{[^}]*}\);?\n+/; + const newDefineOptions = `defineOptions({ name: '${COMPONENT_PREFIX}${componentName}' });\n`; // Check if the script setup tag exists if (setupScriptTagRegex.test(content)) { diff --git a/src/components/button/Button.vue b/src/components/button/Button.vue index a6792ca6285a0..5ef52ccf4309b 100644 --- a/src/components/button/Button.vue +++ b/src/components/button/Button.vue @@ -1,6 +1,5 @@ + - - diff --git a/src/components/file/FileActions.vue b/src/components/file/FileActions.vue index 06ce97ec592c4..877a70b765076 100644 --- a/src/components/file/FileActions.vue +++ b/src/components/file/FileActions.vue @@ -1,6 +1,5 @@ + - -