Match-id-a4d79ffb0f91ea94e459845a9b689e6a7125798f
This commit is contained in:
parent
8c13846d2d
commit
efdc5f5b0a
|
@ -1,4 +1,7 @@
|
||||||
## 0.0.34 (2023-01-11)
|
## 0.0.35 (2023-01-28)
|
||||||
|
- **core**: 在 cloneDeep JSXElement 的时候会出现死循环
|
||||||
|
|
||||||
|
## 0.0.34 (2023-01-19)
|
||||||
- **core**: #95 新增jsx接口
|
- **core**: #95 新增jsx接口
|
||||||
- **core**: #96 #97 fix testing-library 的UT错误
|
- **core**: #96 #97 fix testing-library 的UT错误
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"horizon"
|
"horizon"
|
||||||
],
|
],
|
||||||
"version": "0.0.34",
|
"version": "0.0.35",
|
||||||
"homepage": "",
|
"homepage": "",
|
||||||
"bugs": "",
|
"bugs": "",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
|
|
|
@ -37,11 +37,18 @@ export function JSXElement(type, key, ref, vNode, props, source: Source | null)
|
||||||
props: props,
|
props: props,
|
||||||
|
|
||||||
// 所属的class组件
|
// 所属的class组件
|
||||||
belongClassVNode: vNode,
|
belongClassVNode: null,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 在 cloneDeep JSXElement 的时候会出现死循环,需要设置belongClassVNode的enumerable为false
|
||||||
|
Object.defineProperty(ele, 'belongClassVNode', {
|
||||||
|
configurable: false,
|
||||||
|
enumerable: false,
|
||||||
|
value: vNode,
|
||||||
|
});
|
||||||
|
|
||||||
if (isDev) {
|
if (isDev) {
|
||||||
// 为了test判断两个JSXElement对象是否相等时忽略src属性,需要设置src的enumerable为false
|
// 为了test判断两个 JSXElement 对象是否相等时忽略src属性,需要设置src的enumerable为false
|
||||||
Object.defineProperty(ele, 'src', {
|
Object.defineProperty(ele, 'src', {
|
||||||
configurable: false,
|
configurable: false,
|
||||||
enumerable: false,
|
enumerable: false,
|
||||||
|
|
Loading…
Reference in New Issue