CN-501 feat: 响应式方案实施

This commit is contained in:
@changcode
2022-04-25 15:29:44 +08:00
parent 01760c28a4
commit e90d6ea506
29 changed files with 230 additions and 91 deletions

View File

@@ -72,6 +72,7 @@ export default {
},
methods: {
chartLoaded (chartList) {
this.chartList = chartList
this.anchorPoints = []
let anchorPoints = []
const panelDom = document.querySelector('#detailWrapper')
@@ -103,8 +104,17 @@ export default {
jumpToAnchor (anchor) {
this.top = anchor.top
document.querySelector('#detailWrapper').scrollTop = this.top
},
resize () {
this.chartLoaded(this.chartList)
}
},
mounted () {
window.addEventListener('resize', this.$_.debounce(this.resize, 200))
},
beforeUnmount () {
window.removeEventListener('resize', this.resize)
},
computed: {
iconClass () {
let className