efront 3.5.7 → 3.5.11

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.
@@ -1,38 +1,42 @@
1
1
  & {
2
- display : inline-block;
3
- width : auto;
4
- height : auto;
2
+ display: inline-block;
3
+ width: auto;
4
+ height: auto;
5
5
  background-color: #fff;
6
- box-shadow : 0 0 20px -6px rgba(0, 0, 0, .6);
7
- line-height : 28px;
8
- padding : 6px 0;
6
+ box-shadow: 0 0 20px -6px rgba(0, 0, 0, .1);
7
+ border: 1px solid #0003;
8
+ line-height: 28px;
9
+ padding: 6px 0;
9
10
 
10
11
  >menu-item {
11
- display : block;
12
- position : relative;
13
- padding : 0 16px;
14
- border-radius : 0;
12
+ display: block;
13
+ position: relative;
14
+ padding: 0 16px;
15
+ border-radius: 0;
15
16
  background-color: inherit;
16
- color : inherit;
17
- box-shadow : none;
18
- text-align : inherit;
17
+ color: inherit;
18
+ box-shadow: none;
19
+ text-align: inherit;
20
+ &.warn{
21
+ color: #c28;
22
+ }
19
23
 
20
24
  &.has-children {
21
25
  padding: 0 24px 0 16px;
22
26
 
23
27
  &:after {
24
- content : ">";
25
- display : block;
26
- width : 20px;
27
- height : 20px;
28
+ content: ">";
29
+ display: block;
30
+ width: 20px;
31
+ height: 20px;
28
32
  line-height: 20px;
29
- font-size : 18px;
30
- transform : scaleX(.56);
31
- position : absolute;
32
- right : 6px;
33
- top : 50%;
34
- margin-top : -10px;
35
- text-align : right;
33
+ font-size: 18px;
34
+ transform: scaleX(.56);
35
+ position: absolute;
36
+ right: 6px;
37
+ top: 50%;
38
+ margin-top: -10px;
39
+ text-align: right;
36
40
  }
37
41
  }
38
42
 
@@ -41,5 +45,5 @@
41
45
 
42
46
  i {
43
47
  display: inline-block;
44
- width : 20px;
48
+ width: 20px;
45
49
  }
@@ -142,7 +142,7 @@ function main(elem) {
142
142
  elem.setAttribute("type", field_type);
143
143
  }
144
144
  remove(elem.children);
145
- if (readonly) {
145
+ if (readonly || field.readonly) {
146
146
  if (field_type === "function") {
147
147
  field_editor(elem);
148
148
  } else {
@@ -51,7 +51,7 @@ function rebuild(element) {
51
51
  dispatch(event, element);
52
52
  }
53
53
  }
54
- var variableReg = /([^\:\,\+\=\-\!%\^\|\/\&\*\!\;\?\>\<~\{\}\s]|\?\s*\.(?=[^\d])|\s*\.\s*)+/g;
54
+ var variableReg = /([^\:\,\+\=\-\!%\^\|\/\&\*\!\;\?\>\<~\{\}\s\[\]\(\)]|\?\s*\.(?=[^\d])|\s*\.\s*)+/g;
55
55
  var createGetter = function (search, isprop = true) {
56
56
  var [withContext, searchContext] = search;
57
57
  if (!searchContext) return function () { };
@@ -62,12 +62,12 @@ var createGetter = function (search, isprop = true) {
62
62
  context.split(/\?\s*\.(?=[^\d])/).forEach(function (search) {
63
63
  if (dist) {
64
64
  if (/[\=]/.test(dist)) dist = `(${dist})`;
65
- dist = `${dist}!==void 0&&${dist}!==null?${dist}.${search}:null`
65
+ dist = `${dist}!==void 0&&${dist}!==null?${dist}.${search}:''`
66
66
  } else {
67
67
  dist = search;
68
68
  }
69
69
  });
70
- return context.length > 1 ? `(${dist})` : context;
70
+ return dist.length > 1 ? `(${dist})` : context;
71
71
  });
72
72
  }
73
73
  if (isprop) {
@@ -723,7 +723,7 @@ function renderStructure(element, scope, parentScopes = []) {
723
723
  }
724
724
  if (!element.renderid) element.renderid = -1;
725
725
  else element.renderid = -2;
726
- // element.removeAttribute(name);
726
+ continue;
727
727
  }
728
728
  if (element.$struct) continue;
729
729
  var key = name.replace(/^(ng|v|.*?)\-|^[\:\_\.]|^v\-bind\:/i, "").toLowerCase();
@@ -337,11 +337,17 @@ function prepare(pgpath, ok) {
337
337
  }, state);
338
338
  }
339
339
  function create(pagepath, args, from, needroles) {
340
- var page_object = isObject(pagepath) ? pagepath : page_generators[getpgpath(pagepath)];
341
- if (!page_object) {
342
- throw new Error(`调用create前请确保prepare执行完毕:${pagepath}`);
340
+ if (typeof pagepath === 'string') {
341
+ var page_object = isObject(pagepath) ? pagepath : page_generators[getpgpath(pagepath)];
342
+ if (!page_object) {
343
+ throw new Error(`调用create前请确保prepare执行完毕:${pagepath}`);
344
+ }
345
+ var { pg, "with": _with_elements, state, onback: _pageback_listener, roles } = page_object;
346
+ }
347
+ else if (isFunction(pagepath)) {
348
+ var pg = pagepath;
349
+ var { with: _with_elements, state = {}, onback: _pageback_listener, roles } = pg;
343
350
  }
344
- var { pg, "with": _with_elements, state, onback: _pageback_listener, roles } = page_object;
345
351
  if (!checkroles(user.roles, roles) || !checkroles(user.roles, needroles)) {
346
352
  // 检查权限
347
353
  if (!user.isLogin && user.loginPath) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "efront",
3
- "version": "3.5.7",
3
+ "version": "3.5.11",
4
4
  "description": "一个开发工具,开放源代码,自带组件库和编译环境,可以用来开发web组件,web应用或nodejs模块,或做为已有代码的加密工具,也可以做为静态页面服务器或跨域中转服务器使用",
5
5
  "main": "public/efront.js",
6
6
  "directories": {