feat 项目列表
This commit is contained in:
@@ -1,13 +1,18 @@
|
||||
<script setup lang="ts">
|
||||
function goToProjectList() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/project/index',
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<view class="card">
|
||||
<view class="card-header">
|
||||
<text class="card-title">
|
||||
项目列表
|
||||
</text>
|
||||
<!-- <text class="card-link">
|
||||
查看全部
|
||||
</text> -->
|
||||
<wd-button variant="text">
|
||||
<wd-button variant="text" @tap="goToProjectList">
|
||||
查看全部
|
||||
</wd-button>
|
||||
</view>
|
||||
|
||||
95
src/components/project/item.vue
Normal file
95
src/components/project/item.vue
Normal file
@@ -0,0 +1,95 @@
|
||||
<script setup lang="ts">
|
||||
defineProps<{
|
||||
projectName: string
|
||||
status: string
|
||||
tags: string[]
|
||||
time: string
|
||||
trigger: string
|
||||
}>()
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<view class="project-item">
|
||||
<view class="item-header">
|
||||
<text class="project-name">
|
||||
{{ projectName }}
|
||||
</text>
|
||||
<text class="status">
|
||||
{{ status }}
|
||||
</text>
|
||||
</view>
|
||||
|
||||
<view class="tags">
|
||||
<view v-for="(tag, index) in tags" :key="index" class="tag">
|
||||
<text class="tag-text">
|
||||
{{ tag }}
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<text class="time">
|
||||
{{ time }}
|
||||
</text>
|
||||
<text class="trigger">
|
||||
{{ trigger }}
|
||||
</text>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.project-item {
|
||||
background-color: #ffffff;
|
||||
border-radius: 12px;
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
.item-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.project-name {
|
||||
font-size: 22px;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.status {
|
||||
font-size: 14px;
|
||||
padding: 4px 12px;
|
||||
border-radius: 12px;
|
||||
background-color: #f6ffed;
|
||||
color: #52c41a;
|
||||
}
|
||||
|
||||
.tags {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.tag {
|
||||
background-color: #fff1f0;
|
||||
border-radius: 8px;
|
||||
padding: 4px 12px;
|
||||
}
|
||||
|
||||
.tag-text {
|
||||
font-size: 14px;
|
||||
color: #ff4d4f;
|
||||
}
|
||||
|
||||
.time {
|
||||
font-size: 18px;
|
||||
color: #666;
|
||||
display: block;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.trigger {
|
||||
font-size: 18px;
|
||||
color: #666;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user