efront 4.22.18 → 4.23.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.
- package/#/345/233/275/351/231/205/345/214/226.yml +6 -0
- package/apps/kugou/search/search.js +4 -3
- package/apps/noice/main.js +1 -1
- package/apps/pivot/auth/login.js +4 -4
- package/apps/pivot/dht/list.js +5 -5
- package/apps/pivot/link/chat.js +1 -1
- package/apps/pivot/link/index.js +1 -1
- package/apps/pivot/link/list.js +5 -4
- package/apps/pivot/share/list.js +6 -5
- package/apps/pivot/wow/root.js +3 -2
- package/coms/basic/LoadingArray.js +1 -0
- package/coms/basic/cross_.js +4 -1
- package/coms/basic/data.js +16 -13
- package/coms/basic_/WeakMap.js +23 -0
- package/coms/compile/Javascript.js +2 -1
- package/coms/explorer/context.js +10 -7
- package/coms/explorer/edit.js +1 -1
- package/coms/explorer/fileitem.js +9 -7
- package/coms/explorer/main.js +20 -17
- package/coms/frame/chat.js +17 -16
- package/coms/frame/list.js +6 -5
- package/coms/kugou/bindScroll.js +0 -1
- package/coms/kugou/buildScroll.js +5 -4
- package/coms/kugou/krc.js +2 -2
- package/coms/kugou/player.js +2 -2
- package/coms/kugou/song.js +1 -1
- package/coms/layer/leftCenter.js +5 -5
- package/coms/pivot/checkGeo.js +0 -1
- package/coms/zimoli/$eval.js +1 -0
- package/coms/zimoli/$mounted.js +1 -0
- package/coms/zimoli/$parented.js +1 -0
- package/coms/zimoli/$renders.js +1 -0
- package/coms/zimoli/$scoped.js +1 -0
- package/coms/zimoli/$structed.js +1 -0
- package/coms/zimoli/HexEditor.js +1 -1
- package/coms/zimoli/appendChild.js +12 -20
- package/coms/zimoli/autodragchildren_test.js +1 -1
- package/coms/zimoli/checkbox.js +1 -1
- package/coms/zimoli/container.js +4 -3
- package/coms/zimoli/createItemTarget.js +10 -6
- package/coms/zimoli/cross.js +1 -1
- package/coms/zimoli/field.js +3 -3
- package/coms/zimoli/gallery_test.js +4 -3
- package/coms/zimoli/getArgsChildren.js +22 -0
- package/coms/zimoli/getGenerator.js +36 -28
- package/coms/zimoli/grid.js +2 -2
- package/coms/zimoli/isMounted.js +6 -3
- package/coms/zimoli/lattice.js +2 -4
- package/coms/zimoli/maps.js +1 -2
- package/coms/zimoli/menu.js +1 -0
- package/coms/zimoli/menuItem.js +4 -3
- package/coms/zimoli/menuList.js +8 -8
- package/coms/zimoli/menu_test.js +4 -3
- package/coms/zimoli/model.js +11 -6
- package/coms/zimoli/on.js +28 -20
- package/coms/zimoli/picture.js +0 -7
- package/coms/zimoli/popup.js +33 -2
- package/coms/zimoli/radio.js +1 -1
- package/coms/zimoli/remove.js +5 -14
- package/coms/zimoli/render.js +193 -99
- package/coms/zimoli/scrollbar.js +90 -42
- package/coms/zimoli/scrollbar.less +5 -3
- package/coms/zimoli/select.js +3 -3
- package/coms/zimoli/selectList.js +1 -1
- package/coms/zimoli/selectListEdit.js +5 -4
- package/coms/zimoli/table.html +6 -4
- package/coms/zimoli/table.js +82 -41
- package/coms/zimoli/table.less +22 -0
- package/coms/zimoli/vbox.less +2 -2
- package/coms/zimoli/zimoli.js +15 -8
- package/docs/version-desc.md +3 -1
- package/docs//347/211/210/346/234/254/350/257/264/346/230/216.md +3 -1
- package/package.json +1 -1
- package/public/efront.js +1 -1
package/coms/zimoli/zimoli.js
CHANGED
|
@@ -49,8 +49,8 @@ onhashchange(window, function (event) {
|
|
|
49
49
|
});
|
|
50
50
|
// body
|
|
51
51
|
var location_pathname = location.pathname;
|
|
52
|
-
var _zimoli_params_key =
|
|
53
|
-
var _zimoli_state_prefix =
|
|
52
|
+
var _zimoli_params_key = `紫茉莉:${location_pathname}#`;
|
|
53
|
+
var _zimoli_state_prefix = `茉莉紫:${location_pathname}#`;
|
|
54
54
|
|
|
55
55
|
function getReverseStyle(style) {
|
|
56
56
|
if (!isObject(style)) {
|
|
@@ -317,6 +317,7 @@ function prepare(pgpath, ok) {
|
|
|
317
317
|
//只能在page上使用
|
|
318
318
|
_pageback_listener = handler;
|
|
319
319
|
};
|
|
320
|
+
state.upwith = popup.upwith(_with_elements);
|
|
320
321
|
state.titlebar = function () {
|
|
321
322
|
var realTitleBar = titlebar.apply(null, arguments);
|
|
322
323
|
if (!realTitleBar.parentNode) _with_elements.push(realTitleBar);
|
|
@@ -370,17 +371,18 @@ function create(pagepath, args, from, needroles) {
|
|
|
370
371
|
var pg = pagepath;
|
|
371
372
|
var { with: _with_elements = [], state = {}, onback: _pageback_listener, roles } = pg;
|
|
372
373
|
}
|
|
374
|
+
var h = history[current_history];
|
|
373
375
|
if (!checkroles(user.roles, roles) || !checkroles(user.roles, needroles)) {
|
|
374
376
|
// 检查权限
|
|
375
377
|
if (!user.isLogin && user.loginPath) {
|
|
376
378
|
var pg = create(user.loginPath);
|
|
377
|
-
|
|
379
|
+
if (h) h.wardable = false;
|
|
378
380
|
return pg;
|
|
379
381
|
}
|
|
380
382
|
return alert(i18n`没有权限!`, 0);
|
|
381
383
|
}
|
|
382
384
|
if (!pg) return;
|
|
383
|
-
if (
|
|
385
|
+
if (h) h.wardable = true;
|
|
384
386
|
var _with_length = _with_elements.length;
|
|
385
387
|
state.onback = function (handler) {
|
|
386
388
|
_pageback_listener = handler;
|
|
@@ -388,8 +390,12 @@ function create(pagepath, args, from, needroles) {
|
|
|
388
390
|
var _page = pg.call(state, args, from);
|
|
389
391
|
if (undefined === args || null === args) args = {};
|
|
390
392
|
if (_page) {
|
|
391
|
-
|
|
392
|
-
|
|
393
|
+
var page_with = _with_elements.splice(_with_length, _with_elements.length - _with_length);
|
|
394
|
+
if (_page.with && _page.with !== _with_elements) {
|
|
395
|
+
page_with = page_with.concat(_page.with);
|
|
396
|
+
_with_elements.with = page_with;
|
|
397
|
+
}
|
|
398
|
+
_page.with = _with_elements;
|
|
393
399
|
if (args.initialStyle) _page.initialStyle = args.initialStyle;
|
|
394
400
|
if (args.holdupStyle) _page.holdupStyle = args.holdupStyle;
|
|
395
401
|
if (_page.initialStyle && !_page.holdupStyle) {
|
|
@@ -455,7 +461,7 @@ var global = {};
|
|
|
455
461
|
var history = {};
|
|
456
462
|
var current_history, default_history = current_history = "";
|
|
457
463
|
history[current_history] = createEmptyHistory('/main', false);
|
|
458
|
-
var history_session_object_key =
|
|
464
|
+
var history_session_object_key = `紫茉莉:${location_pathname}`;
|
|
459
465
|
try {
|
|
460
466
|
history = JSAM.parse(historyStorage.getItem(history_session_object_key)) || history;
|
|
461
467
|
} catch (e) {
|
|
@@ -671,7 +677,8 @@ function addGlobal(element, name = null, isBack) {
|
|
|
671
677
|
if (isBack) appendChild.insert(body, element);
|
|
672
678
|
else appendChild(body, element);
|
|
673
679
|
}
|
|
674
|
-
rootElements
|
|
680
|
+
var upwith = element.$upwith || rootElements;
|
|
681
|
+
if (upwith.indexOf(element) < 0) upwith.push(element);
|
|
675
682
|
}
|
|
676
683
|
if (hasLock) fixurl(), fixLock = false;
|
|
677
684
|
}
|
package/docs/version-desc.md
CHANGED
|
@@ -10,4 +10,6 @@
|
|
|
10
10
|
|
|
11
11
|
4.0 No longer relying on `typescript` (nearly 170000 lines of source code), the compilation speed has increased by four times, the memory usage has been reduced to 1/8 of the original, and the self compilation time on GitHub has also been reduced to about 15 seconds.
|
|
12
12
|
|
|
13
|
-
4.1 No longer relying on `less-node` or `pngjs`, while the `less-node` is replaced with [suxin](https://www.npmjs.com/package/suxin) from `efront`.
|
|
13
|
+
4.1 No longer relying on `less-node` or `pngjs`, while the `less-node` is replaced with [suxin](https://www.npmjs.com/package/suxin) from `efront`.
|
|
14
|
+
|
|
15
|
+
4.23 The `zimoli` library has adjusted the component rendering method to provide a relatively clean DOM for developers. When calling methods such as `on` and `render`, associated data is no longer attached to DOM elements (except for browsers without WeakMap). Code that uses corresponding underlying features needs to be modified.
|
|
@@ -10,4 +10,6 @@
|
|
|
10
10
|
|
|
11
11
|
4.0版本 不再依赖`typescipt`(近17万行源码),编译速度再次提升4倍,占用内存减少到原来的1/8,github上自我编译时间也减少到15秒左右。
|
|
12
12
|
|
|
13
|
-
4.1版本 不再依赖`less-node`和`pngjs`,其中`less-node` 由`efront`自建的css工具[素馨](https://www.npmjs.com/package/suxin)代替。
|
|
13
|
+
4.1版本 不再依赖`less-node`和`pngjs`,其中`less-node` 由`efront`自建的css工具[素馨](https://www.npmjs.com/package/suxin)代替。
|
|
14
|
+
|
|
15
|
+
4.23版本 紫茉莉库`zimoli`调整组件渲染方式,给开发一个相对干净的DOM,调用`on`和`render`等方法时,不再将关联的数据挂载到dom元素,(无WeakMap的浏览器除外),用到相应的底层特性的代码需要修改。
|