摘要: 1. 变量:$ //1.常规 $myColor:red; .first{ color:$myColor; } //2.局部作用域 .second{ $myColor:red; color:$myColor; } //3.全局作用域 .third{ $myColor:red !global; colo 阅读全文
posted @ 2023-07-06 16:46 cjl2019 阅读(11) 评论(0) 推荐(0) 编辑
摘要: 1.let ①let不存在预解析。--即使用前一定要定义。 ②let声明的变量不允许在相同作用域内重复声明 ③ES6引入块级作用域。--即let在块内部中定义,只能在块内部使用 2.const ①const不存在预解析。--即使用前一定要定义。 ②const不能重复声明。且声明后必须赋值。 ③如果声 阅读全文
posted @ 2023-07-06 16:45 cjl2019 阅读(7) 评论(0) 推荐(0) 编辑
摘要: yAxis:{ name:'单位:百分比', //y轴单位 // min: 0, // minInterval: 1, max:100, interval:25, axisLabel: { fontSize: 12, fontFamily: "Bebas", color: "#BDD8FB", fo 阅读全文
posted @ 2023-07-06 16:35 cjl2019 阅读(26) 评论(0) 推荐(0) 编辑
摘要: chartOption: { dataZoom: [ { type: "slider", //给x轴设置滚动条 show: true, //false直接隐藏图形 xAxisIndex: [0], bottom: 0, height: 10, showDetail: false, startValu 阅读全文
posted @ 2023-07-06 16:35 cjl2019 阅读(30) 评论(0) 推荐(0) 编辑
摘要: 注意:要安装jQuery(看 -- vue项目实战中 -- 常见插件及使用) //步骤一:x轴添加triggerEvent:true 和 xAxis隐藏过长的文字 xAxis: { type: "category", triggerEvent: true, //添加triggerEvent:true 阅读全文
posted @ 2023-07-06 16:34 cjl2019 阅读(60) 评论(0) 推荐(0) 编辑
摘要: xAxis: { type: "category", axisLine: { lineStyle: { color: "#BDD8FB", fontSize: 12 } }, axisLabel: { color: "#BDD8FB", fontSize: 12, formatter:functio 阅读全文
posted @ 2023-07-06 16:31 cjl2019 阅读(22) 评论(0) 推荐(0) 编辑
摘要: //1.当params是一维数组时 formatter: params => { return ( `${params.seriesName}<br/>` + `<span style="display:inline-block;margin-right:5px;border-radius:10px 阅读全文
posted @ 2023-07-06 16:31 cjl2019 阅读(68) 评论(0) 推荐(0) 编辑
摘要: <script> const getname = ["时长异常", "时长正常", "无时长"]; //初始化getname const getNum = [0, 0, 0]; //初始化getNum export default{ data(){ return{ chartOption:{ leg 阅读全文
posted @ 2023-07-06 16:30 cjl2019 阅读(15) 评论(0) 推荐(0) 编辑
摘要: 下载插件:npm install echarts-liquidfill --save 引入插件:import 'echarts-liquidfill/src/liquidFill.js'; <template> <div> <div ref="chart1" class="chart"></div> 阅读全文
posted @ 2023-07-06 16:29 cjl2019 阅读(29) 评论(0) 推荐(0) 编辑
摘要: <template> <div> <div ref="chart1" class="chart"></div> </div> </template> <script> import * as echarts from "echarts"; export default { data() { retu 阅读全文
posted @ 2023-07-06 16:28 cjl2019 阅读(92) 评论(0) 推荐(0) 编辑
摘要: 1.饼图 <template> <div> <div ref="chart1" class="chart"></div> </div> </template> <script> import * as echarts from "echarts"; export default { data() { 阅读全文
posted @ 2023-07-06 16:27 cjl2019 阅读(19) 评论(0) 推荐(0) 编辑
摘要: 1.普通折线图 <template> <div> <div ref="chart1" class="chart"></div> </div> </template> <script> import * as echarts from "echarts"; export default { data( 阅读全文
posted @ 2023-07-06 16:25 cjl2019 阅读(5) 评论(0) 推荐(0) 编辑
摘要: 1. 多个柱状图 <template> <div> <div ref="chart1" class="chart"></div> </div> </template> <script> import * as echarts from "echarts"; export default { data 阅读全文
posted @ 2023-07-06 16:23 cjl2019 阅读(30) 评论(0) 推荐(0) 编辑
摘要: 1. vue-echarts和echarts的区别 · vue-echarts是封装后的vue插件, 基于 ECharts v4.0.1+ 开发,依赖 Vue.js v2.2.6+,功能一样的只是把它封装成vue插件 这样更方便以vue的方式去使用它。 · echarts就是普通的js库。 2. v 阅读全文
posted @ 2023-07-06 16:20 cjl2019 阅读(204) 评论(0) 推荐(0) 编辑
摘要: 1. 安装echarts 步骤一:git bash here中输入: npm install cnpm -g 步骤二:git bash here中输入: cnpm install echarts --save 步骤三:在 main.js 中写入以下内容: import * as echarts fr 阅读全文
posted @ 2023-07-06 16:18 cjl2019 阅读(458) 评论(0) 推荐(0) 编辑
摘要: 首页加载很慢的原因: 1. 由于vendor.js和app.css较大,VUE等主流的单页面框架都是js渲染html body的,所以必须等到vendor.js和app.css加载完成后完整的界面才会显示。 2. 单页面首次会把所有界面和接口都加载出来,会有多次的请求和响应,数据不能马上加载,二者相 阅读全文
posted @ 2023-07-06 16:13 cjl2019 阅读(19) 评论(0) 推荐(0) 编辑
摘要: 步骤一:将原来锚链接中href="#id1"去掉,增加点击事件@click="toTopic('#id'+index)" <a v-for="(tag, index) in 30" :key="index" @click="toTopic('#t'+index)"> <el-tag type="in 阅读全文
posted @ 2023-07-06 16:09 cjl2019 阅读(143) 评论(0) 推荐(0) 编辑
摘要: 使用场景: ①可以减少图片的请求数量(集合到js、css代码中); ②可以防止因为一些相对路径等问题导致图片404错误; ③提高加载速度; 步骤一:打开网站:https://www.strerr.com/cn/base64_encode_img.html 步骤二:上传图片,复制转换后的base64数 阅读全文
posted @ 2023-07-06 15:57 cjl2019 阅读(44) 评论(0) 推荐(0) 编辑
摘要: vue-seamless-scroll使用手册:https://chenxuan0000.github.io/vue-seamless-scroll/zh/guide/properties.html 步骤一:git bash输入:npm install vue-seamless-scroll --s 阅读全文
posted @ 2023-07-06 15:55 cjl2019 阅读(53) 评论(0) 推荐(0) 编辑
摘要: 1.方式一 步骤一:创建文件:src/utils/numberToCurrency.js export function numberToCurrencyNo(value) { if (!value) return 0 // 获取整数部分 const intPart = Math.trunc(val 阅读全文
posted @ 2023-07-06 15:53 cjl2019 阅读(66) 评论(0) 推荐(0) 编辑