vue 2.7.2 → 2.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/vue.common.dev.js +54 -57
- package/dist/vue.common.prod.js +3 -3
- package/dist/vue.esm.browser.js +54 -57
- package/dist/vue.esm.browser.min.js +3 -3
- package/dist/vue.esm.js +55 -57
- package/dist/vue.js +55 -57
- package/dist/vue.min.js +3 -3
- package/dist/vue.runtime.common.dev.js +54 -57
- package/dist/vue.runtime.common.prod.js +3 -3
- package/dist/vue.runtime.esm.js +55 -57
- package/dist/vue.runtime.js +55 -57
- package/dist/vue.runtime.min.js +3 -3
- package/dist/vue.runtime.mjs +55 -57
- package/package.json +2 -2
- package/packages/compiler-sfc/dist/compiler-sfc.js +50 -53
- package/packages/compiler-sfc/package.json +1 -1
- package/src/core/observer/index.ts +54 -55
- package/src/shared/constants.ts +3 -1
- package/src/v3/reactivity/reactive.ts +13 -2
- package/src/v3/reactivity/ref.ts +6 -2
- package/types/jsx.d.ts +6 -0
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import { observe, Observer } from 'core/observer'
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
def,
|
|
4
|
+
isArray,
|
|
5
|
+
isPrimitive,
|
|
6
|
+
warn,
|
|
7
|
+
toRawType,
|
|
8
|
+
isServerRendering
|
|
9
|
+
} from 'core/util'
|
|
3
10
|
import type { Ref, UnwrapRefSimple, RawSymbol } from './ref'
|
|
4
11
|
|
|
5
12
|
export const enum ReactiveFlags {
|
|
@@ -67,7 +74,11 @@ function makeReactive(target: any, shallow: boolean) {
|
|
|
67
74
|
)
|
|
68
75
|
}
|
|
69
76
|
}
|
|
70
|
-
const ob = observe(
|
|
77
|
+
const ob = observe(
|
|
78
|
+
target,
|
|
79
|
+
shallow,
|
|
80
|
+
isServerRendering() /* ssr mock reactivity */
|
|
81
|
+
)
|
|
71
82
|
if (__DEV__ && !ob) {
|
|
72
83
|
if (target == null || isPrimitive(target)) {
|
|
73
84
|
warn(`value cannot be made reactive: ${String(target)}`)
|
package/src/v3/reactivity/ref.ts
CHANGED
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
} from './reactive'
|
|
7
7
|
import type { IfAny } from 'types/utils'
|
|
8
8
|
import Dep from 'core/observer/dep'
|
|
9
|
-
import { warn, isArray, def } from 'core/util'
|
|
9
|
+
import { warn, isArray, def, isServerRendering } from 'core/util'
|
|
10
10
|
import { TrackOpTypes, TriggerOpTypes } from './operations'
|
|
11
11
|
|
|
12
12
|
declare const RefSymbol: unique symbol
|
|
@@ -69,7 +69,11 @@ function createRef(rawValue: unknown, shallow: boolean) {
|
|
|
69
69
|
const ref: any = {}
|
|
70
70
|
def(ref, RefFlag, true)
|
|
71
71
|
def(ref, ReactiveFlags.IS_SHALLOW, true)
|
|
72
|
-
|
|
72
|
+
def(
|
|
73
|
+
ref,
|
|
74
|
+
'dep',
|
|
75
|
+
defineReactive(ref, 'value', rawValue, null, shallow, isServerRendering())
|
|
76
|
+
)
|
|
73
77
|
return ref
|
|
74
78
|
}
|
|
75
79
|
|
package/types/jsx.d.ts
CHANGED
|
@@ -1303,6 +1303,12 @@ type EventHandlers<E> = {
|
|
|
1303
1303
|
type ReservedProps = {
|
|
1304
1304
|
key?: string | number | symbol
|
|
1305
1305
|
ref?: VNodeData['ref']
|
|
1306
|
+
/**
|
|
1307
|
+
* @deprecated Old named slot syntax has been deprecated, use the new syntax
|
|
1308
|
+
* instead: `<template v-slot:name>`
|
|
1309
|
+
* https://v2.vuejs.org/v2/guide/components-slots.html#Named-Slots
|
|
1310
|
+
*/
|
|
1311
|
+
slot?: string
|
|
1306
1312
|
}
|
|
1307
1313
|
|
|
1308
1314
|
type ElementAttrs<T> = T & ReservedProps
|