随笔分类 - vue平时总结
摘要:指令使用例子 <el-input v-model="input1" style="width: 240px" placeholder="Please input" v-format-number="{ precision: 2 }" /> 指令代码 const vFormatNumber = { m
阅读全文
摘要:1、构建echart公用组件 <template> <div :class="className" :style="{ width, height }"></div> </template> <script> import echarts from "echarts"; require("echar
阅读全文
摘要:1、使用a标签,需加上download (下载文件的名称)属性才行。 区别: 一: 在 Android上可以下载。 二: 在Ios 上是直接打开文件。2、使用浏览器自带的下载文件的功能,将文件转为二进制的数据流,代码如下: axios({ url, method: "get", resposeTyp
阅读全文
摘要:1、nuxt 在启动之后, 默认是通过localhost:3000 访问的 , 若想通过本机IP访问,则需要配置:在package.json中加入一下代码 "config": { "nuxt": { "host": "0.0.0.0", "port": "8090" // 可以自己配置 } } 2、
阅读全文
摘要:1、不管使用的是px,还是百分比,均可通过css3中提供的scale方法,来达到适配多端。 // 屏幕适配 mixin 函数 // * 默认缩放值 const scale = { width: '1', height: '1', } // * 设计稿尺寸(px) const baseWidth =
阅读全文