-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
feat:批量操作与插件排序(iss#8749) #8774
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
feat:批量操作与插件排序(iss#8749) #8774
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,6 +25,14 @@ const props = defineProps({ | |
| type: Boolean, | ||
| default: false, | ||
| }, | ||
| selectable: { | ||
| type: Boolean, | ||
| default: false, | ||
| }, | ||
| selected: { | ||
| type: Boolean, | ||
| default: false, | ||
| }, | ||
| }); | ||
|
|
||
| // 定义要发送到父组件的事件 | ||
|
|
@@ -39,6 +47,7 @@ const emit = defineEmits([ | |
| "view-changelog", | ||
| "toggle-pin", | ||
| "open-webui", | ||
| "select", | ||
| ]); | ||
|
|
||
| const hasPages = computed(() => { | ||
|
|
@@ -149,6 +158,7 @@ const openWebui = () => { | |
| height="100%" | ||
| :ripple="false" | ||
| variant="outlined" | ||
| :class="{ 'extension-card--selected': selectable && selected }" | ||
| :style="{ | ||
| position: 'relative', | ||
| backgroundColor: | ||
|
|
@@ -231,6 +241,15 @@ const openWebui = () => { | |
| </p> | ||
|
|
||
| <template v-if="!marketMode"> | ||
| <v-checkbox | ||
| :model-value="selected" | ||
| density="compact" | ||
| hide-details | ||
| color="primary" | ||
| class="extension-checkbox-inline" | ||
| @click.stop="emit('select')" | ||
| @update:model-value="emit('select')" | ||
| /> | ||
|
Comment on lines
+244
to
+252
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 在 |
||
| <v-tooltip location="left"> | ||
| <template v-slot:activator="{ props: tooltipProps }"> | ||
| <div class="extension-switch-wrap" @click.stop> | ||
|
|
@@ -425,6 +444,21 @@ const openWebui = () => { | |
| cursor: pointer; | ||
| } | ||
|
|
||
| .extension-card--selected { | ||
| border-color: rgb(var(--v-theme-primary)) !important; | ||
| border-width: 2px; | ||
| } | ||
|
|
||
| .extension-checkbox-inline { | ||
| flex-shrink: 0; | ||
| margin-right: 4px; | ||
| } | ||
|
|
||
| .extension-checkbox-inline :deep(.v-switch), | ||
| .extension-checkbox-inline :deep(.v-selection-control) { | ||
| min-height: 0; | ||
| } | ||
|
|
||
| .extension-image-container { | ||
| display: flex; | ||
| align-items: flex-start; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
issue (bug_risk): Clicking the checkbox will likely emit the
selectevent twice, causing a double-toggle.Because the checkbox uses both
@click.stop="emit('select')"and@update:model-value="emit('select')", a single user click will invokeemit('select')twice in Vuetify (once for each handler), which cancels the parent’s toggle logic. Removing one handler—ideally keeping only@update:model-valuefor state changes—will avoid the double emission.