提交 8fe2215e 编写于 作者: fxy060608's avatar fxy060608

fix(h5): matchMedia minWidth>=0

上级 bbac11e1
......@@ -64,6 +64,10 @@
<script>
import Vue from 'vue'
import {
hasOwn
} from 'uni-shared'
import {
RESPONSIVE_MIN_WIDTH
} from 'uni-helpers/constants'
......@@ -192,7 +196,7 @@ export default {
const minWidthName = type + 'WindowMinWidth'
this[minWidthName] = RESPONSIVE_MIN_WIDTH
const windowOptions = __uniConfig[name]
if (windowOptions && windowOptions.matchMedia && windowOptions.matchMedia.minWidth) {
if (windowOptions && windowOptions.matchMedia && hasOwn(windowOptions.matchMedia, 'minWidth')) {
this[minWidthName] = windowOptions.matchMedia.minWidth
}
if (!this.minWidth || this.minWidth > this[minWidthName]) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册