|  |  |  | 
|---|
|  |  |  | <template> | 
|---|
|  |  |  | <div class="home-contianer"> | 
|---|
|  |  |  | <div class="h-top"> | 
|---|
|  |  |  | <div class="h-top-left" id="h-chart1">left</div> | 
|---|
|  |  |  | <div class="h-top-center"> | 
|---|
|  |  |  | <div class="n-item"> | 
|---|
|  |  |  | <div | 
|---|
|  |  |  | @click="open(item)" | 
|---|
|  |  |  | class="item" | 
|---|
|  |  |  | :class="'item' + (index + 1)" | 
|---|
|  |  |  | v-for="(item, index) in center" | 
|---|
|  |  |  | :key="index" | 
|---|
|  |  |  | > | 
|---|
|  |  |  | <i | 
|---|
|  |  |  | style="font-size: 30px; padding-bottom: 10px" | 
|---|
|  |  |  | :class="item.icon" | 
|---|
|  |  |  | :size="20" | 
|---|
|  |  |  | ></i> | 
|---|
|  |  |  | <br /> | 
|---|
|  |  |  | {{ item.title }} | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="h-top-right task-table"> | 
|---|
|  |  |  | <h3 class="h3">#框架Vue3.x版本变更说明</h3> | 
|---|
|  |  |  | <table border="0" cellspacing="0" cellpadding="0"> | 
|---|
|  |  |  | <tr v-for="(row, index) in list" :key="index"> | 
|---|
|  |  |  | <td>{{ index + 1 }}</td> | 
|---|
|  |  |  | <td>{{ row.desc }}</td> | 
|---|
|  |  |  | </tr> | 
|---|
|  |  |  | </table> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="h-chart"> | 
|---|
|  |  |  | <div class="h-left-grid"> | 
|---|
|  |  |  | <div class="item" v-for="(item, index) in grid" :key="index"> | 
|---|
|  |  |  | <div class="icon-text"> | 
|---|
|  |  |  | <i :class="item.icon"></i> | 
|---|
|  |  |  | <span class="name">{{ item.name }}</span> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="desc">{{ item.desc }}</div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div id="h-chart2"></div> | 
|---|
|  |  |  | <div id="h-chart3"></div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div style="display: flex;"> | 
|---|
|  |  |  | <div | 
|---|
|  |  |  | id="h-chart4" | 
|---|
|  |  |  | style="height: 350px; background: white; flex: 1;padding-top:15px;" | 
|---|
|  |  |  | ></div> | 
|---|
|  |  |  | <div | 
|---|
|  |  |  | id="h-chart5" | 
|---|
|  |  |  | style="height: 350px; background: white; flex: 1;padding-top:15px;" | 
|---|
|  |  |  | ></div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  | <script> | 
|---|
|  |  |  | import * as echarts from 'echarts'; | 
|---|
|  |  |  | import { chart1, chart2, chart3, chart4 } from './home/home-chart-options'; | 
|---|
|  |  |  | import { ref, onMounted, onUnmounted } from 'vue'; | 
|---|
|  |  |  | var $chart2; | 
|---|
|  |  |  | export default { | 
|---|
|  |  |  | components: {}, | 
|---|
|  |  |  | data() { | 
|---|
|  |  |  | return { | 
|---|
|  |  |  | center: [ | 
|---|
|  |  |  | { | 
|---|
|  |  |  | title: 'GitHub', | 
|---|
|  |  |  | icon: 'el-icon-set-up', | 
|---|
|  |  |  | url: 'https://github.com/cq-panda/Vue.NetCore' | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | { | 
|---|
|  |  |  | title: 'Gitee', | 
|---|
|  |  |  | icon: 'el-icon-turn-off', | 
|---|
|  |  |  | url: 'https://gitee.com/x_discoverer/Vue.NetCore' | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | { | 
|---|
|  |  |  | title: '框架Vue2版本', | 
|---|
|  |  |  | icon: 'el-icon-reading', | 
|---|
|  |  |  | url: 'http://v2.volcore.xyz' | 
|---|
|  |  |  | }, | 
|---|
|  |  |  |  | 
|---|
|  |  |  | { | 
|---|
|  |  |  | title: '框架视频', | 
|---|
|  |  |  | icon: 'el-icon-document', | 
|---|
|  |  |  | url: 'https://www.cctalk.com/m/group/90268531' | 
|---|
|  |  |  | }, | 
|---|
|  |  |  |  | 
|---|
|  |  |  | { | 
|---|
|  |  |  | title: '小程序/app/h5', | 
|---|
|  |  |  | icon: 'el-icon-chat-line-round', | 
|---|
|  |  |  | url: 'http://v2.volcore.xyz/app/guide' | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | { | 
|---|
|  |  |  | title: 'QQ4群:959924606', | 
|---|
|  |  |  | icon: 'el-icon-chat-dot-round', | 
|---|
|  |  |  | url: 'https://qm.qq.com/cgi-bin/qm/qr?k=YRZBbf64qsUeEmh24I65u2aIZFn2C-Ha&jump_from=webapi&qr=1' | 
|---|
|  |  |  | } | 
|---|
|  |  |  | ], | 
|---|
|  |  |  |  | 
|---|
|  |  |  | n: 90, | 
|---|
|  |  |  | value1: '1', | 
|---|
|  |  |  | applicants: { | 
|---|
|  |  |  | //报名信息 | 
|---|
|  |  |  | day: 20, //本日 | 
|---|
|  |  |  | week: 150, //本周 | 
|---|
|  |  |  | month: 1200, //本月 | 
|---|
|  |  |  | totalBoy: 800, | 
|---|
|  |  |  | totalGirl: 890, | 
|---|
|  |  |  | taotal: 1690 | 
|---|
|  |  |  | }, //报名信息 | 
|---|
|  |  |  | list: [ | 
|---|
|  |  |  | { desc: '框架2.x版本不支持直接升级Vue3版本(代码生成器已修改)' }, | 
|---|
|  |  |  | { desc: '框架使用的Element Plus组件,移除了Iview组件的依赖' }, | 
|---|
|  |  |  | { desc: '框架内部组件全部重新优化,相比2.x版本首屏大小减少60%' }, | 
|---|
|  |  |  | { desc: '框架Vue2版本会继续维护,并与Vue3版本同步更新,请放心使用' }, | 
|---|
|  |  |  | { desc: '框架Vue2、Vue3版本开发文档一致(差异部分文档会备注说明)' }, | 
|---|
|  |  |  | //{ desc: "若正在使用Vue2框架版本继续使用即可;其他建议使用Vue3版本" }, | 
|---|
|  |  |  | { | 
|---|
|  |  |  | desc: 'vue2、vue3文档相同,开文档大部分文档仍然使用的vue2语法' | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | { | 
|---|
|  |  |  | desc: '自定义部分既可以使用vue3语法与可以使用vue3语法' | 
|---|
|  |  |  | } | 
|---|
|  |  |  | //(框架内部组件vue2/3语法都在使用),你也可以使用vue3语法 | 
|---|
|  |  |  | ], | 
|---|
|  |  |  | grid: [ | 
|---|
|  |  |  | { | 
|---|
|  |  |  | name: '用户管理', | 
|---|
|  |  |  | desc: '系统用户管理,注册用户3000000人。', | 
|---|
|  |  |  | icon: 'el-icon-user' | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | { | 
|---|
|  |  |  | name: '站内消息', | 
|---|
|  |  |  | desc: '您有一条新的消息,请及时处理。', | 
|---|
|  |  |  | icon: 'el-icon-chat-dot-round' | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | { | 
|---|
|  |  |  | name: '系统管理', | 
|---|
|  |  |  | desc: '这里放点什么,还没想好。', | 
|---|
|  |  |  | icon: 'el-icon-setting' | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | { | 
|---|
|  |  |  | name: '还没想好', | 
|---|
|  |  |  | desc: '这里不知道应该放点什么或者写点什么。', | 
|---|
|  |  |  | icon: 'el-icon-document' | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | { | 
|---|
|  |  |  | name: '语音导航', | 
|---|
|  |  |  | desc: '高德地图林志玲为您语音导航。', | 
|---|
|  |  |  | icon: 'el-icon-microphone' | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | { | 
|---|
|  |  |  | name: '垃圾回收', | 
|---|
|  |  |  | desc: '删除过的数据在此处找回。。。。', | 
|---|
|  |  |  | icon: 'el-icon-delete' | 
|---|
|  |  |  | } | 
|---|
|  |  |  | ] | 
|---|
|  |  |  | }; | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | setup() { | 
|---|
|  |  |  | 
|---|
|  |  |  | }; | 
|---|
|  |  |  | let interval; | 
|---|
|  |  |  | onMounted(() => { | 
|---|
|  |  |  | $chart = echarts.init(document.getElementById('h-chart1')); | 
|---|
|  |  |  | $chart.setOption(chart1); | 
|---|
|  |  |  | $chart2 = echarts.init(document.getElementById('h-chart2')); | 
|---|
|  |  |  | $chart2.setOption(chart2); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // interval = setInterval(() => { | 
|---|
|  |  |  | //   chart2.xAxis[0].data.splice(0, 1); | 
|---|
|  |  |  | 
|---|
|  |  |  | //   chart2.series[1].data.push(~~(Math.random() * 1000)); | 
|---|
|  |  |  | //   $chart2.setOption(chart2); | 
|---|
|  |  |  | // }, 2000); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | $chart3 = echarts.init(document.getElementById('h-chart3')); | 
|---|
|  |  |  | $chart3.setOption(chart3); | 
|---|
|  |  |  | let $chart4 = echarts.init(document.getElementById('h-chart4')); | 
|---|
|  |  |  | $chart4.setOption(chart4); | 
|---|
|  |  |  | let $chart5 = echarts.init(document.getElementById('h-chart5')); | 
|---|
|  |  |  | $chart5.setOption(chart2); | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | onUnmounted(() => { | 
|---|
|  |  |  | interval && clearInterval(interval); | 
|---|
|  |  |  | if ($chart) { | 
|---|
|  |  |  | $chart.dispose(); | 
|---|
|  |  |  | $chart2.dispose(); | 
|---|
|  |  |  | $chart3.dispose(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | return { open }; | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | destroyed() { | 
|---|
|  |  |  | $chart2 = null; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }; | 
|---|
|  |  |  | var $chart, $chart2, $chart3; | 
|---|
|  |  |  | // window.addEventListener("resize", function () { | 
|---|
|  |  |  | //   $chart2.setOption(chart2); | 
|---|
|  |  |  | // }); | 
|---|