Skip to content

Commit

Permalink
feature: Add Project Info
Browse files Browse the repository at this point in the history
  • Loading branch information
jsxiaosi committed Jan 24, 2022
1 parent b4472e2 commit b097b44
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 7 deletions.
3 changes: 3 additions & 0 deletions src/styles/el-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@

.el-descriptions {
--el-descriptions-item-bordered-label-background: #{$sub-main-bg-content};
:deep(.el-descriptions__body) {
background-color: #{$main-bg-color};
}
}

// 左侧导航栏(此地方颜色全部改成自定义)
Expand Down
62 changes: 60 additions & 2 deletions src/views/about/index.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,62 @@
<template>
<div>about</div>
<!-- <div class="page-container"> </div> -->
<div>
<el-row v-for="(item, index) in pageDate" :key="index" :gutter="30" class="enter-y">
<el-col>
<el-card class="box-card">
<template #header>
<div class="card-header">
<span>{{ toName[index] }}</span>
</div>
</template>
<div class="descriptions">
<el-descriptions
class="margin-top"
direction="horizontal"
:column="2"
size="default"
border
>
<el-descriptions-item v-for="(i, cindex) in item" :key="cindex" min-width="200px">
<template #label>
{{ cindex }}
</template>
<span>{{ i }}</span>
</el-descriptions-item>
</el-descriptions>
</div>
</el-card>
</el-col>
</el-row>
</div>
</template>
<script lang="ts" setup></script>
<script lang="ts" setup>
import { reactive } from 'vue';
import packagepath from '../../../package.json';
const pageDate = reactive({ info: {}, dependencies: {}, devDependencies: {} });
const toName = {
info: '项目信息',
dependencies: '生产依赖',
devDependencies: '开发依赖',
};
pageDate.info = {
name: packagepath.name,
version: packagepath.version,
};
pageDate.dependencies = packagepath.dependencies;
pageDate.devDependencies = packagepath.devDependencies;
console.log(packagepath);
</script>

<style lang="scss" scoped>
.box-card {
margin-bottom: 20px;
.margin-top :deep(.el-descriptions__body) {
margin: 20px;
background-color: #{$main-bg-color} !important;
}
}
</style>
3 changes: 0 additions & 3 deletions src/views/index/components/WeDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,5 @@
.el-tag--dark {
margin-right: 10px !important;
}
.margin-top :deep(.el-descriptions__body) {
background-color: #{$main-bg-color};
}
}
</style>
2 changes: 0 additions & 2 deletions src/views/useradmin/userlist/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@

<script setup lang="ts">
import TsComponents from '@/components/tscomponents';
import packagepath from '../../../../package.json';
console.log(packagepath);
// import SvgIcon from '@/components/SvgIcon/index.vue'
// import { getCurrentInstance } from 'vue'
Expand Down

0 comments on commit b097b44

Please sign in to comment.