efront 3.16.1 → 3.18.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.
Files changed (71) hide show
  1. package/apps/pivot/api/edit.js +1 -0
  2. package/apps/pivot/api/list.js +20 -0
  3. package/apps/pivot/api.yml +8 -4
  4. package/apps/pivot/dict/edit.js +1 -0
  5. package/apps/pivot/dict/list.js +12 -0
  6. package/apps/pivot/link/chat.js +29 -0
  7. package/apps/pivot/link/chat.less +5 -0
  8. package/apps/pivot/link/list.html +8 -3
  9. package/apps/pivot/link/list.js +23 -2
  10. package/apps/pivot/link/list.less +3 -0
  11. package/apps/pivot/log/boot.js +13 -10
  12. package/apps/pivot/main.less +1 -0
  13. package/apps/pivot/menu.yml +4 -1
  14. package/apps/pivot/proxy/list.js +9 -8
  15. package/apps/pivot/task/list.js +1 -1
  16. package/apps/pivot/user/api.html +2 -0
  17. package/apps/pivot/user/api.js +14 -0
  18. package/apps/pivot/user/api.less +0 -0
  19. package/coms/basic/Speed.js +2 -3
  20. package/coms/basic/assert.js +5 -3
  21. package/coms/basic/lazy.js +21 -7
  22. package/coms/basic/lazy_test.js +62 -0
  23. package/coms/basic/parseURL.js +21 -2
  24. package/coms/basic/refilm_decode.js +4 -2
  25. package/coms/frame/chat.html +13 -0
  26. package/coms/frame/chat.js +39 -0
  27. package/coms/frame/chat.less +125 -0
  28. package/coms/frame/design.html +7 -0
  29. package/coms/frame/design.js +23 -0
  30. package/coms/frame/design.less +17 -0
  31. package/coms/frame/dict.js +21 -0
  32. package/coms/frame/edit.js +1 -1
  33. package/coms/frame/left.html +1 -1
  34. package/coms/frame/list.js +1 -1
  35. package/coms/frame/route.js +1 -0
  36. package/coms/kugou/song.html +1 -1
  37. package/coms/kugou/song.js +4 -3
  38. package/coms/pivot/pedit.js +3 -3
  39. package/coms/pivot/plist.js +2 -2
  40. package/coms/zimoli/Item.js +40 -25
  41. package/coms/zimoli/appendChild.js +6 -8
  42. package/coms/zimoli/cloneVisible.js +1 -0
  43. package/coms/zimoli/container.js +10 -0
  44. package/coms/zimoli/createItemTarget.js +7 -0
  45. package/coms/zimoli/data.js +26 -12
  46. package/coms/zimoli/design.html +5 -4
  47. package/coms/zimoli/design.less +8 -3
  48. package/coms/zimoli/drag.js +5 -3
  49. package/coms/zimoli/field.html +1 -1
  50. package/coms/zimoli/getGenerator.js +4 -4
  51. package/coms/zimoli/getTreeFromData.js +3 -0
  52. package/coms/zimoli/list.js +5 -5
  53. package/coms/zimoli/menu.js +16 -13
  54. package/coms/zimoli/menuItem.js +2 -2
  55. package/coms/zimoli/menuList.html +1 -1
  56. package/coms/zimoli/menuList.js +14 -14
  57. package/coms/zimoli/menuList.less +1 -1
  58. package/coms/zimoli/model.js +4 -3
  59. package/coms/zimoli/on.js +1 -1
  60. package/coms/zimoli/once.js +6 -5
  61. package/coms/zimoli/onmounted.js +1 -1
  62. package/coms/zimoli/render.js +61 -24
  63. package/coms/zimoli/renderDefaults.js +1 -0
  64. package/coms/zimoli/resize.js +18 -0
  65. package/coms/zimoli/scrollbar.js +20 -8
  66. package/coms/zimoli/scrollbar.less +22 -1
  67. package/coms/zimoli/tree.js +3 -3
  68. package/coms/zimoli/vbox.js +7 -3
  69. package/coms/zimoli/zimoli.js +1 -1
  70. package/package.json +1 -1
  71. package/public/efront.js +1 -1
@@ -132,7 +132,7 @@ function tree() {
132
132
  }
133
133
  var tabs = new Array(com.tab + 1).join("<t></t>");
134
134
  if (isFunction(generator)) {
135
- var elem = generator(index, com instanceof Item ? com.value : com);
135
+ var elem = generator(index, com instanceof Item ? com.value : com, com);
136
136
  if (!elem) return;
137
137
  span = document.createElement('span');
138
138
  span.innerHTML = tabs;
@@ -222,9 +222,9 @@ function tree() {
222
222
  };
223
223
  com.target = _div;
224
224
  _div.refresh();
225
- onclick(_div, function () {
225
+ onclick(_div, function (event) {
226
226
  var isClosed = com.isClosed();
227
- if (!active(banner, com.value, com, _div)) {
227
+ if (!active(banner, com.value, com, element.$src ? createItemTarget.call(element, com.value) : _div)) {
228
228
  return;
229
229
  }
230
230
  if (isClosed === com.isClosed() && com.length) {
@@ -84,7 +84,7 @@ function ybox(generator) {
84
84
  var stop = _box.stopY;
85
85
  var stop2 = lazy(function () {
86
86
  scrollY.smooth(stop);
87
- }, 310);
87
+ }, 40);
88
88
  var decrease = function () {
89
89
  var res = _decrease(increaser_t) + _decrease(increaser_b);
90
90
  if (!res) {
@@ -126,7 +126,12 @@ function ybox(generator) {
126
126
  // ie
127
127
  addClass(_box, "trident");
128
128
  } else {
129
+ var wheelTime = 0;
129
130
  onmousewheel(_box, function (event) {
131
+ if (event.timeStamp - wheelTime > 40 && Math.abs(event.deltaY) < 12) {
132
+ wheelTime = event.timeStamp;
133
+ return;
134
+ }
130
135
  var deltay = -event.deltaY;
131
136
  if (event.moveLocked) return;
132
137
  event.moveLocked = true;
@@ -137,7 +142,6 @@ function ybox(generator) {
137
142
  box = getTargetIn(e => e === _box || /^(?:auto|scroll)$/i.test(getComputedStyle(e).overflowY) && e.scrollHeight - e.scrollTop > e.clientHeight, event.target);
138
143
  }
139
144
  if (box === _box) {
140
- event.preventDefault();
141
145
  scrollY.call(_box, -deltay, false);
142
146
  stop2();
143
147
  }
@@ -169,7 +173,7 @@ function ybox(generator) {
169
173
  temp = temp.parentNode;
170
174
  }
171
175
  this.YScrollBoxId = +scrollId + 1;
172
- }
176
+ };
173
177
  if (isMounted(_box)) initScrollId.call(_box);
174
178
  on("append")(_box, initScrollId);
175
179
  on("remove")(_box, scrollY.reset);
@@ -145,7 +145,7 @@ function go(pagepath, args, history_name, oldpagepath) {
145
145
  history_name.activate = pagepath;
146
146
  history_name.activateNode = _page;
147
147
  }
148
- if (isString(pagepath)) {
148
+ else if (isString(pagepath)) {
149
149
  if (fullfill_is_dispatched > 0) return;
150
150
  fullfill_is_dispatched = 1;
151
151
  var event = createEvent("zimoli");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "efront",
3
- "version": "3.16.1",
3
+ "version": "3.18.0",
4
4
  "description": "一个开发工具,开放源代码,自带组件库和编译环境,可以用来开发web组件,web应用或nodejs模块,或做为已有代码的加密工具,也可以做为静态页面服务器或跨域中转服务器使用",
5
5
  "main": "public/efront.js",
6
6
  "directories": {