efront 3.26.14 → 3.26.15
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/LICENSE +2 -0
- package/coms/zimoli/render.js +5 -3
- package/coms/zimoli/resize.js +5 -2
- package/package.json +1 -1
- package/public/efront.js +1 -1
package/LICENSE
CHANGED
|
@@ -18,3 +18,5 @@ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
|
18
18
|
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
19
19
|
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
20
20
|
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
21
|
+
|
|
22
|
+
共产党与狗不得使用
|
package/coms/zimoli/render.js
CHANGED
|
@@ -380,7 +380,10 @@ var renderStructure = function (element) {
|
|
|
380
380
|
if ($struct.if) var { name: ifkey, key, value: ifexp } = $struct.if;
|
|
381
381
|
if ($struct.repeat) var { value: repeat } = $struct.repeat;
|
|
382
382
|
if (!ifkey) return createRepeat.call(element, repeat);
|
|
383
|
-
if (!ifexp || !repeat)
|
|
383
|
+
if (!ifexp || !repeat) {
|
|
384
|
+
delete $struct.if;
|
|
385
|
+
return structures[key].call(element, ifexp);
|
|
386
|
+
}
|
|
384
387
|
var { before, after } = parseIfWithRepeat(ifexp, repeat);
|
|
385
388
|
if (after.length) {
|
|
386
389
|
$struct.if = { key, name: ifkey, value: after.join("&&") };
|
|
@@ -875,7 +878,6 @@ function createStructure(element) {
|
|
|
875
878
|
if (isArrayLike(element)) return Array.prototype.map.call(element, createStructure);
|
|
876
879
|
if (element.$struct) return element.$struct;
|
|
877
880
|
// 处理结构流
|
|
878
|
-
if (!element.attributes) console.log(element)
|
|
879
881
|
var attrs = Array.prototype.slice.call(element.attributes);
|
|
880
882
|
var types = {};
|
|
881
883
|
var emiter_reg = /^(?:(v|ng|on|once)?\-|v\-on\:|@|once|on)/i;
|
|
@@ -902,7 +904,7 @@ function createStructure(element) {
|
|
|
902
904
|
continue;
|
|
903
905
|
}
|
|
904
906
|
var key = name.replace(/^(ng|v|.*?)\-/i, "").toLowerCase();
|
|
905
|
-
if (structures.hasOwnProperty(key)
|
|
907
|
+
if (structures.hasOwnProperty(key)) {
|
|
906
908
|
if (element.renderid <= -2) {
|
|
907
909
|
if (/^if$|^else/i.test(key)) {
|
|
908
910
|
if (types.if) {
|
package/coms/zimoli/resize.js
CHANGED
|
@@ -145,13 +145,16 @@ moveupon(window, handle);
|
|
|
145
145
|
var offmousemove;
|
|
146
146
|
var resizeh = lazy(function () {
|
|
147
147
|
// 用于刷新自定义的scrollbar/lattice/gallery组件
|
|
148
|
+
/**
|
|
149
|
+
* @type {HTMLElement}
|
|
150
|
+
*/
|
|
148
151
|
var elem = this;
|
|
149
152
|
var resized = false;
|
|
150
|
-
if (elem.scrollWidth > elem.
|
|
153
|
+
if (elem.scrollWidth > elem.offsetWidth + elem.clientLeft + 1) {
|
|
151
154
|
css(elem, { width: elem.offsetWidth });
|
|
152
155
|
resized = true;
|
|
153
156
|
}
|
|
154
|
-
if (elem.scrollHeight > elem.
|
|
157
|
+
if (elem.scrollHeight > elem.offsetHeight + elem.clientTop + 1) {
|
|
155
158
|
css(elem, { height: elem.offsetHeight });
|
|
156
159
|
resized = true;
|
|
157
160
|
}
|