Skip to content

Commit

Permalink
docs: 回退部分改动
Browse files Browse the repository at this point in the history
  • Loading branch information
Blackgan3 committed Jan 10, 2025
1 parent 42c8194 commit 514ddb3
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
1 change: 0 additions & 1 deletion packages/core/src/core/mergeOptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ function extractObservers (options) {
}
})
if (observers) {
console.log('observers trigger in this ____')
Object.keys(observers).forEach(key => {
const callback = observers[key]
if (callback) {
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/platform/patch/getDefaultOptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ function transformProperties (properties) {
} else {
newFiled = Object.assign({}, rawFiled)
}
// const rawObserver = rawFiled?.observer
const rawObserver = rawFiled?.observer
newFiled.observer = function (value, oldValue) {
if (this.__mpxProxy) {
this[key] = value
this.__mpxProxy.propsUpdated()
}
// rawObserver && rawObserver.call(this, value, oldValue)
rawObserver && rawObserver.call(this, value, oldValue)
}
newProps[key] = newFiled
})
Expand Down
3 changes: 0 additions & 3 deletions packages/utils/src/object.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { type, noop, isObject } from './base'
import {markRaw} from "@mpxjs/core";

const hasOwnProperty = Object.prototype.hasOwnProperty

Expand Down Expand Up @@ -114,7 +113,6 @@ function diffAndCloneA (a, b) {
}
}

this.a = xxx
function proxy (target, source, keys, readonly, onConflict) {
if (!global.__mpx) {
console.warn('[Mpx utils warn]: Can not find "global.__mpx", "proxy" may encounter some potential problems!')
Expand All @@ -138,7 +136,6 @@ function proxy (target, source, keys, readonly, onConflict) {
: function (val) {
if (global.__mpx) {
const isRef = global.__mpx.isRef
if (pattern.test(key)) markRaw(value)
// 对reactive对象代理时不需要处理ref解包
if (!global.__mpx.isReactive(source)) {
const oldVal = source[key]
Expand Down

0 comments on commit 514ddb3

Please sign in to comment.