efront 4.11.6 → 4.12.0

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.
@@ -323,13 +323,24 @@ function tree() {
323
323
  var limit = useLimit && top + h > limitHeight;
324
324
  css(p, {
325
325
  position: 'sticky',
326
+ zIndex: 2,
326
327
  top: limit ? limitHeight - h : top, zIndex: 3 - limit
327
328
  });
328
329
  top += h;
329
330
  });
330
331
  stickys.top = top;
331
332
  }
333
+ var unSticky = function () {
334
+ stickys.forEach(s => {
335
+ css(s, {
336
+ position: '',
337
+ top: '',
338
+ zIndex: 1
339
+ })
340
+ })
341
+ }
332
342
  var refresh = function () {
343
+ unSticky();
333
344
  var index = banner.index();
334
345
  var needremoves = dom.map(d => d.$target).filter(d => !!d);
335
346
  dom = getArrayFromTree(root, banner.joined);
@@ -92,8 +92,12 @@ var init = function () {
92
92
  };
93
93
  var resize2 = function () {
94
94
  var [head, body, foot] = getTypedChildren(this, ["head", "body", "foot"]);
95
- if (head && body) {
95
+ var changed = false;
96
+ a: if (head && body) {
96
97
  var height = head.offsetHeight + head.offsetTop;
98
+ if (head.$height === height) break a;
99
+ head.$height = height;
100
+ changed = true;
97
101
  css(head, {
98
102
  marginBottom: fromOffset(-height),
99
103
  })
@@ -101,8 +105,11 @@ var resize2 = function () {
101
105
  paddingTop: fromOffset(height - body.clientTop)
102
106
  });
103
107
  }
104
- if (foot && body) {
108
+ a: if (foot && body) {
105
109
  var height = foot.offsetHeight;
110
+ if (foot.$height === height) break a;
111
+ foot.$height = height;
112
+ changed = true;
106
113
  css(body, {
107
114
  paddingBottom: fromOffset(height)
108
115
  });
@@ -110,13 +117,11 @@ var resize2 = function () {
110
117
  marginTop: fromOffset(-height)
111
118
  })
112
119
  }
113
- if (body) {
120
+ if (changed) {
121
+ css(body, { height: '' });
114
122
  if (body.scrollHeight + body.offsetTop > this.clientHeight + 1) {
115
123
  css(body, { height: fromOffset(this.clientHeight) });
116
124
  }
117
- else {
118
- css(body, { height: '' });
119
- }
120
125
  }
121
126
  };
122
127
  function view(element) {
@@ -9,7 +9,7 @@ var rows = function (type, text) {
9
9
  console.log(text)
10
10
  return [];
11
11
  }
12
- type = type.toLowerCase();
12
+ type = String(type).toLowerCase();
13
13
  if (type in 语言) {
14
14
  var c = 语言[type](text);
15
15
  标签化(c, encode);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "efront",
3
- "version": "4.11.6",
3
+ "version": "4.12.0",
4
4
  "description": "简化前端开发,优化web性能",
5
5
  "main": "public/efront.js",
6
6
  "directories": {