Skip to content

Commit 5d68224

Browse files
authored
fix(card-group): [card-group] add empty icon (#3299)
1 parent 1dfdc4e commit 5d68224

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

packages/theme-saas/src/card-group/index.less

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,14 @@
1818
width: 100%;
1919
display: grid;
2020
grid-row-gap: 16px;
21+
22+
&-empty {
23+
display: none;
24+
}
25+
26+
&-empty:first-child {
27+
display: block;
28+
width: 100%;
29+
height: 100px;
30+
}
2131
}

packages/vue/src/card-group/src/mobile-first.vue

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,23 @@
11
<template>
22
<div data-tag="tiny-card-group" class="w-full grid gap-4" :class="gcls(`size-${state.size}`)">
33
<slot></slot>
4+
<icon-grid-no-data class="tiny-card-group-empty">无数据</icon-grid-no-data>
45
</div>
56
</template>
67

78
<script lang="ts">
89
import { renderless, api } from '@opentiny/vue-renderless/card-group/vue'
910
import { $prefix, props, setup, defineComponent } from '@opentiny/vue-common'
11+
import { iconGridNoData } from '@opentiny/vue-icon'
12+
1013
import { classes } from './token'
1114
1215
export default defineComponent({
1316
name: $prefix + 'CardGroup',
1417
componentName: 'CardGroup',
18+
components: {
19+
IconGridNoData: iconGridNoData()
20+
},
1521
emits: ['update:modelValue', 'change'],
1622
props: [
1723
...props,

0 commit comments

Comments
 (0)