refine for mobile

This commit is contained in:
Pan 2019-05-10 18:02:35 +08:00
parent 4ef0782189
commit 06e88f25cd
5 changed files with 19 additions and 5 deletions

View File

@ -30,7 +30,9 @@ export default {
}
},
mounted() {
this.initChart()
this.$nextTick(() => {
this.initChart()
})
this.__resizeHandler = debounce(() => {
if (this.chart) {
this.chart.resize()

View File

@ -45,7 +45,10 @@ export default {
}
},
mounted() {
this.initChart()
this.$nextTick(() => {
this.initChart()
})
if (this.autoResize) {
this.__resizeHandler = debounce(() => {
if (this.chart) {

View File

@ -28,7 +28,9 @@ export default {
}
},
mounted() {
this.initChart()
this.$nextTick(() => {
this.initChart()
})
this.__resizeHandler = debounce(() => {
if (this.chart) {
this.chart.resize()
@ -58,7 +60,6 @@ export default {
bottom: '10',
data: ['Industries', 'Technology', 'Forex', 'Gold', 'Forecasts']
},
calculable: true,
series: [
{
name: 'WEEKLY WRITE ARTICLES',

View File

@ -30,7 +30,9 @@ export default {
}
},
mounted() {
this.initChart()
this.$nextTick(() => {
this.initChart()
})
this.__resizeHandler = debounce(() => {
if (this.chart) {
this.chart.resize()

View File

@ -115,4 +115,10 @@ export default {
margin-bottom: 32px;
}
}
@media (max-width:1024px) {
.chart-wrapper {
padding: 8px;
}
}
</style>