efront 4.22.0 → 4.22.1

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.
@@ -26,9 +26,9 @@ var gosrc = function (src) {
26
26
  change.call(this, src);
27
27
  }
28
28
  };
29
- var goone = function (src) {
29
+ var goone = function () {
30
30
  if ("$src" in this) return;
31
- gosrc.call(this, src);
31
+ gosrc.call(this, this.src);
32
32
  };
33
33
  var onparams = function (params) {
34
34
  zimoli.go(this.$src, params, this);
@@ -39,7 +39,7 @@ function container(element) {
39
39
  care(comment, gosrc);
40
40
  if (element.hasAttribute && element.hasAttribute('src')) {
41
41
  var src = element.getAttribute('src');
42
- if (src) oncemount(comment, goone);
42
+ if (src) comment.src = src, oncemount(comment, goone);
43
43
  }
44
44
  return comment;
45
45
  }
@@ -297,6 +297,7 @@ function main() {
297
297
  }
298
298
  return generator(index, item);
299
299
  }, direction);
300
+ if (!page.$renders) page.$renders = [];
300
301
  page.$renders.unshift(function () {
301
302
  this.$scope.hasIcon = hasIcon();
302
303
  });
@@ -2,5 +2,6 @@ function main() {
2
2
  var page = div();
3
3
  page.innerHTML = menuList_test;
4
4
  page.setAttribute("mode", 'vertical');
5
+ css(page, "width:180px");
5
6
  return menu(page);
6
7
  }
@@ -645,14 +645,14 @@ var directives = {
645
645
  var style = this.style;
646
646
  if (style.display !== display) style.display = display;
647
647
  }, function () {
648
- return this.style.display === 'none';
648
+ return this.style?.display === 'none';
649
649
  }),
650
650
  show: createBinder2(function (value) {
651
651
  var display = value ? '' : 'none';
652
652
  var style = this.style;
653
653
  if (style.display !== display) style.display = display;
654
654
  }, function () {
655
- return this.style.display !== 'none';
655
+ return this.style?.display !== 'none';
656
656
  }),
657
657
  style: createMapper(css, css.styleToMap),
658
658
  class: createMapper(addClass, addClass.classToMap),
@@ -42,6 +42,7 @@ function tree() {
42
42
  generator = arg;
43
43
  }
44
44
  });
45
+ if (!element) element = document.createElement('tree');
45
46
  if (!generator && element && "$src" in element && element.childNodes.length) {
46
47
  generator = getGenerator(element, 'node');
47
48
  }
@@ -212,7 +213,6 @@ function tree() {
212
213
  } else {
213
214
  marginTop = top.offsetTop - bottom.offsetTop - bottom.offsetHeight;
214
215
  }
215
- css(banner, { paddingBottom: -marginTop });
216
216
  var res = transition(top, {
217
217
  transition: `margin-top ${time(marginTop)}s ease-out`,
218
218
  marginTop: fromOffset(marginTop)
@@ -232,7 +232,6 @@ function tree() {
232
232
  setState(false);
233
233
  z0();
234
234
  var paddingBottom = -margin_top;
235
- css(banner, { paddingBottom });
236
235
  var res = transition(change_elem, { transition: `margin-top ${time(margin_top)}s ease-out`, marginTop: fromOffset(margin_top) }, false);
237
236
  timeout(z1, res + 60);
238
237
  }
@@ -1,7 +1,9 @@
1
1
  & {
2
- height: 100%;
2
+ max-height: 100%;
3
3
  background: #222d32;
4
4
  color: #fff;
5
+ display: block;
6
+ overflow: hidden;
5
7
 
6
8
  >[node] {
7
9
  display: block;
@@ -1,8 +1,9 @@
1
+
1
2
  var data1 = random([
2
3
  {
3
4
  name: "一级目录${inc}"
4
5
  }
5
- ], 20);
6
+ ], 2);
6
7
  var data2 = random([{
7
8
  name: "一级目录${inc}",
8
9
  children: [
@@ -16,14 +17,15 @@ var data2 = random([{
16
17
  },
17
18
  ]
18
19
  }
19
- ], 20)
20
+ ], 2)
20
21
 
21
22
  function tree_test() {
22
23
  var banner = tree();
23
24
  banner.setData(data2);
24
- setTimeout(function () {
25
- banner.go(0);
26
- test_scroll(banner);
27
- })
25
+ css(banner, {
26
+ overflow: 'hidden',
27
+ padding: 0,
28
+ height: 260
29
+ });
28
30
  return banner;
29
31
  }
@@ -447,7 +447,7 @@ function zimoli(pagepath, args, history_name, oldpagepath) {
447
447
  }
448
448
  if (isNode(history_name))
449
449
  var zid = history_name.zimoliid = (history_name.zimoliid | 0) + 1;
450
- else var zid = ++zimoliid;
450
+ else var zid = arguments.length ? ++zimoliid : zimoliid;
451
451
 
452
452
  if (page_generators[pagepath]) return go(pagepath, args, history_name, oldpagepath);
453
453
  return prepare(pagepath, function () {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "efront",
3
- "version": "4.22.0",
3
+ "version": "4.22.1",
4
4
  "description": "一个开发环境,提供一种自由的前端开发模式,也可作为辅助工具使用。",
5
5
  "main": "public/efront.js",
6
6
  "directories": {