-
Notifications
You must be signed in to change notification settings - Fork 155
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
100 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,105 @@ | ||
<template> | ||
<div>卡片列表页</div> | ||
<n-card> | ||
<n-radio-group v-model:value="currentRadio" name="radiobuttongroup1"> | ||
<n-radio-button v-for="item in radioDate" :key="item.value" :value="item.value" :label="item.label" /> | ||
</n-radio-group> | ||
<n-card | ||
v-for="item in cardData" | ||
v-show="currentRadio === 0 || item.id === currentRadio" | ||
:key="item.id" | ||
:bordered="false" | ||
:title="item.title" | ||
content-style="padding: 0;" | ||
> | ||
<n-grid :x-gap="8" :y-gap="8"> | ||
<n-gi v-for="card in item.children" :key="card.id" :span="6"> | ||
<n-card hoverable> | ||
<n-thing content-indented :title="card.title" description="09/30/2022" :content="card.content"> | ||
<template #avatar> | ||
<n-icon color="#de4307" size="24"> | ||
<i-icon-park-outline-chart-histogram /> | ||
</n-icon> | ||
</template> | ||
<template #action> | ||
<n-space justify="space-between"> | ||
<span></span> | ||
<n-button>开通</n-button> | ||
</n-space> | ||
</template> | ||
<template #header-extra> | ||
<n-tag type="info">生效中</n-tag> | ||
</template> | ||
</n-thing> | ||
</n-card> | ||
</n-gi> | ||
</n-grid> | ||
</n-card> | ||
</n-card> | ||
</template> | ||
|
||
<script setup lang="ts"></script> | ||
<script setup lang="ts"> | ||
import { ref } from 'vue'; | ||
const currentRadio = ref(0); | ||
const cardData = [ | ||
{ | ||
title: '一类', | ||
id: 1, | ||
children: [ | ||
{ | ||
id: 0, | ||
title: '卡片', | ||
content: '卡片内容', | ||
}, | ||
{ | ||
id: 1, | ||
title: '卡片2', | ||
content: '卡片2内容', | ||
}, | ||
], | ||
}, | ||
{ | ||
title: '二类', | ||
id: 2, | ||
children: [ | ||
{ | ||
id: 0, | ||
title: '卡片', | ||
content: '卡片内容', | ||
}, | ||
{ | ||
id: 1, | ||
title: '卡片2', | ||
content: '卡片2内容', | ||
}, | ||
], | ||
}, | ||
{ | ||
title: '三类', | ||
id: 3, | ||
children: [ | ||
{ | ||
id: 0, | ||
title: '卡片', | ||
content: '卡片内容', | ||
}, | ||
{ | ||
id: 1, | ||
title: '卡片2', | ||
content: '卡片2内容', | ||
}, | ||
], | ||
}, | ||
]; | ||
const radioDate = [ | ||
{ | ||
value: 0, | ||
label: '全部', | ||
}, | ||
...cardData.map((item) => { | ||
return { value: item.id, label: item.title }; | ||
}), | ||
]; | ||
</script> | ||
|
||
<style scoped></style> |
58205fb
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.
Successfully deployed to the following URLs:
ench-admin – ./
ench-admin.vercel.app
ench-admin-git-main-whyhenin.vercel.app
ench-admin-whyhenin.vercel.app