@dolphinweex/weex-vue-render 0.2.45 → 0.2.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.common.js +28 -23
- package/package.json +1 -1
package/dist/index.common.js
CHANGED
|
@@ -2732,21 +2732,11 @@ function init$1 (viewportWidth) {
|
|
|
2732
2732
|
var env = window.weex && window.weex.config.env;
|
|
2733
2733
|
info.deviceHeight = env.deviceHeight = screenHeight * dpr;
|
|
2734
2734
|
};
|
|
2735
|
-
// 一多适配不同宽高比例的屏幕,使用resetViewport也能适配宽度,
|
|
2736
|
-
// 但项目存在没有使用rem的元素,且页面高度重置方法也因项目而异。
|
|
2737
|
-
// 后续联合所有页面统一做了适配后可删除此段代码
|
|
2738
|
-
var resetDeviceWidth = function () {
|
|
2739
|
-
if(Math.abs(screenWidth-doc.documentElement.clientWidth) > 10){
|
|
2740
|
-
location.reload()
|
|
2741
|
-
}
|
|
2742
|
-
};
|
|
2743
2735
|
|
|
2744
2736
|
// set root font for rem.
|
|
2745
2737
|
setRootFont(screenWidth, viewportWidth);
|
|
2746
2738
|
setMetaViewport(viewportWidth);
|
|
2747
2739
|
|
|
2748
|
-
// window.addEventListener('resize', resetDeviceHeight);
|
|
2749
|
-
window.addEventListener('resize', resetDeviceWidth);
|
|
2750
2740
|
/**
|
|
2751
2741
|
* why not to use window.screen.width to get screenWidth ? Because in some
|
|
2752
2742
|
* old webkit browser on android system it get the device pixel width, which
|
|
@@ -5547,14 +5537,14 @@ function getInput (weex) {
|
|
|
5547
5537
|
},
|
|
5548
5538
|
|
|
5549
5539
|
mounted: function mounted () {
|
|
5550
|
-
if (this.autofocus
|
|
5540
|
+
if (this.autofocus === 'true' || this.autofocus === true) {
|
|
5551
5541
|
this.focus(this.autofocus)
|
|
5552
5542
|
}
|
|
5553
5543
|
},
|
|
5554
5544
|
//用watch监听新值,处理可能页面可能通过setimeout重新赋值的情况
|
|
5555
5545
|
watch: {
|
|
5556
5546
|
autofocus: function autofocus(val) {
|
|
5557
|
-
if (val
|
|
5547
|
+
if (val === 'true' || val === true) {
|
|
5558
5548
|
this.focus(val)
|
|
5559
5549
|
}
|
|
5560
5550
|
},
|
|
@@ -5618,10 +5608,6 @@ function getImage(weex) {
|
|
|
5618
5608
|
},
|
|
5619
5609
|
mounted: function () {
|
|
5620
5610
|
},
|
|
5621
|
-
watch: {
|
|
5622
|
-
src: function src(val) {
|
|
5623
|
-
}
|
|
5624
|
-
},
|
|
5625
5611
|
methods: {
|
|
5626
5612
|
save: function (callback) {
|
|
5627
5613
|
const params = {
|
|
@@ -5644,10 +5630,7 @@ function getImage(weex) {
|
|
|
5644
5630
|
)
|
|
5645
5631
|
},
|
|
5646
5632
|
handleClick: function handleClick(event) {
|
|
5647
|
-
|
|
5648
|
-
if (this.$listeners && this.$listeners.click) {
|
|
5649
|
-
this.$listeners.click(event);
|
|
5650
|
-
}
|
|
5633
|
+
this.$emit('weex$tap', event);
|
|
5651
5634
|
},
|
|
5652
5635
|
_handleTouchStart: function _handleTouchStart (event) {
|
|
5653
5636
|
if (this.saveImg) {
|
|
@@ -5658,12 +5641,11 @@ function getImage(weex) {
|
|
|
5658
5641
|
render: function render (createElement) {
|
|
5659
5642
|
return createElement('html:img', {
|
|
5660
5643
|
attrs: {
|
|
5661
|
-
'weex-type': '
|
|
5644
|
+
'weex-type': 'img',
|
|
5662
5645
|
src: this.src,
|
|
5663
5646
|
},
|
|
5664
5647
|
on: {
|
|
5665
|
-
|
|
5666
|
-
touchstart: this._handleTouchStart,
|
|
5648
|
+
'weex$tap': this.handleClick,
|
|
5667
5649
|
},
|
|
5668
5650
|
staticClass: 'weex-image weex-el',
|
|
5669
5651
|
staticStyle: weex.extractComponentStyle(this)
|
|
@@ -11662,3 +11644,26 @@ if (global.Vue) {
|
|
|
11662
11644
|
return weex;
|
|
11663
11645
|
|
|
11664
11646
|
})));
|
|
11647
|
+
var isNotReload = false
|
|
11648
|
+
const globalEvent333 = weex.requireModule('globalEvent')
|
|
11649
|
+
globalEvent333.addEventListener("videoFullscreen",()=>{
|
|
11650
|
+
isNotReload = true
|
|
11651
|
+
})
|
|
11652
|
+
|
|
11653
|
+
// 一多适配不同宽高比例的屏幕,使用resetViewport也能适配宽度,
|
|
11654
|
+
// 但项目存在没有使用rem的元素,且页面高度重置方法也因项目而异。
|
|
11655
|
+
// 后续联合所有页面统一做了适配后可删除此段代码
|
|
11656
|
+
var resetDeviceWidth = function () {
|
|
11657
|
+
if( !isNotReload ){
|
|
11658
|
+
location.reload()
|
|
11659
|
+
}
|
|
11660
|
+
if(isNotReload){
|
|
11661
|
+
isNotReload = false
|
|
11662
|
+
}
|
|
11663
|
+
};
|
|
11664
|
+
|
|
11665
|
+
window.addEventListener('resize', () => {
|
|
11666
|
+
setTimeout(() => {
|
|
11667
|
+
resetDeviceWidth()
|
|
11668
|
+
}, 100)
|
|
11669
|
+
});
|
package/package.json
CHANGED