efront 4.19.5 → 4.19.6

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.
@@ -17,7 +17,7 @@ function main(dataid, datapath) {
17
17
  if (s.hash || s.url) {
18
18
  kugou$player.play(s);
19
19
  } else {
20
- go(datapath, s);
20
+ zimoli.go(datapath, s);
21
21
  }
22
22
  },
23
23
  datas: data.from(dataid, parseSongsList)
@@ -13,7 +13,7 @@ function Main(dataid, datapath, titleid) {
13
13
  if (s.hash) {
14
14
  this.player.play(s);
15
15
  } else {
16
- go(datapath, s);
16
+ zimoli.go(datapath, s);
17
17
  }
18
18
  },
19
19
  png: img,
@@ -5,7 +5,8 @@
5
5
  right: 0;
6
6
  bottom: -60px;
7
7
  top: 0;
8
- height: auto;
8
+ height: 100%;
9
+ display: block;
9
10
  background: #323336;
10
11
  }
11
12
  &+.titlebar>back{
package/coms/zimoli/on.js CHANGED
@@ -228,7 +228,7 @@ function checkKeyNeed(eventtypes, e) {
228
228
  for (var cx = 0, dx = keyneed.length; cx < dx; cx++) {
229
229
  var key = keyneed[cx];
230
230
  keykeep[key] = true;
231
- if (!e[key + "Key"]) return false;
231
+ if (!e[key + "Key"] && e.keyCode !== keyCodeMap[key]) return false;
232
232
  }
233
233
  }
234
234
  if (eventtypes.only) {
@@ -543,7 +543,7 @@ var directives = {
543
543
  var style = elem.style;
544
544
  if (style.display !== display) style.display = display;
545
545
  }, function (elem) {
546
- return elem.style.display === 'none';
546
+ return elem.style.display !== 'none';
547
547
  }),
548
548
  style: createMapper(css, css.styleToMap),
549
549
  class: createMapper(addClass, addClass.classToMap),
@@ -708,6 +708,7 @@ var emiters = {
708
708
  };
709
709
  emiters.v = emiters.ng = emiters.on;
710
710
 
711
+ var 驼峰化 = key => key.replace(/\-([a-z])/ig, (_, w) => w.toUpperCase());
711
712
  var keyAdapters = [
712
713
  key => key,
713
714
  key => key.toLowerCase(),
@@ -947,7 +948,7 @@ class Struct {
947
948
 
948
949
  var pushid = function (ids, name) {
949
950
  ids.push(name);
950
- var name1 = name.replace(/\-([a-z])/ig, (_, a) => a.toUpperCase());
951
+ var name1 = 驼峰化(name);
951
952
  if (name1 !== name) ids.push(name1);
952
953
  };
953
954
 
@@ -1021,22 +1022,28 @@ function createStructure(element, useExists) {
1021
1022
  }
1022
1023
  // ng-html,ng-src,ng-text,ng-model,ng-style,ng-class,...
1023
1024
  var key = name.replace(/^(ng|v|[^\_\:\.]*?)\-|^[\:\_\.\?\@\*&]|^v\-bind\:/i, "").toLowerCase();
1024
- if (key.length !== name.length && directives.hasOwnProperty(key) || /^([\_\:\.]|v\-bind\:)/.test(name) || /^[@&\?\*]/.test(name) && !value) {
1025
+ if (key.length !== name.length && directives.hasOwnProperty(key) || /^([\_\:\.]|v\-bind\:)/.test(name) || /^[@&\?\*\+]/.test(name) && !value) {
1025
1026
  if (value) binds[key] = value;
1026
- else switch (name.charAt(0)) {
1027
- case "?":
1028
- case ":":
1029
- binds.text = key;
1030
- break;
1031
- case "@":
1032
- binds.html = key;
1033
- break;
1034
- case "*":
1035
- binds.model = key;
1036
- break;
1037
- case "&":
1038
- binds.src = key;
1039
- break;
1027
+ else {
1028
+ key = 驼峰化(name.slice(1));
1029
+ switch (name.charAt(0)) {
1030
+ case "?":
1031
+ case ":":
1032
+ binds.text = key;
1033
+ break;
1034
+ case "@":
1035
+ binds.html = key;
1036
+ break;
1037
+ case "*":
1038
+ binds.model = key;
1039
+ break;
1040
+ case "&":
1041
+ binds.src = key;
1042
+ break;
1043
+ case "+":
1044
+ binds[key] = key;
1045
+ break;
1046
+ }
1040
1047
  }
1041
1048
  element.removeAttribute(name);
1042
1049
  }
@@ -1048,10 +1055,11 @@ function createStructure(element, useExists) {
1048
1055
  if (value) ons.push([emiters[ngon], name.replace(emiter_reg, ''), value]);
1049
1056
  }
1050
1057
  // placeholder_ href_ checked_ ...
1051
- else if (/[_@\:\.&\?\*]$/.test(name)) {
1058
+ else if (/[_@\:\.&\?\*\+]$/.test(name)) {
1052
1059
  var key = name.slice(0, name.length - 1);
1053
1060
  if (value) attr1[key] = value;
1054
1061
  else {
1062
+ key = 驼峰化(name.slice(0, name.length - 1));
1055
1063
  switch (name.charAt(name.length - 1)) {
1056
1064
  case "?":
1057
1065
  binds.text = key;
@@ -1065,6 +1073,9 @@ function createStructure(element, useExists) {
1065
1073
  case "&":
1066
1074
  binds.src = key;
1067
1075
  break;
1076
+ case "+":
1077
+ binds[key] = key;
1078
+ break;
1068
1079
  }
1069
1080
  element.setAttribute(key.replace(/\./g, '-'), '');
1070
1081
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "efront",
3
- "version": "4.19.5",
4
- "description": "简化前端开发,优化web性能",
3
+ "version": "4.19.6",
4
+ "description": "一个开发环境,提供前端开发所需的各种功能。此项目不依赖vue和angular的基础库,却同样提供了对vue/angular的语法的支持,像v-if/v-else,ng-if,v-show,ng-model,v-bind,ng-bind,@click,ng-click等可在同一个文件中使用,另外组件可以拆分成脚本、样式、模板分三个文件保存,也可以合并成一个文件保存,这取决于使用者的偏好,而不是冷冰冰的硬性规定。像vue3中直接绑定变量,vue2绑定的却是data中的数据,这种vue不同版本不兼容的问题,efront同时兼容两种绑定方式,同样取决于使用者的喜好,而不是框架作者的喜好。",
5
5
  "main": "public/efront.js",
6
6
  "directories": {
7
7
  "test": "test"