diff --git a/packages/shared/src/index.ts b/packages/shared/src/index.ts index c61acce..480fe58 100644 --- a/packages/shared/src/index.ts +++ b/packages/shared/src/index.ts @@ -5,9 +5,7 @@ export const isObject = (val: unknown) => val !== null && typeof val === 'object' /** - * 对比两个数据是否发生改变 - * @param value - * @param oldValue + * 对比两个数据是否发生改变, 如果发生改变则返回true */ export const hasChanged = (value: any, oldValue: any): boolean => !Object.is(value, oldValue) diff --git a/packages/vue/examples/reactivity/ref-shallow.html b/packages/vue/examples/reactivity/ref-shallow.html new file mode 100644 index 0000000..f6fbb38 --- /dev/null +++ b/packages/vue/examples/reactivity/ref-shallow.html @@ -0,0 +1,21 @@ + +
+ + +