Match-id-9ffb3423d9cbe56ad4f381a2e50b90f7caa403ff
This commit is contained in:
parent
537c48e656
commit
a4671aa06f
|
@ -1,3 +1,6 @@
|
||||||
|
## 0.0.50 (2023-05-23)
|
||||||
|
- **core**: 解决IE11不兼容Symbol问题
|
||||||
|
|
||||||
## 0.0.49 (2023-05-19)
|
## 0.0.49 (2023-05-19)
|
||||||
- **core**: 解决当组件被销毁,业务若异步(定时器)调用setState修改状态,可能出现路径错误问题。
|
- **core**: 解决当组件被销毁,业务若异步(定时器)调用setState修改状态,可能出现路径错误问题。
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"horizon"
|
"horizon"
|
||||||
],
|
],
|
||||||
"version": "0.0.49",
|
"version": "0.0.50",
|
||||||
"homepage": "",
|
"homepage": "",
|
||||||
"bugs": "",
|
"bugs": "",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
|
|
|
@ -40,6 +40,14 @@ export function JSXElement(type, key, ref, vNode, props, source: Source | null)
|
||||||
// 所属的class组件,clonedeep jsxElement时需要防止无限循环
|
// 所属的class组件,clonedeep jsxElement时需要防止无限循环
|
||||||
[BELONG_CLASS_VNODE_KEY]: vNode,
|
[BELONG_CLASS_VNODE_KEY]: vNode,
|
||||||
};
|
};
|
||||||
|
// 兼容IE11不支持Symbol
|
||||||
|
if (typeof BELONG_CLASS_VNODE_KEY === 'string') {
|
||||||
|
Object.defineProperty(ele, BELONG_CLASS_VNODE_KEY, {
|
||||||
|
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', {
|
||||||
|
|
|
@ -38,7 +38,7 @@ import type { Hook } from '../hooks/HookType';
|
||||||
import { InitFlag } from './VNodeFlags';
|
import { InitFlag } from './VNodeFlags';
|
||||||
import { Observer } from '../../horizonx/proxy/Observer';
|
import { Observer } from '../../horizonx/proxy/Observer';
|
||||||
|
|
||||||
export const BELONG_CLASS_VNODE_KEY = Symbol('belongClassVNode');
|
export const BELONG_CLASS_VNODE_KEY = typeof Symbol === 'function' ? Symbol('belongClassVNode') : 'belongClassVNode';
|
||||||
|
|
||||||
export class VNode {
|
export class VNode {
|
||||||
tag: VNodeTag;
|
tag: VNodeTag;
|
||||||
|
|
Loading…
Reference in New Issue