@vue/compat 3.5.35 → 3.5.37
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/README.md +2 -2
- package/dist/vue.cjs.js +42 -13
- package/dist/vue.cjs.prod.js +39 -13
- package/dist/vue.esm-browser.js +39 -13
- package/dist/vue.esm-browser.prod.js +5 -5
- package/dist/vue.esm-bundler.js +39 -13
- package/dist/vue.global.js +39 -13
- package/dist/vue.global.prod.js +4 -4
- package/dist/vue.runtime.esm-browser.js +36 -11
- package/dist/vue.runtime.esm-browser.prod.js +3 -3
- package/dist/vue.runtime.esm-bundler.js +36 -11
- package/dist/vue.runtime.global.js +36 -11
- package/dist/vue.runtime.global.prod.js +3 -3
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -18,7 +18,7 @@ While we've tried hard to make the migration build mimic Vue 2 behavior as much
|
|
|
18
18
|
|
|
19
19
|
- Internet Explorer 11 support: [Vue 3 has officially dropped the plan for IE11 support](https://github.com/vuejs/rfcs/blob/master/active-rfcs/0038-vue3-ie11-support.md). If you still need to support IE11 or below, you will have to stay on Vue 2.
|
|
20
20
|
|
|
21
|
-
- Server-side rendering: the migration build can be used for SSR, but migrating a custom SSR setup is much more involved. The general idea is replacing `vue-server-renderer` with [`@vue/server-renderer`](https://github.com/vuejs/core/tree/main/packages/server-renderer). Vue 3 no longer provides a bundle renderer and it is recommended to use Vue 3 SSR with [Vite](https://
|
|
21
|
+
- Server-side rendering: the migration build can be used for SSR, but migrating a custom SSR setup is much more involved. The general idea is replacing `vue-server-renderer` with [`@vue/server-renderer`](https://github.com/vuejs/core/tree/main/packages/server-renderer). Vue 3 no longer provides a bundle renderer and it is recommended to use Vue 3 SSR with [Vite](https://vite.dev/guide/ssr). If you are using [Nuxt.js](https://nuxtjs.org/), it is probably better to wait for Nuxt 3.
|
|
22
22
|
|
|
23
23
|
### Expectations
|
|
24
24
|
|
|
@@ -43,7 +43,7 @@ The following workflow walks through the steps of migrating an actual Vue 2 app
|
|
|
43
43
|
1. Upgrade tooling if applicable.
|
|
44
44
|
- If using custom webpack setup: Upgrade `vue-loader` to `^16.0.0`.
|
|
45
45
|
- If using `vue-cli`: upgrade to the latest `@vue/cli-service` with `vue upgrade`
|
|
46
|
-
- (Alternative) migrate to [Vite](https://
|
|
46
|
+
- (Alternative) migrate to [Vite](https://vite.dev/) + [vite-plugin-vue2](https://github.com/underfin/vite-plugin-vue2). [[Example commit](https://github.com/vuejs/vue-hackernews-2.0/commit/565b948919eb58f22a32afca7e321b490cb3b074)]
|
|
47
47
|
|
|
48
48
|
2. In `package.json`, update `vue` to 3.1, install `@vue/compat` of the same version, and replace `vue-template-compiler` (if present) with `@vue/compiler-sfc`:
|
|
49
49
|
|
package/dist/vue.cjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compat v3.5.
|
|
2
|
+
* @vue/compat v3.5.37
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -2293,8 +2293,9 @@ function watch$1(source, cb, options = EMPTY_OBJ) {
|
|
|
2293
2293
|
if (once && cb) {
|
|
2294
2294
|
const _cb = cb;
|
|
2295
2295
|
cb = (...args) => {
|
|
2296
|
-
_cb(...args);
|
|
2296
|
+
const res = _cb(...args);
|
|
2297
2297
|
watchHandle();
|
|
2298
|
+
return res;
|
|
2298
2299
|
};
|
|
2299
2300
|
}
|
|
2300
2301
|
let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE;
|
|
@@ -2304,7 +2305,7 @@ function watch$1(source, cb, options = EMPTY_OBJ) {
|
|
|
2304
2305
|
}
|
|
2305
2306
|
if (cb) {
|
|
2306
2307
|
const newValue = effect.run();
|
|
2307
|
-
if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue))) {
|
|
2308
|
+
if (immediateFirstRun || deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue))) {
|
|
2308
2309
|
if (cleanup) {
|
|
2309
2310
|
cleanup();
|
|
2310
2311
|
}
|
|
@@ -5589,13 +5590,21 @@ function defineAsyncComponent(source) {
|
|
|
5589
5590
|
const loaded = ref(false);
|
|
5590
5591
|
const error = ref();
|
|
5591
5592
|
const delayed = ref(!!delay);
|
|
5593
|
+
let timeoutTimer;
|
|
5594
|
+
let delayTimer;
|
|
5595
|
+
onUnmounted(() => {
|
|
5596
|
+
if (timeoutTimer != null) clearTimeout(timeoutTimer);
|
|
5597
|
+
if (delayTimer != null) clearTimeout(delayTimer);
|
|
5598
|
+
});
|
|
5592
5599
|
if (delay) {
|
|
5593
|
-
setTimeout(() => {
|
|
5600
|
+
delayTimer = setTimeout(() => {
|
|
5601
|
+
if (instance.isUnmounted) return;
|
|
5594
5602
|
delayed.value = false;
|
|
5595
5603
|
}, delay);
|
|
5596
5604
|
}
|
|
5597
5605
|
if (timeout != null) {
|
|
5598
|
-
setTimeout(() => {
|
|
5606
|
+
timeoutTimer = setTimeout(() => {
|
|
5607
|
+
if (instance.isUnmounted) return;
|
|
5599
5608
|
if (!loaded.value && !error.value) {
|
|
5600
5609
|
const err = new Error(
|
|
5601
5610
|
`Async component timed out after ${timeout}ms.`
|
|
@@ -5606,11 +5615,16 @@ function defineAsyncComponent(source) {
|
|
|
5606
5615
|
}, timeout);
|
|
5607
5616
|
}
|
|
5608
5617
|
load().then(() => {
|
|
5618
|
+
if (instance.isUnmounted) return;
|
|
5609
5619
|
loaded.value = true;
|
|
5610
5620
|
if (instance.parent && isKeepAlive(instance.parent.vnode)) {
|
|
5611
5621
|
instance.parent.update();
|
|
5612
5622
|
}
|
|
5613
5623
|
}).catch((err) => {
|
|
5624
|
+
if (instance.isUnmounted) {
|
|
5625
|
+
pendingRequest = null;
|
|
5626
|
+
return;
|
|
5627
|
+
}
|
|
5614
5628
|
onError(err);
|
|
5615
5629
|
error.value = err;
|
|
5616
5630
|
});
|
|
@@ -7592,7 +7606,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
7592
7606
|
return vm;
|
|
7593
7607
|
}
|
|
7594
7608
|
}
|
|
7595
|
-
Vue.version = `2.6.14-compat:${"3.5.
|
|
7609
|
+
Vue.version = `2.6.14-compat:${"3.5.37"}`;
|
|
7596
7610
|
Vue.config = singletonApp.config;
|
|
7597
7611
|
Vue.use = (plugin, ...options) => {
|
|
7598
7612
|
if (plugin && isFunction(plugin.install)) {
|
|
@@ -7932,6 +7946,9 @@ function defineReactive(obj, key, val) {
|
|
|
7932
7946
|
try {
|
|
7933
7947
|
defineReactiveSimple(val, key2, val[key2]);
|
|
7934
7948
|
} catch (e) {
|
|
7949
|
+
{
|
|
7950
|
+
warn$1(`Failed making property "${key2}" reactive:`, e);
|
|
7951
|
+
}
|
|
7935
7952
|
}
|
|
7936
7953
|
});
|
|
7937
7954
|
}
|
|
@@ -8270,13 +8287,20 @@ function useModel(props, name, options = EMPTY_OBJ) {
|
|
|
8270
8287
|
return;
|
|
8271
8288
|
}
|
|
8272
8289
|
const rawProps = i.vnode.props;
|
|
8273
|
-
|
|
8274
|
-
(name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps))
|
|
8290
|
+
const hasVModel = !!(rawProps && // check if parent has passed v-model
|
|
8291
|
+
(name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps));
|
|
8292
|
+
if (!hasVModel) {
|
|
8275
8293
|
localValue = value;
|
|
8276
8294
|
trigger();
|
|
8277
8295
|
}
|
|
8278
8296
|
i.emit(`update:${name}`, emittedValue);
|
|
8279
|
-
if (hasChanged(value,
|
|
8297
|
+
if (hasChanged(value, prevSetValue) && (hasChanged(value, emittedValue) && !hasChanged(emittedValue, prevEmittedValue) || // #13524: browsers differ in when they flush microtasks between
|
|
8298
|
+
// event listeners. If a v-model listener emits an intermediate value
|
|
8299
|
+
// and a following listener restores the model to its previous prop
|
|
8300
|
+
// value before parent updates are flushed, the parent render can be
|
|
8301
|
+
// deduped as having no prop change. Force a local update so DOM state
|
|
8302
|
+
// such as an input's value is synchronized back to the current model.
|
|
8303
|
+
hasVModel && prevSetValue !== EMPTY_OBJ && !hasChanged(emittedValue, localValue))) {
|
|
8280
8304
|
trigger();
|
|
8281
8305
|
}
|
|
8282
8306
|
prevSetValue = value;
|
|
@@ -12724,7 +12748,7 @@ function isMemoSame(cached, memo) {
|
|
|
12724
12748
|
return true;
|
|
12725
12749
|
}
|
|
12726
12750
|
|
|
12727
|
-
const version = "3.5.
|
|
12751
|
+
const version = "3.5.37";
|
|
12728
12752
|
const warn = warn$1 ;
|
|
12729
12753
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
12730
12754
|
const devtools = devtools$1 ;
|
|
@@ -14229,7 +14253,8 @@ const TransitionGroupImpl = /* @__PURE__ */ decorate({
|
|
|
14229
14253
|
if (children) {
|
|
14230
14254
|
for (let i = 0; i < children.length; i++) {
|
|
14231
14255
|
const child = children[i];
|
|
14232
|
-
if (child.el && child.el instanceof Element
|
|
14256
|
+
if (child.el && child.el instanceof Element && // Hidden v-show nodes have no previous layout box to animate from.
|
|
14257
|
+
!child.el[vShowHidden]) {
|
|
14233
14258
|
prevChildren.push(child);
|
|
14234
14259
|
setTransitionHooks(
|
|
14235
14260
|
child,
|
|
@@ -17302,7 +17327,7 @@ const tokenizer = new Tokenizer(stack, {
|
|
|
17302
17327
|
}
|
|
17303
17328
|
},
|
|
17304
17329
|
oncdata(start, end) {
|
|
17305
|
-
if (stack[0].ns !== 0) {
|
|
17330
|
+
if ((stack[0] ? stack[0].ns : currentOptions.ns) !== 0) {
|
|
17306
17331
|
onText(getSlice(start, end), start, end);
|
|
17307
17332
|
} else {
|
|
17308
17333
|
emitError(1, start - 9);
|
|
@@ -18089,6 +18114,7 @@ function createTransformContext(root, {
|
|
|
18089
18114
|
imports: [],
|
|
18090
18115
|
cached: [],
|
|
18091
18116
|
constantCache: /* @__PURE__ */ new WeakMap(),
|
|
18117
|
+
vForMemoKeyedNodes: /* @__PURE__ */ new WeakSet(),
|
|
18092
18118
|
temps: 0,
|
|
18093
18119
|
identifiers: /* @__PURE__ */ Object.create(null),
|
|
18094
18120
|
scopes: {
|
|
@@ -19148,7 +19174,7 @@ const transformExpression = (node, context) => {
|
|
|
19148
19174
|
const exp = dir.exp;
|
|
19149
19175
|
const arg = dir.arg;
|
|
19150
19176
|
if (exp && exp.type === 4 && !(dir.name === "on" && arg) && // key has been processed in transformFor(vMemo + vFor)
|
|
19151
|
-
!(memo && arg && arg.type === 4 && arg.content === "key")) {
|
|
19177
|
+
!(memo && context.vForMemoKeyedNodes.has(node) && arg && arg.type === 4 && arg.content === "key")) {
|
|
19152
19178
|
dir.exp = processExpression(
|
|
19153
19179
|
exp,
|
|
19154
19180
|
context,
|
|
@@ -19605,6 +19631,9 @@ const transformFor = createStructuralDirectiveTransform(
|
|
|
19605
19631
|
keyProperty.value,
|
|
19606
19632
|
context
|
|
19607
19633
|
);
|
|
19634
|
+
if (memo) {
|
|
19635
|
+
context.vForMemoKeyedNodes.add(node);
|
|
19636
|
+
}
|
|
19608
19637
|
}
|
|
19609
19638
|
}
|
|
19610
19639
|
const isStableFragment = forNode.source.type === 4 && forNode.source.constType > 0;
|
package/dist/vue.cjs.prod.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compat v3.5.
|
|
2
|
+
* @vue/compat v3.5.37
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -2048,8 +2048,9 @@ function watch$1(source, cb, options = EMPTY_OBJ) {
|
|
|
2048
2048
|
if (once && cb) {
|
|
2049
2049
|
const _cb = cb;
|
|
2050
2050
|
cb = (...args) => {
|
|
2051
|
-
_cb(...args);
|
|
2051
|
+
const res = _cb(...args);
|
|
2052
2052
|
watchHandle();
|
|
2053
|
+
return res;
|
|
2053
2054
|
};
|
|
2054
2055
|
}
|
|
2055
2056
|
let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE;
|
|
@@ -2059,7 +2060,7 @@ function watch$1(source, cb, options = EMPTY_OBJ) {
|
|
|
2059
2060
|
}
|
|
2060
2061
|
if (cb) {
|
|
2061
2062
|
const newValue = effect.run();
|
|
2062
|
-
if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue))) {
|
|
2063
|
+
if (immediateFirstRun || deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue))) {
|
|
2063
2064
|
if (cleanup) {
|
|
2064
2065
|
cleanup();
|
|
2065
2066
|
}
|
|
@@ -4398,13 +4399,21 @@ function defineAsyncComponent(source) {
|
|
|
4398
4399
|
const loaded = ref(false);
|
|
4399
4400
|
const error = ref();
|
|
4400
4401
|
const delayed = ref(!!delay);
|
|
4402
|
+
let timeoutTimer;
|
|
4403
|
+
let delayTimer;
|
|
4404
|
+
onUnmounted(() => {
|
|
4405
|
+
if (timeoutTimer != null) clearTimeout(timeoutTimer);
|
|
4406
|
+
if (delayTimer != null) clearTimeout(delayTimer);
|
|
4407
|
+
});
|
|
4401
4408
|
if (delay) {
|
|
4402
|
-
setTimeout(() => {
|
|
4409
|
+
delayTimer = setTimeout(() => {
|
|
4410
|
+
if (instance.isUnmounted) return;
|
|
4403
4411
|
delayed.value = false;
|
|
4404
4412
|
}, delay);
|
|
4405
4413
|
}
|
|
4406
4414
|
if (timeout != null) {
|
|
4407
|
-
setTimeout(() => {
|
|
4415
|
+
timeoutTimer = setTimeout(() => {
|
|
4416
|
+
if (instance.isUnmounted) return;
|
|
4408
4417
|
if (!loaded.value && !error.value) {
|
|
4409
4418
|
const err = new Error(
|
|
4410
4419
|
`Async component timed out after ${timeout}ms.`
|
|
@@ -4415,11 +4424,16 @@ function defineAsyncComponent(source) {
|
|
|
4415
4424
|
}, timeout);
|
|
4416
4425
|
}
|
|
4417
4426
|
load().then(() => {
|
|
4427
|
+
if (instance.isUnmounted) return;
|
|
4418
4428
|
loaded.value = true;
|
|
4419
4429
|
if (instance.parent && isKeepAlive(instance.parent.vnode)) {
|
|
4420
4430
|
instance.parent.update();
|
|
4421
4431
|
}
|
|
4422
4432
|
}).catch((err) => {
|
|
4433
|
+
if (instance.isUnmounted) {
|
|
4434
|
+
pendingRequest = null;
|
|
4435
|
+
return;
|
|
4436
|
+
}
|
|
4423
4437
|
onError(err);
|
|
4424
4438
|
error.value = err;
|
|
4425
4439
|
});
|
|
@@ -6111,7 +6125,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
6111
6125
|
return vm;
|
|
6112
6126
|
}
|
|
6113
6127
|
}
|
|
6114
|
-
Vue.version = `2.6.14-compat:${"3.5.
|
|
6128
|
+
Vue.version = `2.6.14-compat:${"3.5.37"}`;
|
|
6115
6129
|
Vue.config = singletonApp.config;
|
|
6116
6130
|
Vue.use = (plugin, ...options) => {
|
|
6117
6131
|
if (plugin && isFunction(plugin.install)) {
|
|
@@ -6657,13 +6671,20 @@ function useModel(props, name, options = EMPTY_OBJ) {
|
|
|
6657
6671
|
return;
|
|
6658
6672
|
}
|
|
6659
6673
|
const rawProps = i.vnode.props;
|
|
6660
|
-
|
|
6661
|
-
(name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps))
|
|
6674
|
+
const hasVModel = !!(rawProps && // check if parent has passed v-model
|
|
6675
|
+
(name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps));
|
|
6676
|
+
if (!hasVModel) {
|
|
6662
6677
|
localValue = value;
|
|
6663
6678
|
trigger();
|
|
6664
6679
|
}
|
|
6665
6680
|
i.emit(`update:${name}`, emittedValue);
|
|
6666
|
-
if (hasChanged(value,
|
|
6681
|
+
if (hasChanged(value, prevSetValue) && (hasChanged(value, emittedValue) && !hasChanged(emittedValue, prevEmittedValue) || // #13524: browsers differ in when they flush microtasks between
|
|
6682
|
+
// event listeners. If a v-model listener emits an intermediate value
|
|
6683
|
+
// and a following listener restores the model to its previous prop
|
|
6684
|
+
// value before parent updates are flushed, the parent render can be
|
|
6685
|
+
// deduped as having no prop change. Force a local update so DOM state
|
|
6686
|
+
// such as an input's value is synchronized back to the current model.
|
|
6687
|
+
hasVModel && prevSetValue !== EMPTY_OBJ && !hasChanged(emittedValue, localValue))) {
|
|
6667
6688
|
trigger();
|
|
6668
6689
|
}
|
|
6669
6690
|
prevSetValue = value;
|
|
@@ -10258,7 +10279,7 @@ function isMemoSame(cached, memo) {
|
|
|
10258
10279
|
return true;
|
|
10259
10280
|
}
|
|
10260
10281
|
|
|
10261
|
-
const version = "3.5.
|
|
10282
|
+
const version = "3.5.37";
|
|
10262
10283
|
const warn$1 = NOOP;
|
|
10263
10284
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
10264
10285
|
const devtools = void 0;
|
|
@@ -11666,7 +11687,8 @@ const TransitionGroupImpl = /* @__PURE__ */ decorate({
|
|
|
11666
11687
|
if (children) {
|
|
11667
11688
|
for (let i = 0; i < children.length; i++) {
|
|
11668
11689
|
const child = children[i];
|
|
11669
|
-
if (child.el && child.el instanceof Element
|
|
11690
|
+
if (child.el && child.el instanceof Element && // Hidden v-show nodes have no previous layout box to animate from.
|
|
11691
|
+
!child.el[vShowHidden]) {
|
|
11670
11692
|
prevChildren.push(child);
|
|
11671
11693
|
setTransitionHooks(
|
|
11672
11694
|
child,
|
|
@@ -14608,7 +14630,7 @@ const tokenizer = new Tokenizer(stack, {
|
|
|
14608
14630
|
}
|
|
14609
14631
|
},
|
|
14610
14632
|
oncdata(start, end) {
|
|
14611
|
-
if (stack[0].ns !== 0) {
|
|
14633
|
+
if ((stack[0] ? stack[0].ns : currentOptions.ns) !== 0) {
|
|
14612
14634
|
onText(getSlice(start, end), start, end);
|
|
14613
14635
|
} else {
|
|
14614
14636
|
emitError(1, start - 9);
|
|
@@ -15358,6 +15380,7 @@ function createTransformContext(root, {
|
|
|
15358
15380
|
imports: [],
|
|
15359
15381
|
cached: [],
|
|
15360
15382
|
constantCache: /* @__PURE__ */ new WeakMap(),
|
|
15383
|
+
vForMemoKeyedNodes: /* @__PURE__ */ new WeakSet(),
|
|
15361
15384
|
temps: 0,
|
|
15362
15385
|
identifiers: /* @__PURE__ */ Object.create(null),
|
|
15363
15386
|
scopes: {
|
|
@@ -16382,7 +16405,7 @@ const transformExpression = (node, context) => {
|
|
|
16382
16405
|
const exp = dir.exp;
|
|
16383
16406
|
const arg = dir.arg;
|
|
16384
16407
|
if (exp && exp.type === 4 && !(dir.name === "on" && arg) && // key has been processed in transformFor(vMemo + vFor)
|
|
16385
|
-
!(memo && arg && arg.type === 4 && arg.content === "key")) {
|
|
16408
|
+
!(memo && context.vForMemoKeyedNodes.has(node) && arg && arg.type === 4 && arg.content === "key")) {
|
|
16386
16409
|
dir.exp = processExpression(
|
|
16387
16410
|
exp,
|
|
16388
16411
|
context,
|
|
@@ -16828,6 +16851,9 @@ const transformFor = createStructuralDirectiveTransform(
|
|
|
16828
16851
|
keyProperty.value,
|
|
16829
16852
|
context
|
|
16830
16853
|
);
|
|
16854
|
+
if (memo) {
|
|
16855
|
+
context.vForMemoKeyedNodes.add(node);
|
|
16856
|
+
}
|
|
16831
16857
|
}
|
|
16832
16858
|
}
|
|
16833
16859
|
const isStableFragment = forNode.source.type === 4 && forNode.source.constType > 0;
|
package/dist/vue.esm-browser.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compat v3.5.
|
|
2
|
+
* @vue/compat v3.5.37
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -2240,8 +2240,9 @@ function watch$1(source, cb, options = EMPTY_OBJ) {
|
|
|
2240
2240
|
if (once && cb) {
|
|
2241
2241
|
const _cb = cb;
|
|
2242
2242
|
cb = (...args) => {
|
|
2243
|
-
_cb(...args);
|
|
2243
|
+
const res = _cb(...args);
|
|
2244
2244
|
watchHandle();
|
|
2245
|
+
return res;
|
|
2245
2246
|
};
|
|
2246
2247
|
}
|
|
2247
2248
|
let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE;
|
|
@@ -2251,7 +2252,7 @@ function watch$1(source, cb, options = EMPTY_OBJ) {
|
|
|
2251
2252
|
}
|
|
2252
2253
|
if (cb) {
|
|
2253
2254
|
const newValue = effect.run();
|
|
2254
|
-
if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue))) {
|
|
2255
|
+
if (immediateFirstRun || deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue))) {
|
|
2255
2256
|
if (cleanup) {
|
|
2256
2257
|
cleanup();
|
|
2257
2258
|
}
|
|
@@ -5536,13 +5537,21 @@ function defineAsyncComponent(source) {
|
|
|
5536
5537
|
const loaded = ref(false);
|
|
5537
5538
|
const error = ref();
|
|
5538
5539
|
const delayed = ref(!!delay);
|
|
5540
|
+
let timeoutTimer;
|
|
5541
|
+
let delayTimer;
|
|
5542
|
+
onUnmounted(() => {
|
|
5543
|
+
if (timeoutTimer != null) clearTimeout(timeoutTimer);
|
|
5544
|
+
if (delayTimer != null) clearTimeout(delayTimer);
|
|
5545
|
+
});
|
|
5539
5546
|
if (delay) {
|
|
5540
|
-
setTimeout(() => {
|
|
5547
|
+
delayTimer = setTimeout(() => {
|
|
5548
|
+
if (instance.isUnmounted) return;
|
|
5541
5549
|
delayed.value = false;
|
|
5542
5550
|
}, delay);
|
|
5543
5551
|
}
|
|
5544
5552
|
if (timeout != null) {
|
|
5545
|
-
setTimeout(() => {
|
|
5553
|
+
timeoutTimer = setTimeout(() => {
|
|
5554
|
+
if (instance.isUnmounted) return;
|
|
5546
5555
|
if (!loaded.value && !error.value) {
|
|
5547
5556
|
const err = new Error(
|
|
5548
5557
|
`Async component timed out after ${timeout}ms.`
|
|
@@ -5553,11 +5562,16 @@ function defineAsyncComponent(source) {
|
|
|
5553
5562
|
}, timeout);
|
|
5554
5563
|
}
|
|
5555
5564
|
load().then(() => {
|
|
5565
|
+
if (instance.isUnmounted) return;
|
|
5556
5566
|
loaded.value = true;
|
|
5557
5567
|
if (instance.parent && isKeepAlive(instance.parent.vnode)) {
|
|
5558
5568
|
instance.parent.update();
|
|
5559
5569
|
}
|
|
5560
5570
|
}).catch((err) => {
|
|
5571
|
+
if (instance.isUnmounted) {
|
|
5572
|
+
pendingRequest = null;
|
|
5573
|
+
return;
|
|
5574
|
+
}
|
|
5561
5575
|
onError(err);
|
|
5562
5576
|
error.value = err;
|
|
5563
5577
|
});
|
|
@@ -7542,7 +7556,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
7542
7556
|
return vm;
|
|
7543
7557
|
}
|
|
7544
7558
|
}
|
|
7545
|
-
Vue.version = `2.6.14-compat:${"3.5.
|
|
7559
|
+
Vue.version = `2.6.14-compat:${"3.5.37"}`;
|
|
7546
7560
|
Vue.config = singletonApp.config;
|
|
7547
7561
|
Vue.use = (plugin, ...options) => {
|
|
7548
7562
|
if (plugin && isFunction(plugin.install)) {
|
|
@@ -7882,6 +7896,9 @@ function defineReactive(obj, key, val) {
|
|
|
7882
7896
|
try {
|
|
7883
7897
|
defineReactiveSimple(val, key2, val[key2]);
|
|
7884
7898
|
} catch (e) {
|
|
7899
|
+
{
|
|
7900
|
+
warn$1(`Failed making property "${key2}" reactive:`, e);
|
|
7901
|
+
}
|
|
7885
7902
|
}
|
|
7886
7903
|
});
|
|
7887
7904
|
}
|
|
@@ -8220,13 +8237,20 @@ function useModel(props, name, options = EMPTY_OBJ) {
|
|
|
8220
8237
|
return;
|
|
8221
8238
|
}
|
|
8222
8239
|
const rawProps = i.vnode.props;
|
|
8223
|
-
|
|
8224
|
-
(name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps))
|
|
8240
|
+
const hasVModel = !!(rawProps && // check if parent has passed v-model
|
|
8241
|
+
(name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps));
|
|
8242
|
+
if (!hasVModel) {
|
|
8225
8243
|
localValue = value;
|
|
8226
8244
|
trigger();
|
|
8227
8245
|
}
|
|
8228
8246
|
i.emit(`update:${name}`, emittedValue);
|
|
8229
|
-
if (hasChanged(value,
|
|
8247
|
+
if (hasChanged(value, prevSetValue) && (hasChanged(value, emittedValue) && !hasChanged(emittedValue, prevEmittedValue) || // #13524: browsers differ in when they flush microtasks between
|
|
8248
|
+
// event listeners. If a v-model listener emits an intermediate value
|
|
8249
|
+
// and a following listener restores the model to its previous prop
|
|
8250
|
+
// value before parent updates are flushed, the parent render can be
|
|
8251
|
+
// deduped as having no prop change. Force a local update so DOM state
|
|
8252
|
+
// such as an input's value is synchronized back to the current model.
|
|
8253
|
+
hasVModel && prevSetValue !== EMPTY_OBJ && !hasChanged(emittedValue, localValue))) {
|
|
8230
8254
|
trigger();
|
|
8231
8255
|
}
|
|
8232
8256
|
prevSetValue = value;
|
|
@@ -12674,7 +12698,7 @@ function isMemoSame(cached, memo) {
|
|
|
12674
12698
|
return true;
|
|
12675
12699
|
}
|
|
12676
12700
|
|
|
12677
|
-
const version = "3.5.
|
|
12701
|
+
const version = "3.5.37";
|
|
12678
12702
|
const warn = warn$1 ;
|
|
12679
12703
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
12680
12704
|
const devtools = devtools$1 ;
|
|
@@ -14247,7 +14271,8 @@ const TransitionGroupImpl = /* @__PURE__ */ decorate({
|
|
|
14247
14271
|
if (children) {
|
|
14248
14272
|
for (let i = 0; i < children.length; i++) {
|
|
14249
14273
|
const child = children[i];
|
|
14250
|
-
if (child.el && child.el instanceof Element
|
|
14274
|
+
if (child.el && child.el instanceof Element && // Hidden v-show nodes have no previous layout box to animate from.
|
|
14275
|
+
!child.el[vShowHidden]) {
|
|
14251
14276
|
prevChildren.push(child);
|
|
14252
14277
|
setTransitionHooks(
|
|
14253
14278
|
child,
|
|
@@ -16848,7 +16873,7 @@ const tokenizer = new Tokenizer(stack, {
|
|
|
16848
16873
|
}
|
|
16849
16874
|
},
|
|
16850
16875
|
oncdata(start, end) {
|
|
16851
|
-
if (stack[0].ns !== 0) {
|
|
16876
|
+
if ((stack[0] ? stack[0].ns : currentOptions.ns) !== 0) {
|
|
16852
16877
|
onText(getSlice(start, end), start, end);
|
|
16853
16878
|
} else {
|
|
16854
16879
|
emitError(1, start - 9);
|
|
@@ -17619,6 +17644,7 @@ function createTransformContext(root, {
|
|
|
17619
17644
|
imports: [],
|
|
17620
17645
|
cached: [],
|
|
17621
17646
|
constantCache: /* @__PURE__ */ new WeakMap(),
|
|
17647
|
+
vForMemoKeyedNodes: /* @__PURE__ */ new WeakSet(),
|
|
17622
17648
|
temps: 0,
|
|
17623
17649
|
identifiers: /* @__PURE__ */ Object.create(null),
|
|
17624
17650
|
scopes: {
|
|
@@ -18484,7 +18510,7 @@ const transformExpression = (node, context) => {
|
|
|
18484
18510
|
const exp = dir.exp;
|
|
18485
18511
|
const arg = dir.arg;
|
|
18486
18512
|
if (exp && exp.type === 4 && !(dir.name === "on" && arg) && // key has been processed in transformFor(vMemo + vFor)
|
|
18487
|
-
!(memo && arg && arg.type === 4 && arg.content === "key")) {
|
|
18513
|
+
!(memo && context.vForMemoKeyedNodes.has(node) && arg && arg.type === 4 && arg.content === "key")) {
|
|
18488
18514
|
dir.exp = processExpression(
|
|
18489
18515
|
exp,
|
|
18490
18516
|
context,
|