efront 3.6.0 → 3.7.5

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.
@@ -4,3 +4,5 @@
4
4
  share: options ::share-:opt?:path
5
5
  folder: options ::file-:opt:::path?:to
6
6
  cluster: options ::cluster-:opt?:id
7
+ private-list: options ::private
8
+ private-edit: options ::private-:key?:value
@@ -1,4 +1,3 @@
1
-
2
1
  <div>
3
2
  已登录到服务器,您可以进行如下操作
4
3
  </div>
@@ -7,6 +6,11 @@
7
6
  清理服务器缓存 <btn @click="run('clear-cache',this)">清理</btn>
8
7
  </padding>
9
8
  </block>
9
+ <block>
10
+ <padding>
11
+ 重启服务器 <btn @click="run('rehost',this)" type="danger">重启</btn>
12
+ </padding>
13
+ </block>
10
14
  <block>
11
15
  <padding>
12
16
  退出登录 <btn @click="logout()">退出</btn>
@@ -16,6 +16,9 @@ var layer = layer$glance({
16
16
  left: frame$left,
17
17
  top: frame$top
18
18
  });
19
+ on("append")(layer, function () {
20
+ frame$route.open();
21
+ });
19
22
  function main() {
20
23
  return layer;
21
24
  }
@@ -3,4 +3,5 @@
3
3
  短链接: /home/short
4
4
  WEB文件管理: /wow/root
5
5
  长连接管理: /link/list
6
+ 密钥管理: /token/list
6
7
  # 用户列表: /user/list
@@ -0,0 +1,10 @@
1
+ frame$edit.bind(null, "密钥", {
2
+ submit(a, fields) {
3
+ a = submit(fields, a);
4
+ return data.from("private-edit", {
5
+ key: encode62.timeencode(a.key),
6
+ value: encode62.timeencode(JSON.stringify(a)),
7
+ }).loading_promise;
8
+ },
9
+
10
+ });
@@ -0,0 +1,13 @@
1
+ frame$list.bind(null, "密钥管理", {
2
+ load() {
3
+ return data.from("private-list", a => JSAM.parse(encode62.timedecode(a)));
4
+ },
5
+ remove(o) {
6
+ return data.from("private-edit", { key: encode62.timeencode(o.key), value: encode62.timeencode("") }).loading_promise;
7
+ },
8
+ fields: refilm`
9
+ *键名/key 100
10
+ 显示名/name input/300
11
+ 密钥/value text/100
12
+ 备注/comment text/200
13
+ `}, "/token/edit");
@@ -1,6 +1,6 @@
1
1
  var d = 0b10000000, s = 0b00111111;
2
2
  function numberUTF8(t, dist = []) {
3
- if (t < 127) {//0b0xxxxxxx - 0b10xxxxxx
3
+ if (t < 128) {//0b0xxxxxxx - 0b10xxxxxx
4
4
  dist.push(0b00000000 | t)
5
5
  }
6
6
  else if (t < 2048) {// 0b110xxxxx 10xxxxxx
@@ -521,39 +521,63 @@ var createModule = function (exec, originNames, compiledNames, prebuilds = {}) {
521
521
  return exec.apply(_this, args);
522
522
  });
523
523
  };
524
- var bindthen = function (callback) {
525
- return function (data) {
526
- if (Promise && data instanceof Promise) {
527
- data.then(callback);
528
- } else {
529
- callback(data);
530
- }
531
- };
532
- };
533
-
534
524
 
535
525
  var init = function (name, then, prebuilds) {
536
- then = bindthen(then);
526
+ // then = bindthen(then);
537
527
  var key = keyprefix + name;
538
528
  if (prebuilds) {
539
529
  if (name in prebuilds) {
540
- return then(prebuilds[name]);
530
+ if (then) then(prebuilds[name]);
531
+ return prebuilds[name];
541
532
  }
542
533
  }
543
534
  if (hasOwnProperty.call(modules, name)) {
544
- then(modules[name]);
545
- return;
535
+ if (then) then(modules[name]);
536
+ return modules[name];
546
537
  }
547
538
  if (window[name] !== null && window[name] !== void 0 && !hasOwnProperty.call(forceRequest, name)) {
548
- then(modules[name] = window[name]);
549
- return;
539
+ modules[name] = window[name]
540
+ if (then) then(modules[name]);
541
+ return modules[name];
550
542
  }
543
+ var oks = [];
544
+ if (then) oks.push(then);
545
+ var ohs = [];
546
+ var res = {
547
+ oks,
548
+ ohs,
549
+ resolved: null,
550
+ errored: null,
551
+ then(ok, oh) {
552
+ if (ok) this.oks.push(ok);
553
+ if (oh) this.ohs.push(oh);
554
+ this.fire();
555
+ },
556
+ fire() {
557
+ if (this.resolved || this.errored) {
558
+ var oks = this.oks.splice(0, this.oks.length);
559
+ var ohs = this.ohs.splice(0, this.ohs.length);
560
+ if (this.resolved) for (var o of oks) o(this.resolved);
561
+ if (this.errored) for (var o of ohs) o(this.errored);
562
+ }
563
+ },
564
+ };
565
+ then = function (created) {
566
+ if (Promise && created instanceof Promise) return created.then(then, crack);
567
+ res.resolved = created;
568
+ res.fire();
569
+ };
570
+ var crack = function (error) {
571
+ res.errored = error;
572
+ res.fire();
573
+ };
551
574
  loadModule(name, function (error) {
552
575
  if (hasOwnProperty.call(modules, name)) {
553
576
  then(modules[name]);
554
577
  return;
555
578
  }
556
- if (error) return;
579
+ if (error) return crack(error);
580
+
557
581
  var module = loadedModules[key];
558
582
  var args = module.args || [];
559
583
 
@@ -593,6 +617,7 @@ var init = function (name, then, prebuilds) {
593
617
 
594
618
  then(created);
595
619
  }, prebuilds);
620
+ return res;
596
621
  };
597
622
  var forceRequest = {};
598
623
  var removeGlobalProperty = function (property) {
@@ -1,5 +1,7 @@
1
1
  "use strict";
2
2
  module.exports = encode62;
3
+ var encodeUTF8 = require("../basic/encodeUTF8");
4
+ var decodeUTF8 = require("../basic/decodeUTF8");
3
5
  var src = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
4
6
  var map = {};
5
7
  src.split("").forEach((s, i) => map[s] = i);
@@ -31,7 +33,8 @@ Object.assign(encode62, {
31
33
  var time_rest = string.slice(string.length - time_delta.toString(36).length, string.length);
32
34
  var time_start = parseInt((new Date() - parseInt(time_rest, 36)) / time_delta) * time_delta;
33
35
  var time_stamp = time_start + parseInt(time_rest, 36);
34
- return this.decode62(string.slice(0, string.length - time_delta.toString(36).length), time_stamp.toString(36));
36
+ string = this.decode62(string.slice(0, string.length - time_delta.toString(36).length), time_stamp.toString(36)).replace(/\.\.?/g, a => a === '.' ? "%" : ".");
37
+ return decodeURIComponent(string);
35
38
  },
36
39
  timeencode(string) {
37
40
  var { time_delta } = this;
@@ -40,6 +43,7 @@ Object.assign(encode62, {
40
43
  var time_rest = time_stamp % time_delta;
41
44
  var time_rest_str = time_rest.toString(36);
42
45
  var time_delta_str = time_delta.toString(36);
46
+ string = encodeURIComponent(string).replace(/\./g, '..').replace(/%/g, '.');
43
47
  return this.encode62(string, time_stamp.toString(36)) + repeat("0", time_delta_str.length - time_rest_str.length) + time_rest_str;
44
48
  },
45
49
  timeupdate(string) {
@@ -67,6 +71,20 @@ Object.assign(encode62, {
67
71
  });
68
72
  return result;
69
73
  },
74
+ encodestr(data, sign) {
75
+ if (!sign) return data;
76
+ var result = encodeUTF8(data);
77
+ sign = Buffer.from(sign);
78
+ var delta = 0, c = 0;
79
+ for (var cx = 0, dx = data.length; cx < dx; cx++) {
80
+ if (result[cx] < 128) result[cx] = result[cx] ^ sign[cx % sign.length];
81
+ else if (result[cx] < 192) {
82
+ var c = c << 8 | sign[(delta += 6) / 8 | 0];
83
+ result[cx] = result[cx] ^ (c >> 8 - delta % 8 & 0x3f);
84
+ }
85
+ }
86
+ return decodeUTF8(result);
87
+ },
70
88
  decode(data, sign) {
71
89
  if (!sign) return data;
72
90
  var result = Buffer.from(data);
@@ -99,5 +117,6 @@ Object.assign(encode62, {
99
117
  encode62.ab2c = encode62.ba2d = encode62.huan;
100
118
  encode62.db2a = encode62.ca2b = encode62.yuan;
101
119
  encode62.da2b = encode62.cb2a = encode62.suan;
120
+ encode62.decodestr = encode62.encodestr;
102
121
  encode62.encode = encode62.decode;
103
122
  encode62.decode62 = encode62.encode62;
@@ -0,0 +1,10 @@
1
+ <div head>
2
+ <span v-text="origin?'修改':'添加'"></span><span -text="title"></span>
3
+ </div>
4
+ <div body>
5
+ <field v-if="!f.readonly||!!data[f.key]" -repeat="f in fields" ng-src="[f,data]"></field>
6
+ </div>
7
+ <div foot>
8
+ <btn @click="remove()" class="white">取消</btn>
9
+ <button type="submit">保存</button>
10
+ </div>
@@ -0,0 +1,29 @@
1
+ function main(title, { submit }, { data: origin, fields, }) {
2
+ var page = view();
3
+ var item = Object.assign({}, origin);
4
+ page.innerHTML = edit;
5
+ drag.on(page.firstChild, page);
6
+ resize.on(page);
7
+ page.onback = function () {
8
+ return false;
9
+ };
10
+ renderWithDefaults(page, {
11
+ fields,
12
+ title,
13
+ origin: item,
14
+ data: item,
15
+ remove() {
16
+ remove(page);
17
+ },
18
+ });
19
+ on('submit')(page, async function (e) {
20
+ e.preventDefault();
21
+ await submit(item, fields);
22
+ dispatch(this, 'submited');
23
+ remove(this);
24
+ });
25
+ on("append")(page, lazy(function () {
26
+ page.querySelector("input").focus();
27
+ }));
28
+ return page;
29
+ }
@@ -0,0 +1,3 @@
1
+ &{
2
+ width: 600px;
3
+ }
@@ -0,0 +1,4 @@
1
+ <div>
2
+ <btn @click="add()">添加</btn>
3
+ </div>
4
+ <table -src="[fields,data]"></table>
@@ -0,0 +1,64 @@
1
+ function main(title, { fields, load, remove }, edit_ref) {
2
+ prepare(edit_ref);
3
+ var page = document.createElement("div");
4
+ var edit = function (o) {
5
+ zimoli.prepare(edit_ref, function () {
6
+ var p = popup(edit_ref, { fields, data: o })
7
+ on("submited")(p, function () {
8
+ console.log("submited")
9
+ page.$scope.load();
10
+ })
11
+ })
12
+ };
13
+ page.innerHTML = template;
14
+ renderWithDefaults(page, {
15
+ title,
16
+ load() {
17
+ this.data = load();
18
+ },
19
+ fields: fields.concat({
20
+ name: "操作",
21
+ options: [
22
+ {
23
+ name: "修改",
24
+ do(o) {
25
+ edit(o);
26
+ },
27
+ },
28
+ {
29
+ type: "danger",
30
+ name(o) {
31
+ return this.confirm === o ? "确认删除" : "删除";
32
+ },
33
+ type(o) {
34
+ return this.confirm === o ? "dark" : "danger";
35
+ },
36
+ confirm: false,
37
+ timer: 0,
38
+ async do(o) {
39
+ if (this.confirm !== o) {
40
+ this.confirm = o;
41
+ clearTimeout(this.timer);
42
+ var that = this;
43
+ this.timer = setTimeout(function () {
44
+ that.confirm = null;
45
+ render.refresh();
46
+ }, 2000);
47
+ return;
48
+ }
49
+ await remove(o);
50
+ page.$scope.load();
51
+ }
52
+ }
53
+ ]
54
+ }),
55
+ data: [],
56
+ add() {
57
+ edit();
58
+ },
59
+ });
60
+ on("append")(page, function () {
61
+ page.$scope.load();
62
+ });
63
+ return page;
64
+ }
@@ -0,0 +1,23 @@
1
+ btn {
2
+ padding: 0 16px;
3
+ }
4
+
5
+ & {
6
+ height: 100%;
7
+ overflow: auto;
8
+ }
9
+
10
+ table {
11
+
12
+ td {
13
+ >span {
14
+ white-space: normal;
15
+ word-break: break-all;
16
+ overflow: hidden;
17
+ display: -webkit-box;
18
+ -webkit-line-clamp: 2;
19
+ -webkit-box-orient: vertical;
20
+ text-overflow: ellipsis;
21
+ }
22
+ }
23
+ }
@@ -1,4 +1,5 @@
1
1
  & {
2
2
  border-top-width: 0;
3
3
  width: 100%;
4
+ overflow: auto;
4
5
  }
@@ -8,4 +8,7 @@ class LoadingArray extends Array {
8
8
  is_readonly = null;
9
9
  loading = null;
10
10
  loading_promise = null;
11
+ then(ok, oh) {
12
+ if (this.loading_promise) this.loading_promise.then(ok, oh);
13
+ }
11
14
  }
@@ -434,8 +434,6 @@ var privates = {
434
434
  let url = api.url;
435
435
  var base = api.base;
436
436
  if (base) url = base + api.path;
437
- console.log(url, base);
438
-
439
437
  if (this.validApi(api, params)) {
440
438
  params = this.repare(api, params);
441
439
  return this.loadIgnoreConfig(api.method, url, params, api);
@@ -23,8 +23,8 @@ var encode62 = {
23
23
  var time_rest = string.slice(string.length - time_delta.toString(36).length, string.length);
24
24
  var time_start = parseInt((new Date() - parseInt(time_rest, 36)) / time_delta) * time_delta;
25
25
  var time_stamp = time_start + parseInt(time_rest, 36);
26
-
27
- return this.encode(string.slice(0, string.length - time_delta.toString(36).length), time_stamp.toString(36));
26
+ string = this.encode(string.slice(0, string.length - time_delta.toString(36).length), time_stamp.toString(36)).replace(/\.\.?/g, a => a === '.' ? "%" : ".");
27
+ return decodeURIComponent(string);
28
28
  },
29
29
  timeencode(string) {
30
30
  var { time_delta } = this;
@@ -33,6 +33,7 @@ var encode62 = {
33
33
  var time_rest = time_stamp % time_delta;
34
34
  var time_rest_str = time_rest.toString(36);
35
35
  var time_delta_str = time_delta.toString(36);
36
+ string = encodeURIComponent(string).replace(/\./g, '..').replace(/%/g, '.');
36
37
  return this.encode(string, time_stamp.toString(36)) + repeat("0", time_delta_str.length - time_rest_str.length) + time_rest_str;
37
38
  },
38
39
  timeupdate(string) {
@@ -90,7 +90,7 @@ var initialComment = function (renders, type, expression) {
90
90
  var parseRepeat = function (expression) {
91
91
  var reg =
92
92
  // /////////////////////////////////////////// i // r ///////////////////////// o ///// a ///////////////////// t /////
93
- /^(?:let\b|var\b|const\b)?\s*(?:[\(\{\[]\s*)?(.+?)((?:\s*,\s*.+?)*)?(?:\s*[\)\}\]]\s*|\s+)(in|of)\s+(.+?)(\s+?:track\s*by\s+(.+?))?$/i;
93
+ /^(?:let\b|var\b|const\b)?\s*(?:[\(\{\[]\s*)?(.+?)((?:\s*,\s*.+?)*)?(?:\s*[\)\}\]]\s*|\s+)(in|of)\s+(.+?)(?:\s+track\s*by\s+(.+?))?$/i;
94
94
  var res = reg.exec(expression);
95
95
  if (!res) return res;
96
96
  var [_, i, k, r, s, t] = res;
@@ -125,7 +125,7 @@ var createRepeat = function (search, id = 0) {
125
125
  var [context, expression] = search;
126
126
  var res = parseRepeat(expression);
127
127
  if (!res) throw new Error(`不能识别循环表达式: ${expression} `);
128
- var { keyName, itemName, indexName, srcName } = res;
128
+ var { keyName, itemName, indexName, srcName, trackBy } = res;
129
129
  // 懒渲染
130
130
  var getter = createGetter([context, srcName]).bind(this);
131
131
  var element = this, clonedElements = [], savedValue, savedOrigin;
@@ -151,17 +151,26 @@ var createRepeat = function (search, id = 0) {
151
151
  var clonedElements1 = Object.create(null);
152
152
  var cloned = keys.map(function (key, cx) {
153
153
  var k = isArrayResult ? cx : key;
154
- var c = changes[k];
155
- if (clonedElements[k]) if (!c || !isObject(c.previous) && !isObject(c.current)) return clonedElements1[k] = clonedElements[k];
156
- var clone = element.cloneNode();
157
- clone.innerHTML = element.innerHTML;
158
- clone.renderid = id;
159
- clone.$parentScopes = $parentScopes;
160
154
  var $scope = {
161
155
  [keyName || '$key']: k,
162
156
  [itemName || '$item']: result[k],
163
157
  [indexName || '$index']: cx
164
158
  };
159
+ if (trackBy) {
160
+ k = seek($scope, trackBy);
161
+ if (clonedElements[k]) {
162
+ clonedElements[k].$scope = $scope;
163
+ return clonedElements1[k] = clonedElements[k];
164
+ }
165
+ }
166
+ else {
167
+ var c = changes[k];
168
+ if (clonedElements[k]) if (!c || !isObject(c.previous) && !isObject(c.current)) return clonedElements1[k] = clonedElements[k];
169
+ }
170
+ var clone = element.cloneNode();
171
+ clone.innerHTML = element.innerHTML;
172
+ clone.renderid = id;
173
+ clone.$parentScopes = $parentScopes;
165
174
  clone.$scope = $scope;
166
175
  clone.$parentScopes = $parentScopes;
167
176
  clone.$struct = $struct;
@@ -1,6 +1,7 @@
1
1
  <thead>
2
2
  <tr>
3
- <td -repeat="f in fields"><i -if="f.icon" -class="f.icon"></i></span><span -if="f.name" -html="f.name"></span>
3
+ <td -repeat="f in fields track by f.id" :style="{width:f.width}"><i -if="f.icon"
4
+ -class="f.icon"></i></span><span -if="f.name" -html="f.name"></span>
4
5
  </td>
5
6
  </tr>
6
7
  </thead>
@@ -8,7 +9,8 @@
8
9
  <tr>
9
10
  <td -repeat="f in fields">
10
11
  <span -if="f.key" -text="d[f.key]"></span>
11
- <a on-click="o.do(d)" -if="f.options" _type="o.type" -repeat="o in f.options">
12
+ <a on-click="o.do(d)" -if="f.options" _type="o.type instanceof Function?o.type(d):o.type"
13
+ -repeat="o in f.options">
12
14
  <span -text="o.name instanceof Function?o.name(d):o.name"></span>
13
15
  </a>
14
16
  </td>
@@ -91,11 +91,11 @@ var adaptTarget = function (event) {
91
91
  }
92
92
  if (target) target = getFirstSingleColCell(this, target.colend);
93
93
  if (target) {
94
- if (position.right >= getSelection(this).right - 7) {
94
+ if (position.right >= getScreenPosition(this).right - 7) {
95
95
  target = this;
96
96
  return;
97
97
  }
98
- css(this, { 'cursor': 'e-resize' });
98
+ css(document.body, { 'cursor': 'col-resize' });
99
99
  result = {
100
100
  target,
101
101
  restX: event.clientX - target.offsetWidth
@@ -106,18 +106,66 @@ var adaptTarget = function (event) {
106
106
  }
107
107
  if (!result) {
108
108
  this.resizing = false;
109
- css(this, { 'cursor': 'default' });
109
+ css(document.body, { 'cursor': '' });
110
110
  }
111
111
  };
112
112
  var tdElementReg = /^t[hd]$/i;
113
113
  var trElementReg = /^tr$/i;
114
+ var id = 0;
115
+ function enrichField(f) {
116
+ if (!f.id) f.id = ++id;
117
+ if (f.width) return;
118
+ var width;
119
+ if (f.size) {
120
+ width = f.size;
121
+ if (width < 40) width = width * 16;
122
+ }
123
+ else switch (f.type) {
124
+ case "text":
125
+ width = 30;
126
+ break;
127
+ case "input":
128
+ width = 200;
129
+ break;
130
+ case "date":
131
+ width = 180;
132
+ case "datetime":
133
+ width = 200;
134
+ break;
135
+ case "time":
136
+ width = 120;
137
+ break;
138
+ default:
139
+ if (f.options) {
140
+ width = f.options.map(o => o.name instanceof Function ? o.name() : o.name).join(" ").length * 20;
141
+ } else {
142
+ width = String(f.name || f.key).length * 16;
143
+ }
144
+ }
145
+ if (width > 600) width = 600;
146
+ f.width = width + 60;
147
+ }
148
+
114
149
 
115
150
  function table(elem) {
116
151
  var tableElement = isElement(elem) ? elem : document.createElement("table");
117
152
  var activeCols = [];
118
- onmousemove(tableElement, adaptTarget);
153
+ var adaptCursor = adaptTarget.bind(tableElement);
154
+ var off;
155
+ tableElement.init = function () {
156
+ off = on("mousemove")(window, adaptCursor);
157
+ };
158
+ tableElement.dispose = tableElement.destroy = function () {
159
+ off();
160
+ };
161
+ on("append")(tableElement, tableElement.init);
162
+ on("remove")(tableElement, tableElement.destroy);
163
+ if (isMounted(tableElement)) tableElement.init();
164
+
119
165
  moveupon(tableElement, {
120
- start() { },
166
+ start(event) {
167
+ if (this.resizing) event.preventDefault();
168
+ },
121
169
  move: resizeTarget,
122
170
  });
123
171
  onmousemove(tableElement, function (event) {
@@ -142,7 +190,7 @@ function table(elem) {
142
190
  removeClass(td, "y-ing");
143
191
  });
144
192
  });
145
- var table = tableElement.hasAttribute("ng-src") || tableElement.hasAttribute("src") ? list(tableElement) : tableElement;
193
+ var table = tableElement;
146
194
  var thead;
147
195
  var cellMatchManager = function (element) {
148
196
  if (!thead) [thead] = table.getElementsByTagName("thead");
@@ -162,10 +210,14 @@ function table(elem) {
162
210
  care(table, function ([fields, data]) {
163
211
  thead = null;
164
212
  this.innerHTML = template;
213
+ fields.forEach(enrichField);
165
214
  render(this, {
166
215
  fields,
167
216
  tbody: list,
168
217
  data,
218
+ setWidth(target, f) {
219
+ css(target, { width: f.width });
220
+ },
169
221
  a: button,
170
222
  }, this.$parentScopes.concat(this.$scope));
171
223
  })
@@ -1,4 +1,5 @@
1
1
  &[dragchildren] {
2
+
2
3
  >thead,
3
4
  >tbody,
4
5
  & {
@@ -74,8 +75,9 @@ table,
74
75
  line-height: 32px;
75
76
  height: 100%;
76
77
  min-height: 30px;
77
-
78
+ user-select: auto;
78
79
  display: table-row-group;
80
+ overflow: auto;
79
81
 
80
82
  >tr {
81
83
 
@@ -16,6 +16,5 @@
16
16
  model>& {
17
17
  width: 100% !important;
18
18
  display: block;
19
- margin: 10px 0;
20
19
  height: 120px;
21
20
  }
@@ -249,11 +249,33 @@ function prepare(pgpath, ok) {
249
249
  return _with_elements;
250
250
  };
251
251
  state.path = function (url) {
252
- if (isString(url) && /^[^\\\/]/.test(url)) {
252
+ if (/^\.+\//.test(url)) {
253
253
  url = pgpath.replace(/[^\/]*$/, url);
254
254
  }
255
+ if (isString(url) && /[\\\/\.]/.test(url)) {
256
+ url = url.replace(/^\.[\\\/]/, '');
257
+ var ps = url.split(/[\\\/]/);
258
+ var ds = [];
259
+ for (var p of ps) {
260
+ if (p === "..") {
261
+ ds.pop();
262
+ }
263
+ else if (p !== ".") {
264
+ ds.push(p);
265
+ }
266
+ }
267
+ url = "/" + ds.join('/').replace(/^\//, '');
268
+ }
255
269
  return url;
256
- }
270
+ };
271
+ state.popup = function (a) {
272
+ a = state.path(a);
273
+ return popup.apply(this, [a].concat([].slice.call(arguments, 1)));
274
+ };
275
+ state.init = function (a) {
276
+ a = state.path(a);
277
+ return init.apply(this, [a].concat([].slice.call(arguments, 1)));
278
+ };
257
279
  state.go = function (url, args, _history_name) {
258
280
  // if (arguments.length === 1 && isFinite(url)) return window_history.go(url | 0);
259
281
  var to = function (_url, args, _history_name) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "efront",
3
- "version": "3.6.0",
3
+ "version": "3.7.5",
4
4
  "description": "一个开发工具,开放源代码,自带组件库和编译环境,可以用来开发web组件,web应用或nodejs模块,或做为已有代码的加密工具,也可以做为静态页面服务器或跨域中转服务器使用",
5
5
  "main": "public/efront.js",
6
6
  "directories": {