人数统计
This commit is contained in:
@ -1,16 +1,27 @@
|
||||
<template>
|
||||
<div class="container flex items-center justify-start">
|
||||
<img class="icon" src="@/assets/polygon40@3x.png" alt="" />
|
||||
<div class="title text-white">项目总数</div>
|
||||
<div class="title text-white">项目总人数</div>
|
||||
<div class="counting-board flex justify-between">
|
||||
<div class="num">1</div>
|
||||
<div class="num">0</div>
|
||||
<div class="num">0</div>
|
||||
<div class="num">0</div>
|
||||
<div class="num" v-for="item in countChars" :key="item">{{ item }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup></script>
|
||||
<script setup>
|
||||
import { ref, toRefs } from "vue";
|
||||
const props = defineProps({
|
||||
data: {
|
||||
type: Object,
|
||||
required: true,
|
||||
},
|
||||
});
|
||||
const { data } = toRefs(props);
|
||||
const countChars = ref([]);
|
||||
countChars.value = `${parseInt(data.value.PROJECTCOUNT)}`.split("");
|
||||
for (let i = countChars.value.length; i < 4; i++) {
|
||||
countChars.value.unshift("0");
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.container {
|
||||
width: 465px;
|
||||
|
Reference in New Issue
Block a user