vue 3.3.0-alpha.6 → 3.3.0-alpha.7
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.esm-browser.js +41 -6
- package/dist/vue.esm-browser.prod.js +1 -1
- package/dist/vue.global.js +40 -5
- package/dist/vue.global.prod.js +1 -1
- package/dist/vue.runtime.esm-browser.js +39 -6
- package/dist/vue.runtime.esm-browser.prod.js +1 -1
- package/dist/vue.runtime.global.js +40 -5
- package/dist/vue.runtime.global.prod.js +1 -1
- package/package.json +6 -6
package/dist/vue.esm-browser.js
CHANGED
|
@@ -1329,6 +1329,9 @@ function triggerRef(ref2) {
|
|
|
1329
1329
|
function unref(ref2) {
|
|
1330
1330
|
return isRef(ref2) ? ref2.value : ref2;
|
|
1331
1331
|
}
|
|
1332
|
+
function toValue(source) {
|
|
1333
|
+
return isFunction(source) ? source() : unref(source);
|
|
1334
|
+
}
|
|
1332
1335
|
const shallowUnwrapHandlers = {
|
|
1333
1336
|
get: (target, key, receiver) => unref(Reflect.get(target, key, receiver)),
|
|
1334
1337
|
set: (target, key, value, receiver) => {
|
|
@@ -1371,7 +1374,7 @@ function toRefs(object) {
|
|
|
1371
1374
|
}
|
|
1372
1375
|
const ret = isArray(object) ? new Array(object.length) : {};
|
|
1373
1376
|
for (const key in object) {
|
|
1374
|
-
ret[key] =
|
|
1377
|
+
ret[key] = propertyToRef(object, key);
|
|
1375
1378
|
}
|
|
1376
1379
|
return ret;
|
|
1377
1380
|
}
|
|
@@ -1393,9 +1396,34 @@ class ObjectRefImpl {
|
|
|
1393
1396
|
return getDepFromReactive(toRaw(this._object), this._key);
|
|
1394
1397
|
}
|
|
1395
1398
|
}
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
+
class GetterRefImpl {
|
|
1400
|
+
constructor(_getter) {
|
|
1401
|
+
this._getter = _getter;
|
|
1402
|
+
this.__v_isRef = true;
|
|
1403
|
+
this.__v_isReadonly = true;
|
|
1404
|
+
}
|
|
1405
|
+
get value() {
|
|
1406
|
+
return this._getter();
|
|
1407
|
+
}
|
|
1408
|
+
}
|
|
1409
|
+
function toRef(source, key, defaultValue) {
|
|
1410
|
+
if (isRef(source)) {
|
|
1411
|
+
return source;
|
|
1412
|
+
} else if (isFunction(source)) {
|
|
1413
|
+
return new GetterRefImpl(source);
|
|
1414
|
+
} else if (isObject(source) && arguments.length > 1) {
|
|
1415
|
+
return propertyToRef(source, key, defaultValue);
|
|
1416
|
+
} else {
|
|
1417
|
+
return ref(source);
|
|
1418
|
+
}
|
|
1419
|
+
}
|
|
1420
|
+
function propertyToRef(source, key, defaultValue) {
|
|
1421
|
+
const val = source[key];
|
|
1422
|
+
return isRef(val) ? val : new ObjectRefImpl(
|
|
1423
|
+
source,
|
|
1424
|
+
key,
|
|
1425
|
+
defaultValue
|
|
1426
|
+
);
|
|
1399
1427
|
}
|
|
1400
1428
|
|
|
1401
1429
|
class ComputedRefImpl {
|
|
@@ -8650,6 +8678,11 @@ function defineOptions(options) {
|
|
|
8650
8678
|
warnRuntimeUsage(`defineOptions`);
|
|
8651
8679
|
}
|
|
8652
8680
|
}
|
|
8681
|
+
function defineSlots() {
|
|
8682
|
+
{
|
|
8683
|
+
warnRuntimeUsage(`defineSlots`);
|
|
8684
|
+
}
|
|
8685
|
+
}
|
|
8653
8686
|
function withDefaults(props, defaults) {
|
|
8654
8687
|
{
|
|
8655
8688
|
warnRuntimeUsage(`withDefaults`);
|
|
@@ -8960,7 +8993,7 @@ function isMemoSame(cached, memo) {
|
|
|
8960
8993
|
return true;
|
|
8961
8994
|
}
|
|
8962
8995
|
|
|
8963
|
-
const version = "3.3.0-alpha.
|
|
8996
|
+
const version = "3.3.0-alpha.7";
|
|
8964
8997
|
const ssrUtils = null;
|
|
8965
8998
|
const resolveFilter = null;
|
|
8966
8999
|
const compatUtils = null;
|
|
@@ -10475,6 +10508,7 @@ var runtimeDom = /*#__PURE__*/Object.freeze({
|
|
|
10475
10508
|
defineOptions: defineOptions,
|
|
10476
10509
|
defineProps: defineProps,
|
|
10477
10510
|
defineSSRCustomElement: defineSSRCustomElement,
|
|
10511
|
+
defineSlots: defineSlots,
|
|
10478
10512
|
get devtools () { return devtools; },
|
|
10479
10513
|
effect: effect,
|
|
10480
10514
|
effectScope: effectScope,
|
|
@@ -10549,6 +10583,7 @@ var runtimeDom = /*#__PURE__*/Object.freeze({
|
|
|
10549
10583
|
toRaw: toRaw,
|
|
10550
10584
|
toRef: toRef,
|
|
10551
10585
|
toRefs: toRefs,
|
|
10586
|
+
toValue: toValue,
|
|
10552
10587
|
transformVNodeArgs: transformVNodeArgs,
|
|
10553
10588
|
triggerRef: triggerRef,
|
|
10554
10589
|
unref: unref,
|
|
@@ -15216,4 +15251,4 @@ ${codeFrame}` : message);
|
|
|
15216
15251
|
}
|
|
15217
15252
|
registerRuntimeCompiler(compileToFunction);
|
|
15218
15253
|
|
|
15219
|
-
export { BaseTransition, BaseTransitionPropsValidators, Comment, EffectScope, Fragment, KeepAlive, ReactiveEffect, Static, Suspense, Teleport, Text, Transition, TransitionGroup, VueElement, assertNumber, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, cloneVNode, compatUtils, compileToFunction as compile, computed, createApp, createBlock, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createPropsRestProxy, createRenderer, createSSRApp, createSlots, createStaticVNode, createTextVNode, createVNode, customRef, defineAsyncComponent, defineComponent, defineCustomElement, defineEmits, defineExpose, defineOptions, defineProps, defineSSRCustomElement, devtools, effect, effectScope, getCurrentInstance, getCurrentScope, getTransitionRawChildren, guardReactiveProps, h, handleError, hydrate, initCustomFormatter, initDirectivesForSSR, inject, isMemoSame, isProxy, isReactive, isReadonly, isRef, isRuntimeOnly, isShallow, isVNode, markRaw, mergeDefaults, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onScopeDispose, onServerPrefetch, onUnmounted, onUpdated, openBlock, popScopeId, provide, proxyRefs, pushScopeId, queuePostFlushCb, reactive, readonly, ref, registerRuntimeCompiler, render, renderList, renderSlot, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter, resolveTransitionHooks, setBlockTracking, setDevtoolsHook, setTransitionHooks, shallowReactive, shallowReadonly, shallowRef, ssrContextKey, ssrUtils, stop, toDisplayString, toHandlerKey, toHandlers, toRaw, toRef, toRefs, transformVNodeArgs, triggerRef, unref, useAttrs, useCssModule, useCssVars, useSSRContext, useSlots, useTransitionState, vModelCheckbox, vModelDynamic, vModelRadio, vModelSelect, vModelText, vShow, version, warn, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withKeys, withMemo, withModifiers, withScopeId };
|
|
15254
|
+
export { BaseTransition, BaseTransitionPropsValidators, Comment, EffectScope, Fragment, KeepAlive, ReactiveEffect, Static, Suspense, Teleport, Text, Transition, TransitionGroup, VueElement, assertNumber, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, cloneVNode, compatUtils, compileToFunction as compile, computed, createApp, createBlock, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createPropsRestProxy, createRenderer, createSSRApp, createSlots, createStaticVNode, createTextVNode, createVNode, customRef, defineAsyncComponent, defineComponent, defineCustomElement, defineEmits, defineExpose, defineOptions, defineProps, defineSSRCustomElement, defineSlots, devtools, effect, effectScope, getCurrentInstance, getCurrentScope, getTransitionRawChildren, guardReactiveProps, h, handleError, hydrate, initCustomFormatter, initDirectivesForSSR, inject, isMemoSame, isProxy, isReactive, isReadonly, isRef, isRuntimeOnly, isShallow, isVNode, markRaw, mergeDefaults, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onScopeDispose, onServerPrefetch, onUnmounted, onUpdated, openBlock, popScopeId, provide, proxyRefs, pushScopeId, queuePostFlushCb, reactive, readonly, ref, registerRuntimeCompiler, render, renderList, renderSlot, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter, resolveTransitionHooks, setBlockTracking, setDevtoolsHook, setTransitionHooks, shallowReactive, shallowReadonly, shallowRef, ssrContextKey, ssrUtils, stop, toDisplayString, toHandlerKey, toHandlers, toRaw, toRef, toRefs, toValue, transformVNodeArgs, triggerRef, unref, useAttrs, useCssModule, useCssVars, useSSRContext, useSlots, useTransitionState, vModelCheckbox, vModelDynamic, vModelRadio, vModelSelect, vModelText, vShow, version, warn, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withKeys, withMemo, withModifiers, withScopeId };
|