文档服务地址:http://47.92.0.57:3000/ 周报索引地址:http://47.92.0.57:3000/s/NruNXRYmV

Commit 3821a229 by 张欣玥

引入math.js改

parent 00ae4d4c
......@@ -404,7 +404,8 @@ export default {
goBigger () {
var scale = this.scaleSize
if (scale < 2) {
this.scaleSize = scale + 0.1
// this.scaleSize = scale + 0.1
this.scaleSize = this.$math.add(this.$math.bignumber(scale), this.$math.bignumber(0.1))
} else {
this.scaleSize = 2
}
......@@ -418,7 +419,7 @@ export default {
goSmaller () {
var scale = this.scaleSize
if (scale > 0.5) {
this.scaleSize = scale - 0.1
this.scaleSize = this.$math.subtract(this.$math.bignumber(scale), this.$math.bignumber(0.1))
} else {
this.scaleSize = 0.5
}
......
......@@ -8,6 +8,9 @@ import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import axios from 'axios'
import VueAxios from 'vue-axios'
import * as math from 'mathjs';
Vue.prototype.$math = math
axios.defaults.baseURL = 'http://localhost:9100/api'
axios.defaults.timeout = 8000
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment