Merge remote-tracking branch 'origin/master'

This commit is contained in:
2023-07-10 11:01:24 +08:00
6 changed files with 54 additions and 16 deletions

View File

@@ -8,7 +8,7 @@
<div style="display: flex;flex-direction:column;flex-wrap: nowrap"> <div style="display: flex;flex-direction:column;flex-wrap: nowrap">
<div class="PageHeader"> <div class="PageHeader">
<br/> <br/>
<el-page-header @back="goBack" style="justify-content: center;"> <el-page-header @back="goBack" style="justify-content:left;display: flex;">
<div slot="title" style="font-size:23px;font-weight: 600;"></div> <div slot="title" style="font-size:23px;font-weight: 600;"></div>
<div slot="content" style="font-size:23px;font-weight: 600;"> <div slot="content" style="font-size:23px;font-weight: 600;">
HelloGitHub 月刊 HelloGitHub 月刊
@@ -286,4 +286,12 @@ export default {
max-height:150px; max-height:150px;
overflow: scroll; overflow: scroll;
} }
::v-deep .el-page-header__left{
left:10px;
}
::v-deep .el-page-header__content{
flex:1;
}
</style> </style>

View File

@@ -3,9 +3,9 @@
<div style="display: flex;flex-direction:column;flex-wrap: nowrap"> <div style="display: flex;flex-direction:column;flex-wrap: nowrap">
<div class="PageHeader"> <div class="PageHeader">
<br/> <br/>
<el-page-header @back="goBack" style="margin-left: 50px;justify-content: center;"> <el-page-header @back="goBack" style="justify-content:left;display: flex;">
<div slot="title" style="font-size:23px;font-weight: 600;"></div> <div slot="title" style="font-size:23px;font-weight: 600;"></div>
<div slot="content" style=";display: flex;flex-direction:row;justify-content: flex-start;font-size:23px;font-weight: 600;"> <div slot="content" style=";display: flex;flex-direction:row;justify-content:center;font-size:23px;font-weight: 600;">
{{ArticleTitle}} {{ArticleTitle}}
</div> </div>
</el-page-header> </el-page-header>
@@ -110,4 +110,11 @@ export default {
/*::v-deep .el-page-header__left{*/ /*::v-deep .el-page-header__left{*/
/* left:-300px;*/ /* left:-300px;*/
/*}*/ /*}*/
::v-deep .el-page-header__left{
left:10px;
}
::v-deep .el-page-header__content{
flex:1;
}
</style> </style>

View File

@@ -3,9 +3,9 @@
<div style="display: flex;flex-direction:column;flex-wrap: nowrap"> <div style="display: flex;flex-direction:column;flex-wrap: nowrap">
<div class="PageHeader"> <div class="PageHeader">
<br/> <br/>
<el-page-header @back="goBack" style="justify-content: center;"> <el-page-header @back="goBack" style="justify-content:left;display: flex;">
<div slot="title" style="font-size:23px;font-weight: 600;"></div> <div slot="title" style="font-size:23px;font-weight: 600;"></div>
<div slot="content" style="font-size:23px;font-weight: 600;display: flex;flex-direction: row;align-items: center;"> <div slot="content" style="font-size:23px;font-weight: 600;display: flex;flex-direction: row;justify-content: center;">
HelloGitHub 文章 HelloGitHub 文章
</div> </div>
</el-page-header> </el-page-header>
@@ -131,4 +131,11 @@ export default {
::v-deep .el-page-header__left{ ::v-deep .el-page-header__left{
left:-250px; left:-250px;
} }
::v-deep .el-page-header__left{
left:10px;
}
::v-deep .el-page-header__content{
flex:1;
}
</style> </style>

View File

@@ -3,7 +3,7 @@
<div style="display: flex;flex-direction:column;flex-wrap: nowrap"> <div style="display: flex;flex-direction:column;flex-wrap: nowrap">
<div class="PageHeader"> <div class="PageHeader">
<br/> <br/>
<el-page-header @back="goBack" style="justify-content: center;"> <el-page-header @back="goBack" style="justify-content:left;display: flex;">
<div slot="title" style="font-size:23px;font-weight: 600;"></div> <div slot="title" style="font-size:23px;font-weight: 600;"></div>
<div slot="content" style="font-size:23px;font-weight: 600;"> <div slot="content" style="font-size:23px;font-weight: 600;">
项目详情 项目详情
@@ -902,4 +902,11 @@ export default {
::v-deep .avatar :hover{ ::v-deep .avatar :hover{
transform: rotate(360deg); transform: rotate(360deg);
} }
::v-deep .el-page-header__left{
left:10px;
}
::v-deep .el-page-header__content{
flex:1;
}
</style> </style>

View File

@@ -6,7 +6,7 @@
<el-page-header @back="goBack" style="justify-content:left;display: flex;"> <el-page-header @back="goBack" style="justify-content:left;display: flex;">
<div slot="title" style="font-size:23px;font-weight: 600;"></div> <div slot="title" style="font-size:23px;font-weight: 600;"></div>
<div slot="content" class="test" style="font-size:23px;font-weight: 600;"> <div slot="content" class="test" style="font-size:23px;font-weight: 600;">
<div>(2023)年度语言GitHub星数排行榜</div> <div>{{TitleWord}}</div>
</div> </div>
</el-page-header> </el-page-header>
</div> </div>
@@ -93,6 +93,8 @@ export default {
components: {RightTools}, components: {RightTools},
data(){ data(){
return{ return{
// 标头文字:
TitleWord:'GitHub星数年度排行榜',
// 开关文本: // 开关文本:
activeWord:'月度趋势', activeWord:'月度趋势',
inactiveWord:'年度统计', inactiveWord:'年度统计',
@@ -162,7 +164,6 @@ export default {
}, },
mounted() { mounted() {
this.initPage(); this.initPage();
console.log(this.showData);
}, },
methods: { methods: {
goBack() { goBack() {
@@ -201,21 +202,25 @@ export default {
that.formName=['语言种类','获得星数'] that.formName=['语言种类','获得星数']
that.activeWord='月度趋势'; that.activeWord='月度趋势';
that.inactiveWord='年度统计'; that.inactiveWord='年度统计';
that.TitleWord='GitHub星数年度排行榜';
}else if(type == 2){ }else if(type == 2){
this.getNumData(year,that.value1,that.pushNum); this.getNumData(year,that.value1,that.pushNum);
that.formName=['语言种类','推送项目数'] that.formName=['语言种类','推送项目数']
that.activeWord='月度趋势'; that.activeWord='月度趋势';
that.inactiveWord='年度统计'; that.inactiveWord='年度统计';
that.TitleWord='GitHub推送数年度排行榜';
}else if(type == 3){ }else if(type == 3){
this.getNumData(year,that.value1,that.pullNum); this.getNumData(year,that.value1,that.pullNum);
that.formName=['语言种类','用户拉取项目数'] that.formName=['语言种类','用户拉取项目数']
that.activeWord='月度趋势'; that.activeWord='月度趋势';
that.inactiveWord='年度统计'; that.inactiveWord='年度统计';
that.TitleWord='GitHub拉取数年度排行榜';
}else if(type == 4){ }else if(type == 4){
this.getLiscenseData(that.value1); this.getLiscenseData(that.value1);
that.formName=['协议种类','项目数'] that.formName=['协议种类','项目数']
that.activeWord='各协议占比'; that.activeWord='各协议占比';
that.inactiveWord='数据总览'; that.inactiveWord='数据总览';
that.TitleWord='GitHub协议年度排行榜';
that.ban=true; that.ban=true;
} }
} }
@@ -230,7 +235,6 @@ export default {
if(that.value1 == false) that.value1 = true; if(that.value1 == false) that.value1 = true;
if(that.value1 == true) that.value1 = false; if(that.value1 == true) that.value1 = false;
} }
// console.log(that.selectedValueByYear);
}, },
// 语言分类的数据: // 语言分类的数据:
@@ -260,7 +264,6 @@ export default {
that.showData = tmp.slice(0,18); that.showData = tmp.slice(0,18);
that.showData = that.showData.sort(compare('count')); that.showData = that.showData.sort(compare('count'));
this.getRenderer(); this.getRenderer();
// console.log(that.showData);
}else{ }else{
// 按月度统计: // 按月度统计:
this.$refs.totalContent.style.display = 'none'; this.$refs.totalContent.style.display = 'none';
@@ -296,7 +299,6 @@ export default {
} }
that.showData = quarterItems; that.showData = quarterItems;
this.getLineChart(); this.getLineChart();
console.log(that.showData);
} }
}, },
@@ -315,8 +317,9 @@ export default {
// 饼图: // 饼图:
getPie(){ getPie(){
var that = this; var that = this;
that.licensesNum = JSON.parse(JSON.stringify(that.showData).replace(/license/g,"name")); let tmp = that.licensesNum;
that.licensesNum = JSON.parse(JSON.stringify(that.showData).replace(/count/g,"value")) tmp = JSON.parse(JSON.stringify(tmp).replace(/license/g,"name"));
tmp = JSON.parse(JSON.stringify(tmp).replace(/count/g,"value"))
that.MyOption = { that.MyOption = {
tooltip: { tooltip: {
trigger: 'item', //item数据项图形触发主要在散点图饼图等无类目轴的图表中使用。 trigger: 'item', //item数据项图形触发主要在散点图饼图等无类目轴的图表中使用。
@@ -327,12 +330,12 @@ export default {
formatter: '{a} <br/>{b} 协议项目 : {c} 个 <br/>百分比 : {d}%' //{a}(系列名称),{b}(数据项名称),{c}(数值), {d}(百分比) formatter: '{a} <br/>{b} 协议项目 : {c} 个 <br/>百分比 : {d}%' //{a}(系列名称),{b}(数据项名称),{c}(数值), {d}(百分比)
}, },
series: [{ series: [{
name:'协议数据',
type: 'pie', type: 'pie',
data: that.licensesNum, data: tmp,
label: {//饼图文字的显示 label: {//饼图文字的显示
show: true, //默认 显示文字 show: true, //默认 显示文字
formatter: function (arg) { formatter: function (arg) {
console.log(arg);
return arg.name + ' 项目 ' + arg.value + " 个 " +'\n'+ arg.percent + "%" return arg.name + ' 项目 ' + arg.value + " 个 " +'\n'+ arg.percent + "%"
} }
}, },

View File

@@ -3,7 +3,7 @@
<div style="display: flex;flex-direction:column;flex-wrap: nowrap"> <div style="display: flex;flex-direction:column;flex-wrap: nowrap">
<div class="PageHeader"> <div class="PageHeader">
<br/> <br/>
<el-page-header @back="goBack" style="justify-content: center;"> <el-page-header @back="goBack" style="justify-content:left;display: flex;">
<div slot="title" style="font-size:23px;font-weight: 600;"></div> <div slot="title" style="font-size:23px;font-weight: 600;"></div>
<div slot="content" style="font-size:23px;font-weight: 600;"> <div slot="content" style="font-size:23px;font-weight: 600;">
个人主页 个人主页
@@ -381,4 +381,10 @@ export default {
height: 178px; height: 178px;
display: block; display: block;
} }
::v-deep .el-page-header__left{
left:10px;
}
::v-deep .el-page-header__content{
flex:1;
}
</style> </style>