完成设计师端与店务端生产隔离改造

This commit is contained in:
2026-08-25 10:56:55 +08:00
parent 9cfaac3e18
commit c7b2daba71
686 changed files with 123338 additions and 38 deletions
@@ -0,0 +1,38 @@
<template>
<div class="admin-mobile-card-list">
<template v-if="items.length">
<slot
v-for="(item, index) in items"
:key="resolveItemKey(item, index)"
name="item"
:item="item"
:index="index"
/>
</template>
<a-empty v-else :description="emptyDescription" />
</div>
</template>
<script setup lang="ts">
/**
* AdminMobileCardList page script.
* Call guide: the template binds the reactive state below, and the methods are triggered by button clicks, lifecycle hooks, or router events.
*/
const props = withDefaults(defineProps<{
items?: any[]
emptyDescription?: string
itemKey?: string
}>(), {
items: () => [],
emptyDescription: '暂无数据',
itemKey: 'id'
})
/** resolveItemKey is a local helper used by this page script. */
const resolveItemKey = (item: Record<string, any> | undefined, index: number) => {
if (item && props.itemKey in item && item[props.itemKey] !== undefined) {
return item[props.itemKey]
}
return index
}
</script>