变更
This commit is contained in:
@@ -2060,4 +2060,4 @@ function clearNumberFormat(ctx, locale, format) {
|
||||
getGlobalThis().__INTLIFY_PROD_DEVTOOLS__ = false;
|
||||
}
|
||||
}
|
||||
export { parseDateTimeArgs as A, datetime as B, parseNumberArgs as C, number as D, getLocaleChain as E, MISSING_RESOLVE_VALUE as M, NOT_REOSLVED as N, assign as a, isString as b, isObject$1 as c, isArray as d, isBoolean as e, createCompileError as f, isEmptyObject as g, getGlobalThis as h, isNumber as i, isPlainObject as j, hasOwn$1 as k, handleFlatJson as l, makeSymbol as m, isRegExp as n, isFunction as o, createCoreContext as p, compileToFunction as q, registerMessageCompiler as r, setDevToolsHook as s, resolveValue as t, updateFallbackLocale as u, clearDateTimeFormat as v, clearNumberFormat as w, setAdditionalMeta as x, parseTranslateArgs as y, translate as z };
|
||||
export { parseDateTimeArgs as A, datetime as B, parseNumberArgs as C, number as D, getLocaleChain as E, MISSING_RESOLVE_VALUE as M, NOT_REOSLVED as N, assign as a, isString as b, isObject$1 as c, isBoolean as d, isEmptyObject as e, createCompileError as f, getGlobalThis as g, isPlainObject as h, isNumber as i, isArray as j, hasOwn$1 as k, handleFlatJson as l, makeSymbol as m, isRegExp as n, isFunction as o, compileToFunction as p, createCoreContext as q, registerMessageCompiler as r, setDevToolsHook as s, resolveValue as t, updateFallbackLocale as u, clearDateTimeFormat as v, clearNumberFormat as w, setAdditionalMeta as x, parseTranslateArgs as y, translate as z };
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -149,7 +149,9 @@ function triggerEffect(effect, debuggerEventExtraInfo) {
|
||||
}
|
||||
}
|
||||
}
|
||||
new Set(/* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol));
|
||||
new Set(
|
||||
/* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol)
|
||||
);
|
||||
function toRaw(observed) {
|
||||
const raw = observed && observed["__v_raw"];
|
||||
return raw ? toRaw(raw) : observed;
|
||||
@@ -170,11 +172,13 @@ function triggerRefValue(ref, newVal) {
|
||||
}
|
||||
}
|
||||
}
|
||||
var _a;
|
||||
class ComputedRefImpl {
|
||||
constructor(getter, _setter, isReadonly, isSSR) {
|
||||
this._setter = _setter;
|
||||
this.dep = void 0;
|
||||
this.__v_isRef = true;
|
||||
this[_a] = false;
|
||||
this._dirty = true;
|
||||
this.effect = new ReactiveEffect(getter, () => {
|
||||
if (!this._dirty) {
|
||||
@@ -199,6 +203,7 @@ class ComputedRefImpl {
|
||||
this._setter(newValue);
|
||||
}
|
||||
}
|
||||
_a = "__v_isReadonly";
|
||||
function computed(getterOrOptions, debugOptions, isSSR = false) {
|
||||
let getter;
|
||||
let setter;
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
import { computed, isRef, reactive, unref, toRefs, getCurrentScope, onScopeDispose, getCurrentInstance, onMounted, nextTick, ref, watch, customRef, onUpdated } from "vue";
|
||||
var _a$1;
|
||||
const isClient$1 = typeof window !== "undefined";
|
||||
const toString$1 = Object.prototype.toString;
|
||||
import { getCurrentScope, onScopeDispose, computed, toRefs, getCurrentInstance, onMounted, nextTick, ref, unref, isRef, reactive, watch, customRef, onUpdated } from "vue";
|
||||
var _a;
|
||||
const isClient = typeof window !== "undefined";
|
||||
const toString = Object.prototype.toString;
|
||||
const isFunction = (val) => typeof val === "function";
|
||||
const isNumber = (val) => typeof val === "number";
|
||||
const isString = (val) => typeof val === "string";
|
||||
const isObject$1 = (val) => toString$1.call(val) === "[object Object]";
|
||||
const isObject = (val) => toString.call(val) === "[object Object]";
|
||||
const clamp = (n, min, max) => Math.min(max, Math.max(min, n));
|
||||
const noop = () => {
|
||||
};
|
||||
isClient$1 && ((_a$1 = window == null ? void 0 : window.navigator) == null ? void 0 : _a$1.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
|
||||
isClient && ((_a = window == null ? void 0 : window.navigator) == null ? void 0 : _a.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
|
||||
function resolveUnref(r) {
|
||||
return typeof r === "function" ? r() : unref(r);
|
||||
}
|
||||
@@ -141,7 +141,7 @@ function useTimeoutFn(cb, interval, options = {}) {
|
||||
}
|
||||
if (immediate) {
|
||||
isPending.value = true;
|
||||
if (isClient$1)
|
||||
if (isClient)
|
||||
start();
|
||||
}
|
||||
tryOnScopeDispose(stop);
|
||||
@@ -156,7 +156,7 @@ function unrefElement(elRef) {
|
||||
const plain = resolveUnref(elRef);
|
||||
return (_a2 = plain == null ? void 0 : plain.$el) != null ? _a2 : plain;
|
||||
}
|
||||
const defaultWindow = isClient$1 ? window : void 0;
|
||||
const defaultWindow = isClient ? window : void 0;
|
||||
function useEventListener(...args) {
|
||||
let target;
|
||||
let event;
|
||||
@@ -561,9 +561,4 @@ function useWindowSize(options = {}) {
|
||||
useEventListener("orientationchange", update, { passive: true });
|
||||
return { width, height };
|
||||
}
|
||||
var _a;
|
||||
const isClient = typeof window !== "undefined";
|
||||
const toString = Object.prototype.toString;
|
||||
const isObject = (val) => toString.call(val) === "[object Object]";
|
||||
isClient && ((_a = window == null ? void 0 : window.navigator) == null ? void 0 : _a.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
|
||||
export { TransitionPresets as T, useResizeObserver as a, useThrottleFn as b, useEventListener as c, useEyeDropper as d, useTransition as e, useMousePressed as f, isObject as g, isObject$1 as i, onClickOutside as o, reactiveOmit as r, templateRef as t, useWindowSize as u };
|
||||
export { TransitionPresets as T, useResizeObserver as a, useThrottleFn as b, useEventListener as c, useEyeDropper as d, useTransition as e, useMousePressed as f, isObject as i, onClickOutside as o, reactiveOmit as r, templateRef as t, useWindowSize as u };
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { m as makeSymbol, a as assign, i as isNumber, b as isString, c as isObject, d as isArray, e as isBoolean, f as createCompileError, g as isEmptyObject, r as registerMessageCompiler, h as getGlobalThis, s as setDevToolsHook, j as isPlainObject, k as hasOwn, l as handleFlatJson, n as isRegExp, o as isFunction, p as createCoreContext, u as updateFallbackLocale, q as compileToFunction, t as resolveValue, v as clearDateTimeFormat, w as clearNumberFormat, x as setAdditionalMeta, N as NOT_REOSLVED, y as parseTranslateArgs, z as translate, M as MISSING_RESOLVE_VALUE, A as parseDateTimeArgs, B as datetime, C as parseNumberArgs, D as number, E as getLocaleChain } from "../@intlify/index.js";
|
||||
import { h, Fragment, getCurrentInstance, inject, onMounted, onUnmounted, isRef, ref, computed, watch, createVNode, Text } from "vue";
|
||||
import { m as makeSymbol, a as assign, i as isNumber, b as isString, c as isObject, d as isBoolean, e as isEmptyObject, r as registerMessageCompiler, g as getGlobalThis, s as setDevToolsHook, f as createCompileError, h as isPlainObject, j as isArray, k as hasOwn, l as handleFlatJson, n as isRegExp, o as isFunction, u as updateFallbackLocale, p as compileToFunction, q as createCoreContext, t as resolveValue, v as clearDateTimeFormat, w as clearNumberFormat, x as setAdditionalMeta, N as NOT_REOSLVED, y as parseTranslateArgs, z as translate, M as MISSING_RESOLVE_VALUE, A as parseDateTimeArgs, B as datetime, C as parseNumberArgs, D as number, E as getLocaleChain } from "../@intlify/index.js";
|
||||
import { h, Fragment, getCurrentInstance, inject, onMounted, onUnmounted, ref, computed, watch, isRef, createVNode, Text } from "vue";
|
||||
/*!
|
||||
* vue-i18n v9.1.10
|
||||
* (c) 2022 kazuya kawaguchi
|
||||
@@ -80,8 +80,12 @@ function createComposer(options = {}) {
|
||||
const { __root } = options;
|
||||
const _isGlobal = __root === void 0;
|
||||
let _inheritLocale = isBoolean(options.inheritLocale) ? options.inheritLocale : true;
|
||||
const _locale = ref(__root && _inheritLocale ? __root.locale.value : isString(options.locale) ? options.locale : "en-US");
|
||||
const _fallbackLocale = ref(__root && _inheritLocale ? __root.fallbackLocale.value : isString(options.fallbackLocale) || isArray(options.fallbackLocale) || isPlainObject(options.fallbackLocale) || options.fallbackLocale === false ? options.fallbackLocale : _locale.value);
|
||||
const _locale = ref(
|
||||
__root && _inheritLocale ? __root.locale.value : isString(options.locale) ? options.locale : "en-US"
|
||||
);
|
||||
const _fallbackLocale = ref(
|
||||
__root && _inheritLocale ? __root.fallbackLocale.value : isString(options.fallbackLocale) || isArray(options.fallbackLocale) || isPlainObject(options.fallbackLocale) || options.fallbackLocale === false ? options.fallbackLocale : _locale.value
|
||||
);
|
||||
const _messages = ref(getLocaleMessages(_locale.value, options));
|
||||
const _datetimeFormats = ref(isPlainObject(options.datetimeFormats) ? options.datetimeFormats : { [_locale.value]: {} });
|
||||
const _numberFormats = ref(isPlainObject(options.numberFormats) ? options.numberFormats : { [_locale.value]: {} });
|
||||
@@ -215,23 +219,44 @@ function createComposer(options = {}) {
|
||||
type: "vnode"
|
||||
};
|
||||
function transrateVNode(...args) {
|
||||
return wrapWithDeps((context) => {
|
||||
let ret;
|
||||
const _context2 = context;
|
||||
try {
|
||||
_context2.processor = processor;
|
||||
ret = translate(_context2, ...args);
|
||||
} finally {
|
||||
_context2.processor = null;
|
||||
}
|
||||
return ret;
|
||||
}, () => parseTranslateArgs(...args), "translate", (root) => root[TransrateVNodeSymbol](...args), (key) => [createVNode(Text, null, key, 0)], (val) => isArray(val));
|
||||
return wrapWithDeps(
|
||||
(context) => {
|
||||
let ret;
|
||||
const _context2 = context;
|
||||
try {
|
||||
_context2.processor = processor;
|
||||
ret = translate(_context2, ...args);
|
||||
} finally {
|
||||
_context2.processor = null;
|
||||
}
|
||||
return ret;
|
||||
},
|
||||
() => parseTranslateArgs(...args),
|
||||
"translate",
|
||||
(root) => root[TransrateVNodeSymbol](...args),
|
||||
(key) => [createVNode(Text, null, key, 0)],
|
||||
(val) => isArray(val)
|
||||
);
|
||||
}
|
||||
function numberParts(...args) {
|
||||
return wrapWithDeps((context) => number(context, ...args), () => parseNumberArgs(...args), "number format", (root) => root[NumberPartsSymbol](...args), () => [], (val) => isString(val) || isArray(val));
|
||||
return wrapWithDeps(
|
||||
(context) => number(context, ...args),
|
||||
() => parseNumberArgs(...args),
|
||||
"number format",
|
||||
(root) => root[NumberPartsSymbol](...args),
|
||||
() => [],
|
||||
(val) => isString(val) || isArray(val)
|
||||
);
|
||||
}
|
||||
function datetimeParts(...args) {
|
||||
return wrapWithDeps((context) => datetime(context, ...args), () => parseDateTimeArgs(...args), "datetime format", (root) => root[DatetimePartsSymbol](...args), () => [], (val) => isString(val) || isArray(val));
|
||||
return wrapWithDeps(
|
||||
(context) => datetime(context, ...args),
|
||||
() => parseDateTimeArgs(...args),
|
||||
"datetime format",
|
||||
(root) => root[DatetimePartsSymbol](...args),
|
||||
() => [],
|
||||
(val) => isString(val) || isArray(val)
|
||||
);
|
||||
}
|
||||
function setPluralRules(rules) {
|
||||
_pluralRules = rules;
|
||||
|
||||
Reference in New Issue
Block a user