提交 c28bbc9f 编写于 作者: D DCloud_LXH

fix: docs render error

上级 bdc8ecc6
...@@ -12,8 +12,20 @@ export default { ...@@ -12,8 +12,20 @@ export default {
activeIndex: 0 activeIndex: 0
} }
}, },
created(){}, mounted(){
this.onWindowResize()
window.addEventListener('resize', this.onWindowResize)
},
beforeDestroy(){
window.removeEventListener('resize', this.onWindowResize)
},
methods:{ methods:{
onWindowResize(){
const contentWidth = getComputedStyle(document.querySelector('.theme-default-content')).width
if (window.matchMedia('(max-width: 410px)').matches) {
this.$refs.codeIframe.style.maxWidth = contentWidth
}
},
onClick(index){ onClick(index){
this.activeIndex = index this.activeIndex = index
}, },
...@@ -37,7 +49,7 @@ export default { ...@@ -37,7 +49,7 @@ export default {
h('iframe',{class:'code-iframe',attrs:{ h('iframe',{class:'code-iframe',attrs:{
src:this.src, src:this.src,
frameborder:'0' frameborder:'0'
}}) },ref:'codeIframe'})
]), ]),
] ]
...@@ -84,7 +96,7 @@ export default { ...@@ -84,7 +96,7 @@ export default {
} }
</script> </script>
<style> <style lang="stylus" scoped>
.page-runtime { .page-runtime {
display: flex; display: flex;
height: 667px; height: 667px;
...@@ -155,4 +167,9 @@ export default { ...@@ -155,4 +167,9 @@ export default {
width: 375px; width: 375px;
height: 667px; height: 667px;
} }
@media (max-width: $MQMobileNarrow)
{$contentClass}
div[class*="language-"]
margin 0 !important
</style> </style>
...@@ -88,6 +88,10 @@ main.page ...@@ -88,6 +88,10 @@ main.page
@media (max-width: $MQMobile) @media (max-width: $MQMobile)
& &
margin-top $navbarHeight margin-top $navbarHeight
img
max-width 100% !important
table
position relative
h1, h2, h3, h4, h5, h6 h1, h2, h3, h4, h5, h6
......
...@@ -93,11 +93,15 @@ pageClass: custom-page-class ...@@ -93,11 +93,15 @@ pageClass: custom-page-class
<b>京东小程序版</b> <b>京东小程序版</b>
</a> </a>
<a href="javascript:void(0)" οnclick="js_method()" class="clear-style barcode-view"> <a href="javascript:void(0)" οnclick="js_method()" class="clear-style barcode-view">
<div class="barcode-img-box" style="width: 160px;"></div> <div class="barcode-img-box">
<img style="opacity: 0;" src="https://vkceyugu.cdn.bspapp.com/VKCEYUGU-a90b5f95-90ba-4d30-a6a7-cd4d057327db/96e072fe-f338-46bd-b2d7-7b3aac7df501.png" width="160" />
</div>
<b></b> <b></b>
</a> </a>
<a href="javascript:void(0)" οnclick="js_method()" class="clear-style barcode-view"> <a href="javascript:void(0)" οnclick="js_method()" class="clear-style barcode-view">
<div class="barcode-img-box" style="width: 160px;"></div> <div class="barcode-img-box">
<img style="opacity: 0;" src="https://vkceyugu.cdn.bspapp.com/VKCEYUGU-a90b5f95-90ba-4d30-a6a7-cd4d057327db/96e072fe-f338-46bd-b2d7-7b3aac7df501.png" width="160" />
</div>
<b></b> <b></b>
</a> </a>
</div> </div>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册