加入武汉开源社区
与武汉本地开发者、企业、高校携手共建开源生态
@@ -291,95 +310,131 @@
import { onMounted, ref, nextTick, watch, onUnmounted, computed } from 'vue';
import * as echarts from 'echarts';
import { usePageResize } from '@/utils/hooks/usePageResize';
-import StatsBar from './StatsBar.vue'
+import StatsBar from './StatsBar.vue';
const { widthType } = usePageResize();
// ================= 数据定义 =================
const githubProjects = ref([
- { name: 'DWSurvey', desc: '基于Vue+SpringBoot的问卷系统', stars: '3.2k' },
- { name: 'Eova', desc: '快速开发平台', stars: '2.8k' },
- { name: 'ClickVisual', desc: '日志分析平台', stars: '2.5k' },
- { name: 'Meta2d.js', desc: '2D可视化引擎', stars: '2.1k' },
- { name: 'Deepin Wine', desc: '在Linux运行Windows应用', stars: '6.5k' },
- { name: 'GoFrame', desc: 'Go语言企业级开发框架', stars: '11k' },
- { name: 'MindSpore', desc: '全场景AI计算框架(武汉所)', stars: '18k' },
- { name: 'IoTDB', desc: '物联网时序数据库', stars: '4.2k' }
+ {
+ name: 'bootstrap',
+ desc: 'The most popular HTML, CSS, and JavaScript framework for developing responsive, mobile first projects on the web.',
+ stars: '174000'
+ },
+ {
+ name: 'JavaGuide',
+ desc: 'Java 学习&面试指南(Go、Python 后端面试通用,计算机基础面试总结)。准备后端技术面试,首选 JavaGuide!',
+ stars: '153000'
+ },
+ {
+ name: 'cpython',
+ desc: 'The Python programming language',
+ stars: '71000'
+ },
+ {
+ name: 'core',
+ desc: '🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.',
+ stars: '52700'
+ },
+ {
+ name: 'bevy',
+ desc: 'A refreshingly simple data-driven game engine built in Rust',
+ stars: '43900'
+ },
+ {
+ name: 'linux-insides',
+ desc: 'A book-in-progress about the Linux kernel and its insides.',
+ stars: '31700'
+ },
+ {
+ name: 'podman',
+ desc: 'Podman: A tool for managing OCI containers and pods.',
+ stars: '30300'
+ },
+ {
+ name: 'fastai',
+ desc: 'The fastai deep learning library',
+ stars: '27800'
+ },
+ {
+ name: 'OI-wiki',
+ desc: '🌟 Wiki of OI / ICPC for everyone. (某大型游戏线上攻略,内含炫酷算术魔法)',
+ stars: '25200'
+ },
+ {
+ name: 'bilibili-API-collect',
+ desc: '哔哩哔哩-API收集整理【不断更新中....】',
+ stars: '20100'
+ }
]);
const activeTab = ref(0);
const excellentProjects = ref([
- { "name": "调问(DWSurvey)", "desc": "开源问卷表单系统", "org": "极推科技" },
- { "name": "Eova", "desc": "低代码开发平台", "org": "武汉简码" },
- { "name": "ClickVisual", "desc": "可视化日志分析告警平台", "org": "武汉初心" },
- { "name": "Meta2d.js", "desc": "2D图元可视化引擎", "org": "乐吾乐科技" },
- { "name": "Juno", "desc": "分布式微服务管理系统", "org": "武汉斗鱼" },
- { "name": "Opentalent", "desc": "开源人才评价系统", "org": "湖北大学" },
- { "name": "Fountain", "desc": "仓颉语言版 Spring 框架替代", "org": "江汉大学" },
- { "name": "deepin", "desc": "深度桌面操作系统", "org": "深之度" },
- { "name": "RustSBI", "desc": "RISC-V 安全引导程序", "org": "华中科技大学" },
- { "name": "NextDenovo", "desc": "长读长序列组装工具", "org": "武汉希望组" }
+ { 'name': '调问(DWSurvey)', 'desc': '开源问卷表单系统', 'org': '极推科技' },
+ { 'name': 'Eova', 'desc': '低代码开发平台', 'org': '武汉简码' },
+ { 'name': 'ClickVisual', 'desc': '可视化日志分析告警平台', 'org': '武汉初心' },
+ { 'name': 'Meta2d.js', 'desc': '2D图元可视化引擎', 'org': '乐吾乐科技' },
+ { 'name': 'Juno', 'desc': '分布式微服务管理系统', 'org': '武汉斗鱼' },
+ { 'name': 'Opentalent', 'desc': '开源人才评价系统', 'org': '湖北大学' },
+ { 'name': 'Fountain', 'desc': '仓颉语言版 Spring 框架替代', 'org': '江汉大学' },
+ { 'name': 'deepin', 'desc': '深度桌面操作系统', 'org': '深之度' },
+ { 'name': 'RustSBI', 'desc': 'RISC-V 安全引导程序', 'org': '华中科技大学' },
+ { 'name': 'NextDenovo', 'desc': '长读长序列组装工具', 'org': '武汉希望组' }
]);
const chinaExcellentProjects = ref([
{
- "name": "Deepin 深度操作系统",
- "desc": "国内领先的国产 Linux 发行版,旨在为全球用户提供美观易用、安全可靠的操作系统体验,是国产软件生态的核心。",
- "org": "武汉深之度"
+ 'name': 'Deepin 深度操作系统',
+ 'desc': '国内领先的国产 Linux 发行版,旨在为全球用户提供美观易用、安全可靠的操作系统体验,是国产软件生态的核心。',
+ 'org': '武汉深之度'
},
{
- "name": "Jupiter 微服务治理框架",
- "desc": "由斗鱼研发并开源的面向治理的微服务框架,支持多数据源、多注册中心,适用于高并发场景。",
- "org": "武汉斗鱼"
+ 'name': 'Jupiter 微服务治理框架',
+ 'desc': '由斗鱼研发并开源的面向治理的微服务框架,支持多数据源、多注册中心,适用于高并发场景。',
+ 'org': '武汉斗鱼'
},
{
- "name": "RustSBI 安全引导程序",
- "desc": "基于 Rust 语言开发的 RISC-V 指令集体系结构安全引导程序,提供更高内存安全性。",
- "org": "华中科技大学"
+ 'name': 'RustSBI 安全引导程序',
+ 'desc': '基于 Rust 语言开发的 RISC-V 指令集体系结构安全引导程序,提供更高内存安全性。',
+ 'org': '华中科技大学'
},
{
- "name": "芯片开源 EDA 研发",
- "desc": "致力于国产电子设计自动化工具开源化,解决芯片设计环节中的关键技术难题。",
- "org": "华中科技大学"
+ 'name': '芯片开源 EDA 研发',
+ 'desc': '致力于国产电子设计自动化工具开源化,解决芯片设计环节中的关键技术难题。',
+ 'org': '华中科技大学'
},
{
- "name": "LuoJiaSET 框架与 LuoJiaSET 样本库",
- "desc": "专注于智能遥感影像解译,提供海量遥感样本数据集和深度学习框架。",
- "org": "武汉大学"
+ 'name': 'LuoJiaSET 框架与 LuoJiaSET 样本库',
+ 'desc': '专注于智能遥感影像解译,提供海量遥感样本数据集和深度学习框架。',
+ 'org': '武汉大学'
},
{
- "name": "鲲鹏安全库 (Kunpengsecl)",
- "desc": "基于鲲鹏处理器的机密计算和受信任执行环境安全开发库,支撑云计算与隐私计算。",
- "org": "武汉大学"
+ 'name': '鲲鹏安全库 (Kunpengsecl)',
+ 'desc': '基于鲲鹏处理器的机密计算和受信任执行环境安全开发库,支撑云计算与隐私计算。',
+ 'org': '武汉大学'
},
{
- "name": "柚坛工具箱 (Uotan Toolbox)",
- "desc": "针对 Android 发烧友开发的图形化综合工具箱,集成刷机、系统优化等多种功能。",
- "org": "武昌理工学院"
+ 'name': '柚坛工具箱 (Uotan Toolbox)',
+ 'desc': '针对 Android 发烧友开发的图形化综合工具箱,集成刷机、系统优化等多种功能。',
+ 'org': '武昌理工学院'
},
{
- "name": "凹语言 (Wa Language)",
- "desc": "国内首个针对 WebAssembly 设计的通用编程语言,兼具 Web 灵活性与原生运行速度。",
- "org": "武汉凹语言"
+ 'name': '凹语言 (Wa Language)',
+ 'desc': '国内首个针对 WebAssembly 设计的通用编程语言,兼具 Web 灵活性与原生运行速度。',
+ 'org': '武汉凹语言'
},
{
- "name": "OpenHIS 开源医疗系统",
- "desc": "开源的医院信息系统,旨在通过标准化、模块化方式赋能基层医疗机构数字化升级。",
- "org": "武汉新致新源"
+ 'name': 'OpenHIS 开源医疗系统',
+ 'desc': '开源的医院信息系统,旨在通过标准化、模块化方式赋能基层医疗机构数字化升级。',
+ 'org': '武汉新致新源'
},
{
- "name": "NextDenovo",
- "desc": "高效且精确的长读长序列纠错和组装工具,主要用于基因组测序领域。",
- "org": "武汉希望组生物科技有限公司"
+ 'name': 'NextDenovo',
+ 'desc': '高效且精确的长读长序列纠错和组装工具,主要用于基因组测序领域。',
+ 'org': '武汉希望组生物科技有限公司'
}
]);
-// 城市社区数量
-const cityCommunityData = {
- xAxis: ['北京', '上海', '深圳', '杭州', '武汉', '成都'],
- data: [42, 38, 35, 28, 22, 18]
-};
-
// 武汉知名社区数据
const wuhanCommunities = ref([
{ name: 'Deepin (深度)', type: '操作系统', slogan: '最大的国产桌面操作系统开源社区' },
@@ -397,11 +452,11 @@ let communityTimer: NodeJS.Timeout | null = null;
const switchCommunityTab = () => {
if (activeCommunityTab.value === 1) {
- activeCommunityTab.value = 0
+ activeCommunityTab.value = 0;
nextTick(() => initCommunityRankChart());
pauseCommunityScroll();
} else {
- activeCommunityTab.value = 1
+ activeCommunityTab.value = 1;
nextTick(() => startCommunityScroll());
}
};
@@ -428,10 +483,10 @@ const currentProjectList = computed(() => {
});
const switchTab = (index: number) => {
- if(activeTab.value===1) {
- activeTab.value = 0
+ if (activeTab.value === 1) {
+ activeTab.value = 0;
} else {
- activeTab.value = 1
+ activeTab.value = 1;
}
nextTick(() => {
if (scrollContainer2.value) scrollContainer2.value.scrollTop = 0;
@@ -442,37 +497,63 @@ const switchTab = (index: number) => {
const chartData = ref({
cityProject: {
- xAxis: ['北京', '上海', '深圳', '杭州', '武汉', '成都', '广州'],
- data: [12500, 11200, 9800, 8500, 6200, 5800, 5400]
+ xAxis: ['北京', '上海', '深圳', '杭州', '广州', '成都', '武汉', '南京', '西安', '重庆'],
+ data: [757259, 678614, 343417, 315406, 177003, 168300, 120827, 111593, 58678, 56564]
},
talent: {
- xAxis: ['北京', '深圳', '上海', '杭州', '武汉', '南京'],
- data: [45000, 38000, 36000, 28000, 22000, 15000]
+ xAxis: ['北京', '上海', '广州', '深圳', '成都', '杭州', '武汉', '南京', '郑州', '长沙'],
+ data: [2115924, 1591988, 1555240, 1163580, 894108, 830306, 791335, 733581, 553397, 487971]
},
communityRank: {
xAxis: ['Deepin', 'OpenHarmony', 'MindSpore', 'IoTDB', 'GoFrame'],
data: [95, 92, 88, 76, 72]
},
club: {
- xAxis: ['北京', '武汉', '上海', '西安', '南京'],
- data: [28, 24, 20, 18, 15]
+ xAxis: ['成都', '北京', '上海', '武汉','重庆', '深圳', '苏州', '杭州', '合肥', '青岛' ],
+ data: [10, 7, 5, 4, 3, 2, 2, 2, 2, 2]
},
policy: {
- xAxis: ['北京', '上海', '广东', '江苏', '湖北', '浙江'],
- data: [12, 10, 9, 8, 7, 6]
+ xAxis: [
+ '江苏', '北京', '浙江', '广东', '上海', '湖北', '天津',
+ '陕西', '河南', '云南'
+ // '黑龙江','安徽省', '重庆市', '宁夏回族自治区', '山东省', '湖南省'
+ ],
+ data: [11, 7, 3, 3, 3, 2, 2, 2, 2, 2
+ // 2, 2, 1, 1, 1, 1
+ ]
},
campus: {
- xAxis: ['武汉', '北京', '成都', '深圳', '西安'],
- data: [35, 32, 25, 20, 18]
+ xAxis: [
+ '南京', '武汉', '北京', '长沙', '成都', '上海', '天津', '深圳',
+ '济南', '广州'
+ // '呼和浩特', '长春', '吉林', '沈阳', '苏州', '青岛',
+ // '惠州', '合肥', '佛山', '南昌', '南充', '徐州', '西安', '郑州',
+ // '贵阳', '线上', '哈尔滨', '宜宾', '杭州', '太原', '大连', '银川',
+ // '西宁', '中山', '乐山', '内江', '泸州', '常德', '昌吉', '桂林',
+ // '福州', '常州', '库尔勒', '兰州', '温州', '鄂州', '乌鲁木齐', '日照',
+ // '无锡', '重庆', '东莞', '赣州'
+ ],
+ data: [
+ 20, 16, 16, 16, 11, 10, 8, 8, 7, 6
+ // 5, 4, 3, 3, 3, 3,
+ // 3, 3, 3, 3, 3, 2, 2, 2,
+ // 2, 2, 2, 2, 2, 2, 2, 1,
+ // 1, 1, 1, 1, 1, 1, 1, 1,
+ // 1, 1, 1, 1, 1, 1, 1, 1,
+ // 1, 1, 1, 1
+ ]
},
mirrors: {
- xAxis: ['清华TUNA', '中科大', '阿里', '华为', '华科HUST', '网易', '腾讯'],
- data: [520, 480, 450, 420, 380, 300, 280]
+ xAxis: [
+ '上海', '北京', '西安', '重庆', '济南', '南京', '武汉', '合肥', '香港',
+ '长春', '成都', '深圳', '兰州', '哈尔滨', '南阳', '杭州'
+ ],
+ data: [4, 4, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
}
});
// 数据定义
-const developerNames = ['白纯骢', '陆红旭', '蔡冬亮', '张继德', '蒋周奇', '张天雄', '阮文俊', '李奇', '陈鹏轩', '杨帆'];
+const developerNames = ['白纯骢', '陆红旭', '慕冬亮', '张继德', '蒋周奇', '张天雄', '阮文俊', '李奇', '陈鹏轩', '杨帆'];
const developerScrollRef = ref
(null);
let developerTimer: NodeJS.Timeout | null = null;
@@ -507,7 +588,7 @@ const isEmpty = ref({
club: false, policy: false, campus: false, mirrors: false
});
-const chartInstances = ref<{[key: string]: echarts.ECharts | null}>({});
+const chartInstances = ref<{ [key: string]: echarts.ECharts | null }>({});
const scrollContainer1 = ref(null);
const scrollContainer2 = ref(null);
const scrollTimers: { [key: number]: NodeJS.Timeout | null } = { 1: null, 2: null };
@@ -529,7 +610,9 @@ const autoScroll = (key: number) => {
}, 40);
};
-const pauseScroll = (key: number) => { if (scrollTimers[key]) clearInterval(scrollTimers[key]!); };
+const pauseScroll = (key: number) => {
+ if (scrollTimers[key]) clearInterval(scrollTimers[key]!);
+};
const resumeScroll = (key: number) => autoScroll(key);
// ================= 图表初始化=================
@@ -539,31 +622,37 @@ const colorPalette = ['#3b82f6', '#06b6d4', '#8b5cf6', '#ec4899', '#f59e0b']; //
const initCityProjectChart = () => {
const el = document.getElementById('cityProjectChart');
- if(!el) return;
+ if (!el) return;
const myChart = echarts.init(el);
chartInstances.value.cityProject = myChart;
myChart.setOption({
tooltip: { trigger: 'axis', valueFormatter: (value: any) => value + ' 个' },
grid: commonGrid,
xAxis: { type: 'category', data: chartData.value.cityProject.xAxis, axisLabel: { color: '#666', fontSize: 11 } },
- yAxis: { type: 'value',name: '单位:个', splitLine: { lineStyle: { type: 'dashed', color: '#eee' } } },
+ yAxis: { type: 'value', name: '单位:个', splitLine: { lineStyle: { type: 'dashed', color: '#eee' } } },
series: [{
type: 'bar', data: chartData.value.cityProject.data, barWidth: '50%',
- itemStyle: { borderRadius: [4, 4, 0, 0], color: new echarts.graphic.LinearGradient(0,0,0,1,[{offset:0,color:'#4F46E5'},{offset:1,color:'#818CF8'}]) }
+ itemStyle: {
+ borderRadius: [4, 4, 0, 0],
+ color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ offset: 0, color: '#4F46E5' }, {
+ offset: 1,
+ color: '#818CF8'
+ }])
+ }
}]
});
};
const initTalentChart = () => {
const el = document.getElementById('talentChart');
- if(!el) return;
+ if (!el) return;
const myChart = echarts.init(el);
chartInstances.value.talent = myChart;
myChart.setOption({
tooltip: { trigger: 'axis', valueFormatter: (value: any) => value + ' 人' },
grid: commonGrid,
xAxis: { type: 'category', data: chartData.value.talent.xAxis, axisLabel: { color: '#666' } },
- yAxis: { type: 'value',name: '单位:人', splitLine: { lineStyle: { type: 'dashed', color: '#eee' } } },
+ yAxis: { type: 'value', name: '单位:人', splitLine: { lineStyle: { type: 'dashed', color: '#eee' } } },
series: [{
type: 'bar', data: chartData.value.talent.data, barWidth: '50%',
itemStyle: { borderRadius: [4, 4, 0, 0], color: '#F97316' } // 橙色
@@ -573,17 +662,28 @@ const initTalentChart = () => {
const initDeveloperChart = () => {
const el = document.getElementById('developerChart');
- if(!el) return;
+ if (!el) return;
const myChart = echarts.init(el);
chartInstances.value.developer = myChart;
myChart.setOption({
tooltip: { trigger: 'axis', valueFormatter: (value: any) => value + ' 贡献分' },
grid: { left: '3%', right: '5%', bottom: '15px', top: '5%', containLabel: true },
xAxis: { type: 'value', show: false }, // 隐藏x轴
- yAxis: { type: 'category', data: chartData.value.developer.yAxis.reverse(), axisLine: {show: false}, axisTick: {show: false}, axisLabel: { color: '#333', fontWeight: 500 } },
+ yAxis: {
+ type: 'category',
+ data: chartData.value.developer.yAxis.reverse(),
+ axisLine: { show: false },
+ axisTick: { show: false },
+ axisLabel: { color: '#333', fontWeight: 500 }
+ },
series: [{
type: 'bar', data: chartData.value.developer.data.reverse(), barWidth: 16,
- itemStyle: { color: new echarts.graphic.LinearGradient(1,0,0,0,[{offset:0,color:'#7C3AED'},{offset:1,color:'#C4B5FD'}]), borderRadius: [0, 8, 8, 0] },
+ itemStyle: {
+ color: new echarts.graphic.LinearGradient(1, 0, 0, 0, [{ offset: 0, color: '#7C3AED' }, {
+ offset: 1,
+ color: '#C4B5FD'
+ }]), borderRadius: [0, 8, 8, 0]
+ },
label: { show: false } // **修改点:隐藏具体分数**
}]
});
@@ -591,16 +691,20 @@ const initDeveloperChart = () => {
const initCommunityRankChart = () => {
const el = document.getElementById('communityRankChart');
- if(!el) return;
+ if (!el) return;
const myChart = echarts.init(el);
myChart.setOption({
tooltip: { trigger: 'axis', valueFormatter: (val: any) => val + ' 个' },
grid: { left: '3%', right: '4%', bottom: '15px', top: '22%', containLabel: true },
- xAxis: { type: 'category', data: ['北京', '上海', '深圳', '杭州', '武汉', '成都'], axisLabel: { color: '#666' } },
+ xAxis: {
+ type: 'category',
+ data: ['北京', '深圳', '上海', '杭州', '广州', '成都', '南京', '武汉'],
+ axisLabel: { color: '#666' }
+ },
yAxis: { type: 'value', name: '单位:个', nameTextStyle: { color: '#999' } },
series: [{
type: 'bar',
- data: [42, 38, 35, 28, 22, 18],
+ data: [69, 35, 31, 25, 18, 15, 12, 12],
barWidth: '40%',
itemStyle: { borderRadius: [4, 4, 0, 0], color: '#3b82f6' }
}]
@@ -609,14 +713,14 @@ const initCommunityRankChart = () => {
const initClubChart = () => {
const el = document.getElementById('clubChart');
- if(!el) return;
+ if (!el) return;
const myChart = echarts.init(el);
chartInstances.value.club = myChart;
myChart.setOption({
tooltip: { trigger: 'axis', valueFormatter: (value: any) => value + ' 个' },
grid: commonGrid,
xAxis: { type: 'category', data: chartData.value.club.xAxis, axisLabel: { color: '#666' } },
- yAxis: { type: 'value',name: '单位:个', splitLine: { lineStyle: { type: 'dashed', color: '#eee' } } },
+ yAxis: { type: 'value', name: '单位:个', splitLine: { lineStyle: { type: 'dashed', color: '#eee' } } },
series: [{
type: 'line', data: chartData.value.club.data,
smooth: true, symbolSize: 8,
@@ -629,14 +733,14 @@ const initClubChart = () => {
const initPolicyChart = () => {
const el = document.getElementById('policyChart');
- if(!el) return;
+ if (!el) return;
const myChart = echarts.init(el);
chartInstances.value.policy = myChart;
myChart.setOption({
tooltip: { trigger: 'axis', valueFormatter: (value: any) => value + ' 条' },
grid: commonGrid,
- xAxis: { type: 'category', data: chartData.value.policy.xAxis, axisLabel: { color: '#666' } },
- yAxis: { type: 'value', name: '单位:条',splitLine: { lineStyle: { type: 'dashed', color: '#eee' } } },
+ xAxis: { type: 'category', data: chartData.value.policy.xAxis, axisLabel: { color: '#666', interval: 0 } },
+ yAxis: { type: 'value', name: '单位:条', splitLine: { lineStyle: { type: 'dashed', color: '#eee' } } },
series: [{
type: 'bar', data: chartData.value.policy.data, barWidth: '45%',
itemStyle: { borderRadius: [4, 4, 0, 0], color: '#2563EB' } // 蓝色
@@ -646,7 +750,7 @@ const initPolicyChart = () => {
const initCampusChart = () => {
const el = document.getElementById('campusChart');
- if(!el) return;
+ if (!el) return;
const myChart = echarts.init(el);
chartInstances.value.campus = myChart;
// **修改点:去掉三角形pictorialBar,改为美观的圆角柱状图**
@@ -654,7 +758,7 @@ const initCampusChart = () => {
tooltip: { trigger: 'axis', valueFormatter: (value: any) => value + ' 场' },
grid: commonGrid,
xAxis: { type: 'category', data: chartData.value.campus.xAxis, axisLabel: { color: '#666' } },
- yAxis: { type: 'value',name: '单位:场次', splitLine: { lineStyle: { type: 'dashed', color: '#eee' } } },
+ yAxis: { type: 'value', name: '单位:场次', splitLine: { lineStyle: { type: 'dashed', color: '#eee' } } },
series: [{
type: 'bar',
data: chartData.value.campus.data,
@@ -673,14 +777,14 @@ const initCampusChart = () => {
const initMirrorChart = () => {
const el = document.getElementById('mirrorChart');
- if(!el) return;
+ if (!el) return;
const myChart = echarts.init(el);
chartInstances.value.mirrors = myChart;
myChart.setOption({
tooltip: { trigger: 'axis', valueFormatter: (value: any) => value + ' 个节点' },
grid: { left: '3%', right: '3%', bottom: '15px', top: '15%', containLabel: true },
xAxis: { type: 'category', data: chartData.value.mirrors.xAxis, axisLabel: { color: '#666' } },
- yAxis: { type: 'value',name: '单位:个', splitLine: { lineStyle: { type: 'dashed', color: '#eee' } } },
+ yAxis: { type: 'value', name: '单位:个', splitLine: { lineStyle: { type: 'dashed', color: '#eee' } } },
series: [{
type: 'bar', data: chartData.value.mirrors.data,
barWidth: 30,
@@ -697,30 +801,49 @@ const initMirrorChart = () => {
const initCharts = () => {
nextTick(() => {
- initCityProjectChart(); initTalentChart(); initDeveloperChart();
- initCommunityRankChart(); initClubChart(); initPolicyChart();
- initCampusChart(); initMirrorChart();
+ initCityProjectChart();
+ initTalentChart();
+ initDeveloperChart();
+ initCommunityRankChart();
+ initClubChart();
+ initPolicyChart();
+ initCampusChart();
+ initMirrorChart();
});
};
const init = () => {
nextTick(() => {
- initCityProjectChart(); initTalentChart(); initDeveloperChart();
- initCommunityRankChart(); initClubChart(); initPolicyChart();
- initCampusChart(); initMirrorChart();
+ initCityProjectChart();
+ initTalentChart();
+ initDeveloperChart();
+ initCommunityRankChart();
+ initClubChart();
+ initPolicyChart();
+ initCampusChart();
+ initMirrorChart();
- autoScroll(1); autoScroll(2);startCommunityScroll();startDeveloperScroll();
+ autoScroll(1);
+ autoScroll(2);
+ startCommunityScroll();
+ startDeveloperScroll();
});
-}
+};
const unInit = () => {
Object.values(scrollTimers).forEach(t => t && clearInterval(t));
pauseDeveloperScroll();
pauseCommunityScroll();
-}
+};
-watch(widthType, () => { init() });
-onMounted(() => { init() });
-onUnmounted(() => { unInit() });
+watch(widthType, () => {
+ init();
+});
+onMounted(() => {
+ init();
+});
+onUnmounted(() => {
+ unInit();
+});