mirror of https://gitee.com/cf-fz/WebCAD.git
parent
5dec243f9f
commit
974136b833
@ -0,0 +1,17 @@
|
||||
|
||||
|
||||
export function DebugObject<T extends object>(object: T, listenKey: string): T
|
||||
{
|
||||
return new Proxy(object, {
|
||||
set: (target, key, value, receiver) =>
|
||||
{
|
||||
if (Reflect.get(target, key, receiver) !== value)
|
||||
{
|
||||
if (key === listenKey)
|
||||
{
|
||||
}
|
||||
}
|
||||
return Reflect.set(target, key, value, receiver);
|
||||
}
|
||||
});
|
||||
}
|
Loading…
Reference in new issue