feat(groups): 支持从多个分组复制账号 - #5674
Open
jenfonro wants to merge 2 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
账号管理中的创建/编辑分组支持“从分组复制账号”,但原生下拉框一次只能选择一个来源分组,无法直观看到和切换多个已选分组,也没有复用模型测试等页面使用的通用 Select 样式。
期望一次选择多个来源分组,并按账号并集复制。例如分组 1 包含 A、B,分组 2 包含 B、C,选择两者后目标分组得到 A、B、C。
改动
Select增加数组v-model的多选模式,提供复选框选中态、已选数量展示、清空和键盘/ARIA 多选语义。Select样式,并允许同时选择多个来源分组。DISTINCT返回去重并集。验证
frontend/node_modules/.bin/vitest run src/components/common/__tests__/Select.spec.tsfrontend/node_modules/.bin/eslint src/components/common/Select.vue src/components/common/__tests__/Select.spec.ts src/views/admin/GroupsView.vuefrontend/node_modules/.bin/vue-tsc --noEmitfrontend/node_modules/.bin/vite buildcd backend && go test ./internal/repository -run '^TestGroupRepositoryGetAccountIDsByGroupIDsReturnsDistinctUnion$' -count=1git diff --check