refactor: replace common confirm dialogs with maintenance CRUD dialogs and streamline form handling in MasterDetailMntC.vue and SingleRecordMnt.vue

This commit is contained in:
skytek_xinliang
2026-03-26 16:01:20 +08:00
parent ec3fbace1a
commit 389ec56480
32 changed files with 2549 additions and 2763 deletions
@@ -28,17 +28,43 @@ v-if="favoritesConfig.showAdd" class="favorite-add" color="primary" size="small"
</v-col>
</template>
<script setup>
<script setup lang="ts">
import { mdiEyeOff, mdiPlus } from '@mdi/js'
defineProps({
features: { type: Object, default: () => ({}) },
showFavoritesBar: { type: Boolean, default: true },
isMobile: { type: Boolean, default: false },
favoritesConfig: { type: Object, default: () => ({}) },
favoriteItems: { type: Array, default: () => [] },
import type { AdminLayoutFavoritesConfig, AdminLayoutFeatures, AdminLayoutMenuItem } from './types'
interface Props {
features?: AdminLayoutFeatures
showFavoritesBar?: boolean
isMobile?: boolean
favoritesConfig?: AdminLayoutFavoritesConfig
favoriteItems?: AdminLayoutMenuItem[]
}
withDefaults(defineProps<Props>(), {
features: () => ({
showThemeToggle: false,
showFavorites: true,
showBreadcrumb: true,
showSearch: true,
showToolbarActions: true,
showUserInfo: true,
}),
showFavoritesBar: true,
isMobile: false,
favoritesConfig: () => ({
label: '',
addLabel: '',
showAdd: false,
}),
favoriteItems: () => [],
})
const emit = defineEmits(['select', 'add-favorite', 'remove-favorite', 'toggle-favorites-bar'])
const emit = defineEmits<{
select: [item: AdminLayoutMenuItem]
'add-favorite': []
'remove-favorite': [item: AdminLayoutMenuItem]
'toggle-favorites-bar': [value: boolean]
}>()
</script>
<style scoped>