efront 4.4.9 → 4.4.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.
@@ -17,6 +17,8 @@ const {
17
17
  /*1024 */PROPERTY,
18
18
  /*2048 */ELEMENT,
19
19
  createScoped,
20
+ createString,
21
+ relink,
20
22
  } = require("./common");
21
23
  var ignore = { test() { return false } };
22
24
  var property = new Program;
@@ -123,7 +125,7 @@ Html.prototype.createScoped = function (code) {
123
125
  var nn = c.next.next;
124
126
  if (!nn || nn.length > 0) return;
125
127
  if (nn.type === EXPRESS || nn.type === QUOTED) {
126
- vars[strings.decode(nn.text)] = true;
128
+ vars[strings.decode(createString([nn]))] = true;
127
129
  }
128
130
  }
129
131
  }
@@ -184,17 +186,22 @@ Html.prototype.createScoped = function (code) {
184
186
  var root = rootNodes[0];
185
187
  scoped.tagName = root.tagName;
186
188
  var attrs = rootNodes[0].attributes;
189
+ var attributes = [];
190
+ if (attrs) relink(attrs);
187
191
  if (attrs) for (var a of attrs) {
188
192
  if (a.type === PROPERTY) {
189
- a.name = a.text;
193
+ var at = { name: a.text };
194
+ attributes.push(at);
190
195
  var n = a.next;
191
196
  if (!n) continue;
192
197
  if (n.type !== STAMP || n.text !== '=') continue;
193
198
  var nn = n.next;
199
+ if (nn.type === PROPERTY) continue;
194
200
  if (!nn) continue;
195
- a.value = nn.text;
201
+ at.value = this.createString([nn]);
196
202
  }
197
203
  }
204
+ scoped.attributes = attributes;
198
205
  scoped.innerHTML = this.createString(rootNodes[0]);
199
206
  }
200
207
  else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "efront",
3
- "version": "4.4.9",
3
+ "version": "4.4.11",
4
4
  "description": "简化前端开发,优化web性能",
5
5
  "main": "public/efront.js",
6
6
  "directories": {