chore(reactivity): use warn (#5548)

This commit is contained in:
Code_xxmyyds
2022-04-13 17:21:38 +08:00
committed by GitHub
parent 2c09969b13
commit 711c826c68

View File

@@ -30,6 +30,7 @@ import {
makeMap
} from '@vue/shared'
import { isRef } from './ref'
import { warn } from './warning'
const isNonTrackableKeys = /*#__PURE__*/ makeMap(`__proto__,__v_isRef,__isVue`)
@@ -218,7 +219,7 @@ export const readonlyHandlers: ProxyHandler<object> = {
get: readonlyGet,
set(target, key) {
if (__DEV__) {
console.warn(
warn(
`Set operation on key "${String(key)}" failed: target is readonly.`,
target
)
@@ -227,7 +228,7 @@ export const readonlyHandlers: ProxyHandler<object> = {
},
deleteProperty(target, key) {
if (__DEV__) {
console.warn(
warn(
`Delete operation on key "${String(key)}" failed: target is readonly.`,
target
)