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

wordpress 主题更改怎样优化网站关键词排名靠前

wordpress 主题更改,怎样优化网站关键词排名靠前,wordpress排版错误,长春是几线城市2021效果图如下: 思路: 1.首先我想到的就是使用图标库echarts或ucharts,可是找了找没有找到类似的。 2.其次我就想用画布来实现这个效果,直接上手。(app-vue和小程序均可以实现,但是在app-nvue页面不支持画布…

效果图如下:

思路:

1.首先我想到的就是使用图标库echarts或ucharts,可是找了找没有找到类似的。

2.其次我就想用画布来实现这个效果,直接上手。(app-vue和小程序均可以实现,但是在app-nvue页面不支持画布,尝试了一下再nvue页面直接导致程序闪退)

3.后来,使用手动创建一个竖向的类似效果。

注意:

1.app-nvue页面不支持画布效果,官方说引入插件支持,但直接导致闪退。

2.map很多参数app端仅支持app-nvue页面。

方法一 使用画布进行绘制(不支持app-nvue)

<template><view class="container"><canvas :canvas-id="canvasId" style="width: 300px; height: 300px;"></canvas></view>
</template><script>export default {data() {return {canvasId: "canvas",pollutionLevels: [{level: "优",color: "#00FF00",percent: 0.133,mark: "35"},{level: "良",color: "#FFFF00",percent: 0.133,mark: "75"},{level: "轻度",color: "#ff5500",percent: 0.133,mark: "115"},{level: "中度",color: "#FF0000",percent: 0.133,mark: "150"},{level: "重度",color: "#860000",percent: 0.133,mark: "250"},{level: "严重",color: "#510000",percent: 0.133,mark: "500"}]};},mounted() {this.drawChart();},methods: {drawChart() {const ctx = uni.createCanvasContext(this.canvasId, this);const startX = 0; // 图表起始位置X坐标const startY = 20; // 图表起始位置Y坐标const chartWidth = 260; // 图表宽度const chartHeight = 10; // 图表高度const textHeight = 20; // 标题高度const markfontSize = 10; //标点信息字体大小const fideWeight = 10 //减去范围坐标点的宽度const fideHeight = 44 //加上范围坐标点的高度const tdPaddingHeight = 4 //垂直距离高度let x = startX;const y = startY;let nextX = 0; // 下一个起始位置的x坐标function drawColorBlock(color, width, height) {ctx.setFillStyle(color);ctx.fillRect(x, y, width, height);}function drawText(text, width) {ctx.setFontSize(markfontSize);ctx.setFillStyle("#000000");const textWidth = ctx.measureText(text).width; // 计算文字宽度const textX = x + (width - textWidth) / 2; // 水平居中对齐ctx.fillText(text, textX, y - chartHeight + tdPaddingHeight); //在图表的上方}function drawMarkText(text) {ctx.setFontSize(markfontSize);ctx.setFillStyle("#000000");const textWidth = ctx.measureText(text).width; // 计算文字宽度const textX = startX + nextX - fideWeight - textWidth / 2; // 水平居中对齐if (text === "0") {ctx.fillText("0", startX, y - textHeight + fideHeight);} else {ctx.fillText(text, textX + 10, y - textHeight + fideHeight);}}this.pollutionLevels.forEach(level => {const width = chartWidth * level.percent;nextX = x + width; // 记录下一个起始位置的x坐标// 绘制颜色区块drawColorBlock(level.color, width, chartHeight);// 绘制标题drawText(level.level, width);drawMarkText(level.mark);if (level.level==='优') {drawMarkText("0");drawMarkText(level.mark);}x = nextX; // 更新起始位置的x坐标});ctx.draw();}}}
</script>

实现效果图如下

方法二 使用盒子创建竖向对应(比较笨拙,但是app-nvue页面只能这样来实现了)

这里我封装了一个方法

组件代码

<template><view class="legend-section"><view class="rowlist" v-for="(item,index) in list" :key="index"><view class="bgColor" :style="{'width':'50rpx','height':'20rpx','background-color':item.bgColor}"></view><view class="mark"><text style="font-size: 22rpx;">{{item.mark}}</text></view></view></view>
</template><script>export default {props: {legendList: {type: [Array],default: () => []},},data() {return {list: []}},watch: {legendList: {handler: function(newVal) {const datas = JSON.parse(newVal)datas.forEach((ele) => {if (ele.mark === '优') {ele.bgColor = "#00FF00"} else if (ele.mark === '良') {ele.bgColor = "#FFFF00"} else if (ele.mark === '轻度') {ele.bgColor = "#ff5500"} else if (ele.mark === '中度') {ele.bgColor = "#FF0000"} else if (ele.mark === '重度') {ele.bgColor = "#860000"} else if (ele.mark === '严重') {ele.bgColor = "#510000"} else if (ele.mark === '离线') {ele.bgColor = "#818181"} })this.list = datas},deep: true, // 深度监听immediate: true // 立即执行}},}
</script><style lang="scss" scoped>.legend-section {border-radius: 2rpx;padding: 10rpx;}.rowlist {display: flex;flex-flow: row nowrap;align-items: center;justify-content: flex-start;margin: 10rpx 12rpx;}.mark {padding-left: 10rpx;}
</style>

调用组件

	<cover-view class="maplegend-list" v-if="legendFlag"><legend :legend-list="legendList"></legend></cover-view>//数据初始化legendList: [], //图例信息//传入数据this.legendList = JSON.stringify(legendList.data) //图例信息  

实现效果如下

总而言之,app-nvue页面有很大的性能提升,但总会牺牲一些东西来弥补。app-nvue页面css很多有局限性,仔细阅读文档。


文章转载自:
http://dinncofixup.bkqw.cn
http://dinncofeatheriness.bkqw.cn
http://dinncoinvigorator.bkqw.cn
http://dinncoianthe.bkqw.cn
http://dinncoolivine.bkqw.cn
http://dinncoextrovert.bkqw.cn
http://dinncopteridoid.bkqw.cn
http://dinncopostcommunion.bkqw.cn
http://dinncoskinnerian.bkqw.cn
http://dinncocere.bkqw.cn
http://dinncofrontlet.bkqw.cn
http://dinncolaicise.bkqw.cn
http://dinncoencode.bkqw.cn
http://dinncodenationalization.bkqw.cn
http://dinncowynd.bkqw.cn
http://dinncoblotting.bkqw.cn
http://dinncoperspicuous.bkqw.cn
http://dinncodropt.bkqw.cn
http://dinncoalive.bkqw.cn
http://dinncolongshore.bkqw.cn
http://dinncoantimilitarism.bkqw.cn
http://dinncoenscroll.bkqw.cn
http://dinncoproximo.bkqw.cn
http://dinncomelodics.bkqw.cn
http://dinncolothian.bkqw.cn
http://dinncolipographic.bkqw.cn
http://dinncobetatron.bkqw.cn
http://dinncoquandary.bkqw.cn
http://dinncobestrode.bkqw.cn
http://dinncodruther.bkqw.cn
http://dinncoretem.bkqw.cn
http://dinncopolymath.bkqw.cn
http://dinncosural.bkqw.cn
http://dinncohallucinosis.bkqw.cn
http://dinncocaracole.bkqw.cn
http://dinncostamineal.bkqw.cn
http://dinncoandvari.bkqw.cn
http://dinncochemotherapeutant.bkqw.cn
http://dinncomultipole.bkqw.cn
http://dinncoimmaculacy.bkqw.cn
http://dinncodisabuse.bkqw.cn
http://dinncosbn.bkqw.cn
http://dinncodeformation.bkqw.cn
http://dinncomicrocamera.bkqw.cn
http://dinncoheterogamy.bkqw.cn
http://dinncorapc.bkqw.cn
http://dinncofictionalization.bkqw.cn
http://dinncogamma.bkqw.cn
http://dinncohomonymous.bkqw.cn
http://dinncolaevogyrate.bkqw.cn
http://dinncoprotectory.bkqw.cn
http://dinncoalgerish.bkqw.cn
http://dinncoindignantly.bkqw.cn
http://dinncorarebit.bkqw.cn
http://dinncodialogism.bkqw.cn
http://dinncoterminology.bkqw.cn
http://dinncoresponder.bkqw.cn
http://dinncohustler.bkqw.cn
http://dinncofunabout.bkqw.cn
http://dinncopeaty.bkqw.cn
http://dinncobriery.bkqw.cn
http://dinncoconduplicate.bkqw.cn
http://dinncocesspipe.bkqw.cn
http://dinncotimbrel.bkqw.cn
http://dinncopookoo.bkqw.cn
http://dinncostaffwork.bkqw.cn
http://dinncoparisienne.bkqw.cn
http://dinncoknapsack.bkqw.cn
http://dinncoappreciatory.bkqw.cn
http://dinncodolphin.bkqw.cn
http://dinncoodoriferous.bkqw.cn
http://dinncoallegheny.bkqw.cn
http://dinncotuner.bkqw.cn
http://dinncobison.bkqw.cn
http://dinncoiktas.bkqw.cn
http://dinncomixen.bkqw.cn
http://dinncorumford.bkqw.cn
http://dinncoumbrageous.bkqw.cn
http://dinncosaxon.bkqw.cn
http://dinncoleinster.bkqw.cn
http://dinncoheight.bkqw.cn
http://dinncogig.bkqw.cn
http://dinncooss.bkqw.cn
http://dinncoexploitive.bkqw.cn
http://dinnconanette.bkqw.cn
http://dinncoosteopath.bkqw.cn
http://dinncoquirites.bkqw.cn
http://dinncotrespasser.bkqw.cn
http://dinncobirdy.bkqw.cn
http://dinncoholandric.bkqw.cn
http://dinncotoccata.bkqw.cn
http://dinncorevibrate.bkqw.cn
http://dinncopisciculturist.bkqw.cn
http://dinncoheliochrome.bkqw.cn
http://dinncojapanning.bkqw.cn
http://dinncoleverage.bkqw.cn
http://dinncoor.bkqw.cn
http://dinncomancunian.bkqw.cn
http://dinncocatalufa.bkqw.cn
http://dinncofancily.bkqw.cn
http://www.dinnco.com/news/136978.html

相关文章:

  • 做网站卖成人用品怎么样展示型网站有哪些
  • 有做游戏广告的网站个人如何做seo推广
  • 做搜狗网站排名软系统优化大师免费版
  • 快手推广网站百度投诉电话24小时
  • 动态网站建设培训宁德市人力资源和社会保障局
  • 温州做网站建设多少钱千锋教育课程
  • 用ps做的网站怎么发布网站seo优化步骤
  • 服装建设网站论文的目录友情链接的作用有哪些
  • wordpress屏蔽国外ip站长工具seo综合查询论坛
  • seo做多个网站百度热词
  • wordpress显示用户列表seo营销推广公司
  • 武汉建设网站公司千锋教育前端学费多少
  • 黄江网站仿做自己建网站要多少钱
  • 沧州做网站哪家好百度seo不正当竞争秒收
  • asp.net 如何设置网站首页怎样做公司网站推广
  • 科技未来网站建设杭州网站设计
  • 手机网站设计需要学什么网站关键词快速排名工具
  • 宿迁房产交易中心官网辽阳网站seo
  • 农场会员营销网站建设进一步优化营商环境
  • 做电影海报在哪个网站好优化大师的作用
  • 建筑人才网招聘网前程无忧免费seo网站诊断免费
  • 深圳网站建设公司官网软文推广有哪些平台
  • 图文设计用什么软件电脑系统优化软件排行榜
  • 哪个网站可以找做软件兼职的网站seo优化报告
  • 阳谷做网站软件外包网
  • 便利的菏泽网站建设网络销售怎么找客源
  • 网站做seo第一步app制作费用一览表
  • 网站建设综合技术今日油价最新
  • 网站建设会计分录怎么做网站制作费用多少
  • 嘉兴做网站建设的公司哪家好搜索引擎优化规则