mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-06-17 13:42:07 +08:00
fix(dashboard): stabilize editable layout controls
This commit is contained in:
@@ -16,8 +16,6 @@ const props = withDefaults(
|
||||
items: UnknownRecord[]
|
||||
labelGetter?: (item: UnknownRecord) => string
|
||||
modelValue?: boolean
|
||||
resetIcon?: string
|
||||
resetText?: string
|
||||
selectAllText?: string
|
||||
selectNoneText?: string
|
||||
showBulkActions?: boolean
|
||||
@@ -30,8 +28,6 @@ const props = withDefaults(
|
||||
elevated: false,
|
||||
labelGetter: undefined,
|
||||
modelValue: true,
|
||||
resetIcon: 'mdi-restore',
|
||||
resetText: '',
|
||||
selectAllText: '',
|
||||
selectNoneText: '',
|
||||
showBulkActions: false,
|
||||
@@ -42,7 +38,6 @@ const props = withDefaults(
|
||||
|
||||
const emit = defineEmits<{
|
||||
(event: 'close'): void
|
||||
(event: 'reset'): void
|
||||
(event: 'save', payload: { elevated: boolean; enabled: Record<string, boolean> }): void
|
||||
(event: 'update:elevated', value: boolean): void
|
||||
(event: 'update:modelValue', value: boolean): void
|
||||
@@ -104,11 +99,6 @@ function setAllItems(value: boolean) {
|
||||
})
|
||||
}
|
||||
|
||||
// 触发调用方提供的重置动作。
|
||||
function triggerResetAction() {
|
||||
emit('reset')
|
||||
}
|
||||
|
||||
// 提交通用内容开关设置。
|
||||
function submitSettings() {
|
||||
emit('save', {
|
||||
@@ -157,12 +147,6 @@ function submitSettings() {
|
||||
</p>
|
||||
</VCardText>
|
||||
<VCardActions class="pt-3">
|
||||
<VBtn v-if="props.resetText" variant="text" color="secondary" @click="triggerResetAction">
|
||||
<template #prepend>
|
||||
<VIcon :icon="props.resetIcon" />
|
||||
</template>
|
||||
{{ props.resetText }}
|
||||
</VBtn>
|
||||
<VBtn v-if="props.showBulkActions" variant="text" @click="setAllItems(true)">
|
||||
{{ props.selectAllText }}
|
||||
</VBtn>
|
||||
|
||||
Reference in New Issue
Block a user