@dolphinweex/weex-vue-render 0.2.10 → 0.2.12
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 +21 -12
- package/package.json +1 -1
package/dist/index.common.js
CHANGED
|
@@ -3825,6 +3825,11 @@ function px2rem (px, rootValue) {
|
|
|
3825
3825
|
if (px.indexOf("--harmory") > -1) return px;
|
|
3826
3826
|
|
|
3827
3827
|
return px.replace(/([+-]?\d+(?:\.\d*)?)([p|w]x)?/g, function ($0, $1, $2, offset, str) {
|
|
3828
|
+
// 判断是否包含 scale 或 rotate,直接跳过
|
|
3829
|
+
const filterKey = ['scale', 'rotate'];
|
|
3830
|
+
if (filterKey.some(keyword => str.slice(0, offset).includes(keyword))) {
|
|
3831
|
+
return $0; // 保留原字符串不替换
|
|
3832
|
+
}
|
|
3828
3833
|
if (ignoreSubKey.filter(k => str.slice(offset - k.length - 1, offset - 1) === k).length) return $1
|
|
3829
3834
|
if ($2 === 'wx') { // 'wx' -> px
|
|
3830
3835
|
// return ($midea_harmony_native ? $midea_harmony_native.vp2px($1) : $1) + 'px'
|
|
@@ -5033,7 +5038,6 @@ var style = {
|
|
|
5033
5038
|
* specific language governing permissions and limitations
|
|
5034
5039
|
* under the License.
|
|
5035
5040
|
*/
|
|
5036
|
-
|
|
5037
5041
|
// input and textare has some common api and event
|
|
5038
5042
|
var findEnterKeyType = function (key) {
|
|
5039
5043
|
var keys = ['default', 'go', 'next', 'search', 'send'];
|
|
@@ -6292,7 +6296,7 @@ function getGCanvas (weex) {
|
|
|
6292
6296
|
var wrapper = this.$refs.gcanvas;
|
|
6293
6297
|
var rate = 750 / document.documentElement.clientWidth
|
|
6294
6298
|
wrapper.width = wrapper.clientWidth * rate;
|
|
6295
|
-
wrapper.height = wrapper.
|
|
6299
|
+
wrapper.height = wrapper.clientHeight * rate;
|
|
6296
6300
|
|
|
6297
6301
|
var context = wrapper.getContext(type || '2d')
|
|
6298
6302
|
context.scale(rate, rate)
|
|
@@ -6542,7 +6546,7 @@ function getWaterfall (weex) {
|
|
|
6542
6546
|
* 3.1 if totalWidth < ctWidth then increase columnWidth
|
|
6543
6547
|
* 3.2 if totalWidth > ctWidth then decrease columnCount
|
|
6544
6548
|
*/
|
|
6545
|
-
var width, gap, cnt, ctWidth;
|
|
6549
|
+
var width, gap, cnt, ctWidth, leftGap, rightGap;
|
|
6546
6550
|
var scale = weex.config.env.scale;
|
|
6547
6551
|
var el = this.$el;
|
|
6548
6552
|
function getCtWidth (width, style) {
|
|
@@ -6569,6 +6573,9 @@ function getWaterfall (weex) {
|
|
|
6569
6573
|
}
|
|
6570
6574
|
gap = gap * scale;
|
|
6571
6575
|
|
|
6576
|
+
leftGap = this.leftGap * scale || 0;
|
|
6577
|
+
rightGap = this.rightGap * scale || 0;
|
|
6578
|
+
|
|
6572
6579
|
width = this.columnWidth;
|
|
6573
6580
|
cnt = this.columnCount;
|
|
6574
6581
|
if (width && width !== 'auto') {
|
|
@@ -6584,17 +6591,17 @@ function getWaterfall (weex) {
|
|
|
6584
6591
|
}
|
|
6585
6592
|
// 1. if columnCount = n then calc w.
|
|
6586
6593
|
else if (cnt !== 'auto' && width === 'auto') {
|
|
6587
|
-
width = (ctWidth - (cnt - 1) * gap) / cnt;
|
|
6594
|
+
width = (ctWidth - (cnt - 1) * gap - leftGap - rightGap) / cnt;
|
|
6588
6595
|
}
|
|
6589
6596
|
// 2. if columnWidth = w then calc n.
|
|
6590
6597
|
else if (cnt === 'auto' && width !== 'auto') {
|
|
6591
|
-
cnt = (ctWidth + gap) / (width + gap);
|
|
6598
|
+
cnt = (ctWidth + gap + leftGap + rightGap) / (width + gap + leftGap + rightGap);
|
|
6592
6599
|
}
|
|
6593
6600
|
// 3. if columnWidth = w and columnCount = n then calc totalWidth
|
|
6594
6601
|
else if (cnt !== 'auto' && width !== 'auto') {
|
|
6595
6602
|
var totalWidth;
|
|
6596
6603
|
var adjustCountAndWidth = function () {
|
|
6597
|
-
totalWidth = cnt * width + (cnt - 1) * gap;
|
|
6604
|
+
totalWidth = cnt * width + (cnt - 1) * gap + leftGap + rightGap;
|
|
6598
6605
|
if (totalWidth < ctWidth) {
|
|
6599
6606
|
width += (ctWidth - totalWidth) / cnt;
|
|
6600
6607
|
}
|
|
@@ -7303,7 +7310,7 @@ var recycleList = {
|
|
|
7303
7310
|
}
|
|
7304
7311
|
};
|
|
7305
7312
|
|
|
7306
|
-
__$styleInject("/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership. The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nbody > .weex-list,\nbody > .weex-recycle,\nbody > .weex-scroller,\nbody > .weex-waterfall {\n max-height: 100%;\n}\n\n.weex-list-wrapper,\n.weex-recycle-wrapper,\n.weex-scroller-wrapper,\n.weex-waterfall-wrapper {\n -webkit-overflow-scrolling: touch;\n}\n\n.weex-list-wrapper,\n.weex-waterfall-wrapper, \n.weex-recycle-wrapper {\n overflow-y: scroll !important;\n overflow-x: hidden !important;\n align-items: flex-start !important;\n justify-content: flex-start !important;\n}\n\n.weex-list-inner,\n.weex-recycle-inner,\n.weex-scroller-inner,\n.weex-waterfall-inner {\n -webkit-overflow-scrolling: touch;\n align-items: inherit; \n}\n\n.weex-waterfall-inner-columns { \n -webkit-flex-direction: row;\n flex-direction: row;\n -webkit-box-orient: horizontal;\n}\n\n.weex-scroller-wrapper.weex-scroller-vertical,\n.weex-recycle-wrapper.weex-recycle-vertical {\n overflow-x: hidden;\n overflow-y: scroll;\n}\n\n.weex-scroller-wrapper.weex-scroller-horizontal,\n.weex-recycle-wrapper.weex-recycle-horizontal {\n overflow-x: scroll;\n overflow-y: hidden;\n}\n\n.weex-scroller-wrapper.weex-scroller-disabled {\n overflow-x: hidden;\n overflow-y: hidden;\n}\n\n.weex-scroller-horizontal .weex-scroller-inner,\n.weex-recycle-horizontal .weex-recycle-inner {\n -webkit-flex-direction: row;\n flex-direction: row;\n -webkit-box-orient: horizontal;\n height: 100%;\n}\n\n.weex-cell {\n width: 100%;\n}\n\n.weex-refresh,\n.weex-loading {\n -webkit-box-align: center;\n -webkit-align-items: center;\n align-items: center;\n -webkit-box-pack: center;\n -webkit-justify-content: center;\n justify-content: center;\n width: 100%;\n overflow: hidden;\n}\n",undefined);
|
|
7313
|
+
__$styleInject("/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership. The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nbody > .weex-list,\nbody > .weex-recycle,\nbody > .weex-scroller,\nbody > .weex-waterfall {\n max-height: 100%;\n}\n\n.weex-list-wrapper,\n.weex-recycle-wrapper,\n.weex-scroller-wrapper,\n.weex-waterfall-wrapper {\n -webkit-overflow-scrolling: touch;\n}\n\n.weex-list-wrapper,\n.weex-waterfall-wrapper, \n.weex-recycle-wrapper {\n overflow-y: scroll !important;\n overflow-x: hidden !important;\n align-items: flex-start !important;\n justify-content: flex-start !important;\n max-width: 100vw; \n}\n\n.weex-list-inner,\n.weex-recycle-inner,\n.weex-scroller-inner,\n.weex-waterfall-inner {\n -webkit-overflow-scrolling: touch;\n align-items: inherit; \n}\n\n.weex-waterfall-inner-columns { \n -webkit-flex-direction: row;\n flex-direction: row;\n -webkit-box-orient: horizontal;\n max-width: 100vw; \n}\n\n.weex-scroller-wrapper.weex-scroller-vertical,\n.weex-recycle-wrapper.weex-recycle-vertical {\n overflow-x: hidden;\n overflow-y: scroll;\n}\n\n.weex-scroller-wrapper.weex-scroller-horizontal,\n.weex-recycle-wrapper.weex-recycle-horizontal {\n overflow-x: scroll;\n overflow-y: hidden;\n}\n\n.weex-scroller-wrapper.weex-scroller-disabled {\n overflow-x: hidden;\n overflow-y: hidden;\n}\n\n.weex-scroller-horizontal .weex-scroller-inner,\n.weex-recycle-horizontal .weex-recycle-inner {\n -webkit-flex-direction: row;\n flex-direction: row;\n -webkit-box-orient: horizontal;\n height: 100%;\n}\n\n.weex-cell {\n width: 100%;\n}\n\n.weex-refresh,\n.weex-loading {\n -webkit-box-align: center;\n -webkit-align-items: center;\n align-items: center;\n -webkit-box-pack: center;\n -webkit-justify-content: center;\n justify-content: center;\n width: 100%;\n overflow: hidden;\n}\n",undefined);
|
|
7307
7314
|
|
|
7308
7315
|
/*
|
|
7309
7316
|
* Licensed to the Apache Software Foundation (ASF) under one
|
|
@@ -7629,7 +7636,7 @@ var slideMixin = {
|
|
|
7629
7636
|
// weex.utils.addTransform(this$1._showNodes[i].firstElementChild, {
|
|
7630
7637
|
// translate: 'translate3d(0px, 0px, 0px)'
|
|
7631
7638
|
// });
|
|
7632
|
-
this$1._showNodes[i].firstElementChild.left = '0px'
|
|
7639
|
+
// this$1._showNodes[i].firstElementChild.left = '0px'
|
|
7633
7640
|
}
|
|
7634
7641
|
},
|
|
7635
7642
|
|
|
@@ -7737,7 +7744,9 @@ var slideMixin = {
|
|
|
7737
7744
|
var holder = this._showNodes[index];
|
|
7738
7745
|
if (node._inShow && (holder !== node || holder._showIndex !== index)) {
|
|
7739
7746
|
if (holder && holder._isClone) { this._removeClone(holder); }
|
|
7740
|
-
|
|
7747
|
+
if( this.autoPlay ){
|
|
7748
|
+
node = this._getClone(node.index);
|
|
7749
|
+
}
|
|
7741
7750
|
}
|
|
7742
7751
|
else if (node._inShow) { // holder === node
|
|
7743
7752
|
return
|
|
@@ -7749,7 +7758,7 @@ var slideMixin = {
|
|
|
7749
7758
|
// weex.utils.addTransform(node, {
|
|
7750
7759
|
// translate: ("translate3d(" + translateX + "px, 0px, 0px)")
|
|
7751
7760
|
// });
|
|
7752
|
-
node.style.left = translateX + 'px'
|
|
7761
|
+
// node.style.left = translateX + 'px'
|
|
7753
7762
|
|
|
7754
7763
|
node.style.zIndex = 99 - Math.abs(index);
|
|
7755
7764
|
node.style.opacity = 1;
|
|
@@ -7968,7 +7977,7 @@ var slideMixin = {
|
|
|
7968
7977
|
|
|
7969
7978
|
// ddd
|
|
7970
7979
|
// weex.utils.addTransform(elm, transObj);
|
|
7971
|
-
elm.style.left = translateX + 'px'
|
|
7980
|
+
// elm.style.left = translateX + 'px'
|
|
7972
7981
|
|
|
7973
7982
|
elm.style.opacity = i === 0 ? MAIN_SLIDE_OPACITY : this$1.neighborAlpha;
|
|
7974
7983
|
}
|
|
@@ -8436,7 +8445,7 @@ var indicator$1 = {
|
|
|
8436
8445
|
}
|
|
8437
8446
|
};
|
|
8438
8447
|
|
|
8439
|
-
__$styleInject("/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership. The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n \n.weex-slider-wrapper {\n overflow: hidden;\n}\n\n.weex-slider-inner {\n width: 100%;\n height: 100%;\n overflow: visible;\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -webkit-flex-direction: row;\n flex-direction: row;\n}\n\n.weex-slider-cell {\n width: 100%;\n height: 100%;\n
|
|
8448
|
+
__$styleInject("/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership. The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n \n.weex-slider-wrapper {\n overflow: hidden;\n}\n\n.weex-slider-inner {\n width: 100%;\n height: 100%;\n overflow: visible;\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -webkit-flex-direction: row;\n flex-direction: row;\n}\n\n.weex-slider-cell {\n width: 100%;\n height: 100%;\n float:left;\n top: 0px;\n left: 0px;\n background: transparent !important;\n overflow: hidden;\n -webkit-box-align: center;\n -webkit-align-items: center;\n align-items: center;\n -webkit-box-pack: center;\n}\n\n.neighbor-cell {\n overflow: visible !important;\n}\n\nnav.weex-indicator {\n position: absolute;\n z-index: 10;\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -webkit-flex-direction: row;\n flex-direction: row;\n margin: 0;\n padding: 0;\n -webkit-box-align: center;\n -webkit-align-items: center;\n align-items: center;\n -webkit-box-pack: center;\n -webkit-justify-content: center;\n justify-content: center;\n -webkit-transform: translate(-10rem, 0px);\n transform: translate(-10rem, 0px)\n}\n\ndiv.weex-indicator-inner {\n -webkit-transform: translate(10rem, 0px);\n transform: translate(10rem, 0px);\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -webkit-flex-direction: row;\n flex-direction: row;\n display: flex; \n}\n\n.weex-indicator-item {\n display: inline-block;\n position: relative;\n border-radius: 50%;\n width: 0.266667rem;\n height: 0.266667rem;\n background-color: #BBBBBB;\n}\n.weex-indicator-item + .weex-indicator-item {\n margin-left: 0.133333rem;\n}\n\n.weex-indicator-item-active {\n background-color: blue;\n}",undefined);
|
|
8440
8449
|
|
|
8441
8450
|
/*
|
|
8442
8451
|
* Licensed to the Apache Software Foundation (ASF) under one
|
package/package.json
CHANGED