j-component 1.4.4 → 1.4.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "j-component",
3
- "version": "1.4.4",
3
+ "version": "1.4.5",
4
4
  "description": "miniprogram custom component framework",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -204,7 +204,7 @@ class VirtualNode {
204
204
  if (this.children && this.children.length) {
205
205
  if (this.type === CONSTANT.TYPE_FOR) {
206
206
  // 检查 for 语句
207
- const list = expr.calcExpression(statement.for, data)
207
+ const list = expr.calcExpression(statement.for, data) || []
208
208
  options.extra = options.extra || {}
209
209
 
210
210
  for (let i = 0, len = list.length; i < len; i++) {
package/src/tool/utils.js CHANGED
@@ -276,7 +276,7 @@ function getDom(exparserNode) {
276
276
  }
277
277
  dom.appendChild(fragment)
278
278
  }
279
-
279
+
280
280
  return dom
281
281
  }
282
282
 
package/CHANGELOG.md DELETED
@@ -1,82 +0,0 @@
1
- # 更新日志
2
-
3
- ## 1.4.4
4
-
5
- * 支持内置 behavior:wx://form-field-group
6
- ## 1.4.3
7
-
8
- * 支持根组件的 virtual host 模式
9
- ## 1.4.2
10
-
11
- * 支持 addEventListener/removeEventListener 接口
12
-
13
- ## 1.4.1
14
-
15
- * triggerLifeTime 接口支持参数
16
- * 支持 triggerPageLifeTime 接口
17
-
18
- ## 1.4.0
19
-
20
- * 更新基础库 exparser 到 2.15.0
21
- * 修复 observers 在组件 init 之前就会被调一次的问题
22
-
23
- ## 1.3.3
24
-
25
- * 修复 behavior 创建没有调用 callDefinitionFilter 的问题
26
-
27
- ## 1.3.2
28
-
29
- * 修复 properties 的 type 值转换问题
30
-
31
- ## 1.3.1
32
-
33
- * 随机 id 生成使用 Math.random
34
-
35
- ## 1.3.0
36
-
37
- * 更新基础库 exparser 到 2.11.2
38
- * 支持 virtual host 特性
39
-
40
- ## 1.2.3
41
-
42
- * toJSON 方法将会在 root 组件上返回 `<main/>`
43
- * 修复 wxml 属性简写导致 diff 后属性重复的问题
44
- * 修复部分场景 diff 失败问题
45
-
46
- ## 1.2.2
47
-
48
- * 支持 relations
49
- * 支持了 mutated 事件监听
50
- * 修复无法传递驼峰参数
51
- * 异步事件处理改为微任务
52
-
53
- ## 1.2.1
54
-
55
- * 支持 Component.prototype.toJSON
56
- * 添加 typescript 类型声明
57
-
58
- ## 1.2.0
59
-
60
- * 支持内置 behavior wx://component-export
61
- * 更新 exparser 版本为 2.10.4
62
-
63
- ## 1.1.11
64
-
65
- * 支持内置 behavior wx://form-field-button
66
-
67
- ## 1.1.10
68
-
69
- * 修复节点属性值为 falsely 值被强制转为空字符串的问题
70
-
71
- ## 1.1.9
72
-
73
- * dispatchEvent 接口支持触发自定义事件
74
-
75
- ## 1.1.8
76
-
77
- * 修复 diff 时没有处理父节点为根节点的情况
78
-
79
- ## 1.1.7
80
-
81
- * 废弃注册组件时对初始 data 进行深拷贝的逻辑。
82
- * 修复组件 dispatchEvent 方法中自定义事件传入 detail,组件函数接收不到 detail 的问题(#7)。