去掉console

This commit is contained in:
xing 2020-06-30 16:02:31 +08:00
parent d7fb3356e8
commit 647be6fd8f
5 changed files with 112 additions and 17 deletions

View File

@ -1,5 +1,7 @@
module.exports = { module.exports = {
presets: [ presets: [
'@vue/cli-plugin-babel/preset' '@vue/cli-plugin-babel/preset'
] ],
plugins: ['transform-remove-console']
} }

View File

@ -26,6 +26,7 @@
"@vue/cli-service": "~4.4.0", "@vue/cli-service": "~4.4.0",
"@vue/eslint-config-standard": "^5.1.2", "@vue/eslint-config-standard": "^5.1.2",
"babel-eslint": "^10.1.0", "babel-eslint": "^10.1.0",
"babel-plugin-transform-remove-console": "^6.9.4",
"eslint": "^6.7.2", "eslint": "^6.7.2",
"eslint-plugin-import": "^2.20.2", "eslint-plugin-import": "^2.20.2",
"eslint-plugin-node": "^11.1.0", "eslint-plugin-node": "^11.1.0",

File diff suppressed because one or more lines are too long

View File

@ -13,13 +13,12 @@
</template> </template>
<script> <script>
import echarts from 'echarts' import echarts from 'echarts'
import _ from 'lodash' import _ from 'lodash'
export default { export default {
props: { props: {},
}, data() {
data () {
return { return {
options: { options: {
title: { title: {
@ -58,9 +57,7 @@ export default {
const chart = echarts.init(document.querySelector('#main')) const chart = echarts.init(document.querySelector('#main'))
this.$http.get('reports/type/1').then(response => { this.$http.get('reports/type/1').then(response => {
const res = response.data const res = response.data
console.log(res.data, this.options)
const r = _.merge(res.data, this.options) const r = _.merge(res.data, this.options)
console.log(r)
chart.setOption(r) chart.setOption(r)
}) })
} }

View File

@ -1695,6 +1695,11 @@ babel-plugin-dynamic-import-node@^2.3.3:
dependencies: dependencies:
object.assign "^4.1.0" object.assign "^4.1.0"
babel-plugin-transform-remove-console@^6.9.4:
version "6.9.4"
resolved "https://registry.npm.taobao.org/babel-plugin-transform-remove-console/download/babel-plugin-transform-remove-console-6.9.4.tgz#b980360c067384e24b357a588d807d3c83527780"
integrity sha1-uYA2DAZzhOJLNXpYjYB9PINSd4A=
babel-runtime@6.x: babel-runtime@6.x:
version "6.26.0" version "6.26.0"
resolved "https://registry.npm.taobao.org/babel-runtime/download/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" resolved "https://registry.npm.taobao.org/babel-runtime/download/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe"
@ -5738,6 +5743,11 @@ npm-run-path@^4.0.0:
dependencies: dependencies:
path-key "^3.0.0" path-key "^3.0.0"
nprogress@^0.2.0:
version "0.2.0"
resolved "https://registry.npm.taobao.org/nprogress/download/nprogress-0.2.0.tgz#cb8f34c53213d895723fcbab907e9422adbcafb1"
integrity sha1-y480xTIT2JVyP8urkH6UIq28r7E=
nth-check@^1.0.2, nth-check@~1.0.1: nth-check@^1.0.2, nth-check@~1.0.1:
version "1.0.2" version "1.0.2"
resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-1.0.2.tgz#b2bd295c37e3dd58a3bf0700376663ba4d9cf05c" resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-1.0.2.tgz#b2bd295c37e3dd58a3bf0700376663ba4d9cf05c"