
vue js
牛虻~
这个作者很懒,什么都没留下…
展开
-
vue整合echarts,动态改变宽高
npm引入npm install echarts --savemain.js中添加import echarts from “echarts”Vue.prototype.$echarts = echartsecharts.vue<template> <div :id="id" :style="{width: width, height: height}"></div></template><script> // 引入原创 2020-10-19 16:53:56 · 2938 阅读 · 1 评论 -
vue props传入render函数,实现动态组件嵌套
本文基础是已经了解render函数的使用方式,如果您还不了解render是什么,请阅读vue官方-渲染函数 & JSX任何一个功能都离不开需求,所以先上图,公司要求做这样一个页面从图里可以看出来其实外边框是一样的,只不过位置跟大小还有里面的内容是不一样的,所以想到能不能把外边的边框单独抽出来,里面单独渲染封装的组件代码如下:<template> <div :style="boxSizeStyle"> <div class="dataAll .原创 2020-10-19 16:30:50 · 4411 阅读 · 0 评论 -
vue 使用math.js 精确计算加减乘除方法
npm引入npm install mathjs --save在main.js中引入let math = require('mathjs')Vue.prototype.$math = math创建工具类并定义方法创建utils.jslet $math = require('mathjs');export const math = { add() { return comp('add', arguments) }, subtract() { return comp原创 2020-07-13 16:26:27 · 9831 阅读 · 0 评论