安装yarn add echartsmain.js// echarts import * as echarts from 'echarts' Vue.prototype.$echarts = echartsecharts.vue<template> <div> <div id="home_charts" :style="{width: '300px', height: '300px'}"></div> </div> </template> <script> export default { mounted(){ this.drawLine(); }, methods: { drawLine(){ let home_charts = thi
页面中加入<audio>标签<audio src="../../assets/music.mp3" ref="mp3"></audio>js 调用_this.$refs.mp3.play();../../md/Vue/
看效果上源码<template> <div> <el-table :data="tableData" :span-method="objectSpanMethod" border style="width: 100%; margin-top: 20px" :cell-style="{background: '#FFF'}"> <el-table-column width="120" prop="t1Name" label="一级标题" align="center"> </el-table-column> <el-table-column width=&qu
一、安装插件 CryptoJSyarn add crypto-js二、创建加密函数文件/src/secret/index.jsimport CryptoJS from 'crypto-js'; const key = CryptoJS.enc.Utf8.parse("1234123412ABCDEF"); //十六位十六进制数作为密钥 const iv = CryptoJS.enc.Utf8.parse('ABCDEF1234123412'); //十六位十六进制数作为密钥偏移量 //加密方法 function Lock(word) { let srcs = CryptoJS.enc.Utf8.pa
在 Vue 项目中使用谷歌的 material-design-icons-iconfont 图标库1、安装yarn add material-design-icons-iconfont2、main.js 引入// material-design-icons-iconfont import 'material-design-icons-iconfont/dist/material-design-icons.css'3、使用<span class="material-icons">lock</span>4、参考链接由于一些不可描述的原因无法访问官方界面。我做了个图标库对照
1、ElementUIElement,一套为开发者、设计师和产品经理准备的基于 Vue 2.0 的桌面端组件库https://element.eleme.cn/2、HeyUI一个基于Vue.js的高质量UI组件库https://www.heyui.top/3、MuseUI基于 Vue 2.0 优雅的 Material Design UI 组件库https://muse-ui.org/#/zh-CN/4、mand-mobile面向金融场景的Vue移动端UI组件库,丰富、灵活、实用,快速搭建优质的金融类
标签<div class="bar" ref="item"></div>获取const itemWidth = this.$refs.item.clientWidth;../../md/Vue/
1、安装:vue-pdfyarn add vue-pdf2、修改 node_modules/vue-pdf/src/componentFactory.js由于在缩放中,会产生闪烁(重新渲染),故需要去掉75、76行内容// if ( resolutionScale < 0.85 || resolutionScale > 1.15 ) // this.pdf.renderPage(this.rotate);3、源码:viewPDF.vue<template> <div @contextmenu.prevent=""> <!-- 上一页 --> <div class="
现象说明弹框出现后,鼠标滚动到一半或者页面最底部,下次在点开的时候,滚动条及弹框位置还在一半或者底部,可以通过以下方式解决:<el-dialog :title="formTitle" :visible.sync="dialogFormVisible" :lock-scroll="false" //主要是这个属性 :append-to-body="true" //跟这个属性 :close-on-click-modal="
let routeData = this.$router.resolve({ path: 'newPage', query: { id: 1 } }); window.open(routeData.href, '_blank');../../md/Vue/