@dolphinweex/weex-vue-render 0.2.31 → 0.2.33
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 +62 -5
- package/package.json +1 -1
package/dist/index.common.js
CHANGED
|
@@ -4977,6 +4977,56 @@ var style = {
|
|
|
4977
4977
|
}
|
|
4978
4978
|
return t;
|
|
4979
4979
|
},
|
|
4980
|
+
weexH: function(h, tag, data, ...children) {
|
|
4981
|
+
// 处理主题 h 方法
|
|
4982
|
+
if (!this.$weexThemeClass) {
|
|
4983
|
+
return h(tag, data, ...children);
|
|
4984
|
+
}
|
|
4985
|
+
if (data && data.staticClass && !data.themeProcessed) {
|
|
4986
|
+
const staticClasses = data.staticClass.split(' ').filter(cls => cls);
|
|
4987
|
+
let allThemeClasses = [];
|
|
4988
|
+
// 为每个静态类名应用主题处理
|
|
4989
|
+
staticClasses.forEach(className => {
|
|
4990
|
+
const themeClasses = this.$weexThemeClass(className);
|
|
4991
|
+
allThemeClasses.push(...themeClasses);
|
|
4992
|
+
});
|
|
4993
|
+
if (allThemeClasses.length > 0) {
|
|
4994
|
+
data.staticClass = data.staticClass + ' ' + allThemeClasses.join(' ');
|
|
4995
|
+
}
|
|
4996
|
+
data.themeProcessed = true;
|
|
4997
|
+
}
|
|
4998
|
+
const processedChildren = this.processChildrenTheme(children);
|
|
4999
|
+
return h(tag, data, ...processedChildren);
|
|
5000
|
+
},
|
|
5001
|
+
processChildrenTheme: function(children) {
|
|
5002
|
+
if (!children || !Array.isArray(children)) {
|
|
5003
|
+
return children;
|
|
5004
|
+
}
|
|
5005
|
+
return children.map(child => {
|
|
5006
|
+
if (Array.isArray(child)) {
|
|
5007
|
+
return this.processChildrenTheme(child);
|
|
5008
|
+
}
|
|
5009
|
+
// 如果是VNode对象
|
|
5010
|
+
if (child && typeof child === 'object' && child.data) {
|
|
5011
|
+
if (child.data.staticClass && !child.data.themeProcessed) {
|
|
5012
|
+
const staticClasses = child.data.staticClass.split(' ').filter(cls => cls);
|
|
5013
|
+
let allThemeClasses = [];
|
|
5014
|
+
staticClasses.forEach(className => {
|
|
5015
|
+
const themeClasses = this.$weexThemeClass(className);
|
|
5016
|
+
allThemeClasses.push(...themeClasses);
|
|
5017
|
+
});
|
|
5018
|
+
if (allThemeClasses.length > 0) {
|
|
5019
|
+
child.data.staticClass = child.data.staticClass + ' ' + allThemeClasses.join(' ');
|
|
5020
|
+
}
|
|
5021
|
+
child.data.themeProcessed = true;
|
|
5022
|
+
}
|
|
5023
|
+
if (child.children && Array.isArray(child.children)) {
|
|
5024
|
+
child.children = this.processChildrenTheme(child.children);
|
|
5025
|
+
}
|
|
5026
|
+
}
|
|
5027
|
+
return child;
|
|
5028
|
+
});
|
|
5029
|
+
},
|
|
4980
5030
|
_px2rem: function _px2rem (value, rootValue, propKey) {
|
|
4981
5031
|
var this$1 = this;
|
|
4982
5032
|
if (typeof value === 'string') {
|
|
@@ -5930,7 +5980,8 @@ var scrollable$1 = {
|
|
|
5930
5980
|
this._loadmoreReset = false;
|
|
5931
5981
|
var el = this.$el;
|
|
5932
5982
|
if (el) {
|
|
5933
|
-
|
|
5983
|
+
var eventName = this.weexType === 'scroller' ? 'loadmore' : 'loading';
|
|
5984
|
+
weex.utils.dispatchNativeEvent(el, eventName);
|
|
5934
5985
|
}
|
|
5935
5986
|
}
|
|
5936
5987
|
}
|
|
@@ -6067,6 +6118,12 @@ var scrollable$1 = {
|
|
|
6067
6118
|
}
|
|
6068
6119
|
}
|
|
6069
6120
|
delete this._touchParams;
|
|
6121
|
+
},
|
|
6122
|
+
handleScrollEnd: function handleScrollEnd (event) {
|
|
6123
|
+
var el = this.$el;
|
|
6124
|
+
if (el) {
|
|
6125
|
+
weex.utils.dispatchNativeEvent(el, 'scrollend', {});
|
|
6126
|
+
}
|
|
6070
6127
|
}
|
|
6071
6128
|
}
|
|
6072
6129
|
};
|
|
@@ -8563,7 +8620,7 @@ function _render (context, h) {
|
|
|
8563
8620
|
staticStyle: getIndicatorItemStyle(mergedStyle, isActive)
|
|
8564
8621
|
}));
|
|
8565
8622
|
}
|
|
8566
|
-
return h
|
|
8623
|
+
return context.weexH(h,'nav', {
|
|
8567
8624
|
attrs: { 'weex-type': 'indicator' },
|
|
8568
8625
|
staticClass: 'weex-indicator weex-ct'
|
|
8569
8626
|
}, [
|
|
@@ -8572,8 +8629,8 @@ function _render (context, h) {
|
|
|
8572
8629
|
// so a smaller wrapper is needed to prevent the overlap.
|
|
8573
8630
|
// This wrapper will cover only the whole size of all the
|
|
8574
8631
|
// indicator pointers' item-sizes.
|
|
8575
|
-
h
|
|
8576
|
-
staticClass: 'weex-indicator-inner'
|
|
8632
|
+
context.weexH(h,'div', {
|
|
8633
|
+
staticClass: 'weex-indicator-inner '
|
|
8577
8634
|
}, children)
|
|
8578
8635
|
])
|
|
8579
8636
|
}
|
|
@@ -8614,7 +8671,7 @@ var indicator$1 = {
|
|
|
8614
8671
|
}
|
|
8615
8672
|
};
|
|
8616
8673
|
|
|
8617
|
-
__$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: flex-start;\n align-items: flex-start;\n -webkit-box-pack: center;\n}\n\n.neighbor-cell {\n overflow: visible !important;\n}\n\nnav.weex-indicator {\n position: absolute;\n
|
|
8674
|
+
__$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: flex-start;\n align-items: flex-start;\n -webkit-box-pack: center;\n}\n\n.neighbor-cell {\n overflow: visible !important;\n}\n\nnav.weex-indicator {\n position: absolute;\n ;\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);
|
|
8618
8675
|
|
|
8619
8676
|
/*
|
|
8620
8677
|
* Licensed to the Apache Software Foundation (ASF) under one
|
package/package.json
CHANGED