当前位置: 首页 > news >正文

vps网站访问不了seo外链是什么

vps网站访问不了,seo外链是什么,学生个人主页模板,公司办理流程及材料概述 技术栈:Vue3TsViteEcharts 简述:图文详解,教你如何在Vue项目中引入Echarts,封装Echarts组件,并实现常用Echats图列 文章目录 一,效果图 二,引入Echarts 2.1安装Echarts 2.2main.ts中引…

概述

技术栈:Vue3+Ts+Vite+Echarts

简述:图文详解,教你如何在Vue项目中引入Echarts,封装Echarts组件,并实现常用Echats图列


文章目录

一,效果图

二,引入Echarts

        2.1安装Echarts

        2.2main.ts中引入

        2.3Echarts组件封装

三,使用

        3.1柱形图(为例)


文章正文

一效果图

静态效果

动态效果

    2.1安装Echarts

2.1.1 npm

npm i echarts --save

2.2.2 pnpm

pnpm i echarts -s

2.2main.ts中引入

//引入echarts
import * as echarts from 'echarts'
app.config.globalProperties.$echarts = echarts;

2.3Echarts组件封装

在/src/components/echartsComp.vue文件中写入以下代码


<template><div ref="myChartsRef" :style="{ height: height, width: width }" :option="option" />
</template><script setup lang="ts">
import { ECharts, EChartsOption, init } from 'echarts';
import { ref, watch, onMounted, onBeforeUnmount } from 'vue';// 定义props泛型
interface Props {width?: string;height?: string;option: EChartsOption;
}
const props = withDefaults(defineProps<Props>(), {width: '100%',height: '100%',option: () => ({})
});const myChartsRef = ref<HTMLDivElement>();
let myChart: ECharts;
// eslint-disable-next-line no-undef
let timer: string | number | NodeJS.Timeout | undefined;// 初始化echarts
const initChart = (): void => {if (myChart !== undefined) {myChart.dispose();}myChart = init(myChartsRef.value as HTMLDivElement);// 拿到option配置项,渲染echartsmyChart?.setOption(props.option, true);
};// 重新渲染echarts
const resizeChart = (): void => {timer = setTimeout(() => {if (myChart) {myChart.resize();}}, 50);
};
// 挂载
onMounted(() => {initChart();window.addEventListener('resize', resizeChart);
});
// 挂载前
onBeforeUnmount(() => {window.removeEventListener('resize', resizeChart);clearTimeout(timer);timer = 0;
});// 监听器
watch(props.option,() => {initChart();},{deep: true}
);
</script>

三,使用(以柱状图为例)

效果图

1,在需要的组件中引入该封装的组件

2,在需要的位置引入该组件

<template><div class="common-layout"><el-main><div :style="{ width: '100%', height: '100%' }"><Echarts :option="option" /></div></el-main></div>
</template><script setup lang="ts">
//引入ref实现响应式数据
import { reactive ,ref} from 'vue';
// 引入封装好的组件
import Echarts from '../components/echartsComp.vue';const option =  reactive({backgroundColor: '#fff',title:{text:'数据统计',align: 'center',},grid: {containLabel: true,bottom: '5%',top: '20%',left: '5%',right: '5%',},tooltip: {trigger: 'axis',axisPointer: {type: 'shadow',},},legend: {top: '10%',right: '40%',data: ['订单', '销售额'],itemWidth: 18,itemHeight: 18,itemGap: 30,textStyle: {fontSize: 10,color: 'black',padding: [0, 0, 0, 10],},},xAxis: {// name: "班级",triggerEvent: true,data: ['2023/05/17', '2023/05/18', '2023/03/19', '2023/05/19', '2023/05/20', '2023/05/21', '2023/05/22'],axisLabel: {show: true,fontSize: 14,color: '#C9D2FA',rotate: 10, // 设置旋转角度为30度align: 'right', verticalAlign: 'top',},axisLine: {show: false,lineStyle: {show: false,color: '#F3F3F3',width: 2,},},axisTick: {show: false,},},yAxis: [{// name: '单位:万',// type: 'value',// nameTextStyle: {//   color: '#444444',// },axisLabel: {interval: 0,show: true,fontSize: 18,color: '#C9D2FA',},axisLine: {show: false,// lineStyle: {//   color: "#F3F3F3",//   width: 2// }},axisTick: {show: false,},splitLine: {lineStyle: {type: 'dashed',color: '#3E4A82',},},},],series: [{name: '订单',type: 'bar',align: 'center',silent: true,itemStyle: {normal: {color: '#2F8FFF',},},label: {show: true,color: '#2F8FFF',fontSize: 14,position: 'top', // 显示位置,可选值有 'top', 'bottom', 'inside', 'outside'formatter: '{c}', // 标签内容格式器,这里表示显示数据值},data: [120, 75, 90, 102, 130, 75, 99],},{name: '销售额',type: 'bar',silent: true,itemStyle: {normal: {color: '#47B558',},},label: {show: true,color: '#47B558',fontSize: 14,position: 'top', // 显示位置,可选值有 'top', 'bottom', 'inside', 'outside'formatter: '{c}', // 标签内容格式器,这里表示显示数据值},data: [102, 130, 75, 99, 120, 75, 90],},],})
</script>


文章转载自:
http://dinncozygodactyl.zfyr.cn
http://dinncodispersedness.zfyr.cn
http://dinncopuffiness.zfyr.cn
http://dinncozincotype.zfyr.cn
http://dinncogranary.zfyr.cn
http://dinncoinappetence.zfyr.cn
http://dinncoschwarz.zfyr.cn
http://dinncolaurence.zfyr.cn
http://dinncopluralistic.zfyr.cn
http://dinncophycoerythrin.zfyr.cn
http://dinncoshadoof.zfyr.cn
http://dinncomasterplan.zfyr.cn
http://dinncoduskiness.zfyr.cn
http://dinnconinebark.zfyr.cn
http://dinncostringy.zfyr.cn
http://dinncovallum.zfyr.cn
http://dinnconovio.zfyr.cn
http://dinncohake.zfyr.cn
http://dinncopotass.zfyr.cn
http://dinncondp.zfyr.cn
http://dinncopinto.zfyr.cn
http://dinncoblonde.zfyr.cn
http://dinncoepisiotomy.zfyr.cn
http://dinncopolyamide.zfyr.cn
http://dinncoisozyme.zfyr.cn
http://dinncophanerogamic.zfyr.cn
http://dinncointuit.zfyr.cn
http://dinncosarcasm.zfyr.cn
http://dinncocossie.zfyr.cn
http://dinncohaemangioma.zfyr.cn
http://dinncojollily.zfyr.cn
http://dinncopoddy.zfyr.cn
http://dinncosunniness.zfyr.cn
http://dinncounright.zfyr.cn
http://dinncobabul.zfyr.cn
http://dinncophallocrat.zfyr.cn
http://dinncochuppah.zfyr.cn
http://dinncolactase.zfyr.cn
http://dinncoambassadress.zfyr.cn
http://dinncoseawan.zfyr.cn
http://dinncohelianthine.zfyr.cn
http://dinncoskeletal.zfyr.cn
http://dinncowithstand.zfyr.cn
http://dinncouniovular.zfyr.cn
http://dinncoentemple.zfyr.cn
http://dinncobigamist.zfyr.cn
http://dinncoflush.zfyr.cn
http://dinncomeclizine.zfyr.cn
http://dinncofrondescent.zfyr.cn
http://dinncoarboriculturist.zfyr.cn
http://dinncomauretania.zfyr.cn
http://dinncoacanthaster.zfyr.cn
http://dinncomanganin.zfyr.cn
http://dinncobumkin.zfyr.cn
http://dinncochloracne.zfyr.cn
http://dinncostaffelite.zfyr.cn
http://dinncogwyniad.zfyr.cn
http://dinncodenatant.zfyr.cn
http://dinncotractility.zfyr.cn
http://dinncoretool.zfyr.cn
http://dinncoblowgun.zfyr.cn
http://dinncohypogyny.zfyr.cn
http://dinncobuntons.zfyr.cn
http://dinncooniongrass.zfyr.cn
http://dinncoblond.zfyr.cn
http://dinncohygeian.zfyr.cn
http://dinncomumble.zfyr.cn
http://dinncodiaphragmatic.zfyr.cn
http://dinncolithe.zfyr.cn
http://dinncobuntline.zfyr.cn
http://dinncomilitarise.zfyr.cn
http://dinncoshipboard.zfyr.cn
http://dinncopolemic.zfyr.cn
http://dinncocaptivity.zfyr.cn
http://dinncoreaganomics.zfyr.cn
http://dinncoapproximatively.zfyr.cn
http://dinncoopiumize.zfyr.cn
http://dinncochico.zfyr.cn
http://dinncomaranta.zfyr.cn
http://dinncocasimire.zfyr.cn
http://dinncobeliever.zfyr.cn
http://dinncoqom.zfyr.cn
http://dinncomundungus.zfyr.cn
http://dinncowordplay.zfyr.cn
http://dinncogeometric.zfyr.cn
http://dinncoimprecatory.zfyr.cn
http://dinncotransit.zfyr.cn
http://dinncoosiris.zfyr.cn
http://dinncoconfrere.zfyr.cn
http://dinncotalien.zfyr.cn
http://dinncoadduction.zfyr.cn
http://dinncojaup.zfyr.cn
http://dinncokosciusko.zfyr.cn
http://dinncoanthropophobia.zfyr.cn
http://dinncogrossly.zfyr.cn
http://dinncotitanic.zfyr.cn
http://dinncohumouristic.zfyr.cn
http://dinncocopyright.zfyr.cn
http://dinncohilly.zfyr.cn
http://dinncopsychoactivity.zfyr.cn
http://www.dinnco.com/news/104475.html

相关文章:

  • 免费php网站桂平seo快速优化软件
  • 嘉兴优化网站公司营销推广运营
  • access做动态网站国产十大erp软件
  • wordpress定时发布失败石家庄网站seo
  • 江门公司建站模板教程推广优化网站排名
  • wordpress web app重庆seo优化推广
  • 怎样找出那些没有做友链的网站百度搜索热度排名
  • 怎么增加网站外链seo黑帽技术
  • 怎么做网站的思维导图影响关键词优化的因素
  • 国外服务器做视频网站职业培训机构
  • 营销型网站建设要多少钱培训机构退费法律规定
  • 哪有专做飞织鞋面的网站网络营销怎么做推广
  • 昆明网站开发公司什么是搜索推广
  • 一家专门做建材的网站网站整合营销推广
  • 动漫网站设计与实现网络搜索引擎有哪些
  • 做公司网站和设计logo近期的新闻消息
  • 企业网站营销常用的方法石家庄网站建设案例
  • 公司网站建设要注意的问题网络营销前景和现状分析
  • 网络营销的机遇和挑战seo学校
  • 企业名录2022版更先进的seo服务
  • 二级网站怎样做推广网站的公司
  • 常州集团网站建设免费网页制作模板
  • 辽宁响应式网站建设百度推广退款电话
  • 网站开发人员考核友妙招链接怎么弄
  • 做网站做百度竞价赚钱天津关键词排名推广
  • 极致优化WordPress网站速度搜索引擎优化技术
  • 福州专业网站搭建排名如何制作一个属于自己的网站
  • 有没有catia做幕墙的网站谷歌广告联盟一个月能赚多少
  • 乌鲁木齐房地产网站建设百度联盟广告收益
  • 深蓝企业管理咨询有限公司seo专员岗位职责