|
@@ -1303,6 +1303,9 @@ function isReadonly(value) {
|
|
|
function isShallow(value) {
|
|
|
return !!(value && value["__v_isShallow"]);
|
|
|
}
|
|
|
+function isProxy(value) {
|
|
|
+ return isReactive(value) || isReadonly(value);
|
|
|
+}
|
|
|
function toRaw(observed) {
|
|
|
const raw = observed && observed["__v_raw"];
|
|
|
return raw ? toRaw(raw) : observed;
|
|
@@ -2094,6 +2097,47 @@ function setCurrentRenderingInstance(instance) {
|
|
|
instance && instance.type.__scopeId || null;
|
|
|
return prev;
|
|
|
}
|
|
|
+const COMPONENTS = "components";
|
|
|
+function resolveComponent(name, maybeSelfReference) {
|
|
|
+ return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name;
|
|
|
+}
|
|
|
+function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) {
|
|
|
+ const instance = currentRenderingInstance || currentInstance;
|
|
|
+ if (instance) {
|
|
|
+ const Component2 = instance.type;
|
|
|
+ if (type === COMPONENTS) {
|
|
|
+ const selfName = getComponentName(
|
|
|
+ Component2,
|
|
|
+ false
|
|
|
+ );
|
|
|
+ if (selfName && (selfName === name || selfName === camelize(name) || selfName === capitalize(camelize(name)))) {
|
|
|
+ return Component2;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ const res = (
|
|
|
+ // local registration
|
|
|
+ // check instance[type] first which is resolved for options API
|
|
|
+ resolve(instance[type] || Component2[type], name) || // global registration
|
|
|
+ resolve(instance.appContext[type], name)
|
|
|
+ );
|
|
|
+ if (!res && maybeSelfReference) {
|
|
|
+ return Component2;
|
|
|
+ }
|
|
|
+ if (warnMissing && !res) {
|
|
|
+ const extra = type === COMPONENTS ? `
|
|
|
+If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : ``;
|
|
|
+ warn$1(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`);
|
|
|
+ }
|
|
|
+ return res;
|
|
|
+ } else {
|
|
|
+ warn$1(
|
|
|
+ `resolve${capitalize(type.slice(0, -1))} can only be used in render() or setup().`
|
|
|
+ );
|
|
|
+ }
|
|
|
+}
|
|
|
+function resolve(registry, name) {
|
|
|
+ return registry && (registry[name] || registry[camelize(name)] || registry[capitalize(camelize(name))]);
|
|
|
+}
|
|
|
const INITIAL_WATCHER_VALUE = {};
|
|
|
function watch(source, cb, options) {
|
|
|
if (!isFunction(cb)) {
|
|
@@ -3704,6 +3748,12 @@ const Static = Symbol.for("v-stc");
|
|
|
function isVNode(value) {
|
|
|
return value ? value.__v_isVNode === true : false;
|
|
|
}
|
|
|
+const InternalObjectKey = `__vInternal`;
|
|
|
+function guardReactiveProps(props) {
|
|
|
+ if (!props)
|
|
|
+ return null;
|
|
|
+ return isProxy(props) || InternalObjectKey in props ? extend({}, props) : props;
|
|
|
+}
|
|
|
const emptyAppContext = createAppContext();
|
|
|
let uid = 0;
|
|
|
function createComponentInstance(vnode, parent, suspense) {
|
|
@@ -4942,6 +4992,11 @@ function initApp(app) {
|
|
|
}
|
|
|
}
|
|
|
const propsCaches = /* @__PURE__ */ Object.create(null);
|
|
|
+function renderProps(props) {
|
|
|
+ const { uid: uid2, __counter } = getCurrentInstance();
|
|
|
+ const propsId = (propsCaches[uid2] || (propsCaches[uid2] = [])).push(guardReactiveProps(props)) - 1;
|
|
|
+ return uid2 + "," + propsId + "," + __counter;
|
|
|
+}
|
|
|
function pruneComponentPropsCache(uid2) {
|
|
|
delete propsCaches[uid2];
|
|
|
}
|
|
@@ -5113,6 +5168,7 @@ const f = (source, renderItem) => vFor(source, renderItem);
|
|
|
const e = (target, ...sources) => extend(target, ...sources);
|
|
|
const n = (value) => normalizeClass(value);
|
|
|
const t = (val) => toDisplayString(val);
|
|
|
+const p = (props) => renderProps(props);
|
|
|
function createApp$1(rootComponent, rootProps = null) {
|
|
|
rootComponent && (rootComponent.mpType = "app");
|
|
|
return createVueApp(rootComponent, rootProps).use(plugin);
|
|
@@ -5433,8 +5489,8 @@ function promisify$1(name, fn) {
|
|
|
if (hasCallback(args)) {
|
|
|
return wrapperReturnValue(name, invokeApi(name, fn, args, rest));
|
|
|
}
|
|
|
- return wrapperReturnValue(name, handlePromise(new Promise((resolve, reject) => {
|
|
|
- invokeApi(name, fn, extend(args, { success: resolve, fail: reject }), rest);
|
|
|
+ return wrapperReturnValue(name, handlePromise(new Promise((resolve2, reject) => {
|
|
|
+ invokeApi(name, fn, extend(args, { success: resolve2, fail: reject }), rest);
|
|
|
})));
|
|
|
};
|
|
|
}
|
|
@@ -5749,7 +5805,7 @@ function invokeGetPushCidCallbacks(cid2, errMsg) {
|
|
|
getPushCidCallbacks.length = 0;
|
|
|
}
|
|
|
const API_GET_PUSH_CLIENT_ID = "getPushClientId";
|
|
|
-const getPushClientId = defineAsyncApi(API_GET_PUSH_CLIENT_ID, (_, { resolve, reject }) => {
|
|
|
+const getPushClientId = defineAsyncApi(API_GET_PUSH_CLIENT_ID, (_, { resolve: resolve2, reject }) => {
|
|
|
Promise.resolve().then(() => {
|
|
|
if (typeof enabled === "undefined") {
|
|
|
enabled = false;
|
|
@@ -5758,7 +5814,7 @@ const getPushClientId = defineAsyncApi(API_GET_PUSH_CLIENT_ID, (_, { resolve, re
|
|
|
}
|
|
|
getPushCidCallbacks.push((cid2, errMsg) => {
|
|
|
if (cid2) {
|
|
|
- resolve({ cid: cid2 });
|
|
|
+ resolve2({ cid: cid2 });
|
|
|
} else {
|
|
|
reject(errMsg);
|
|
|
}
|
|
@@ -5827,9 +5883,9 @@ function promisify(name, api) {
|
|
|
if (isFunction(options.success) || isFunction(options.fail) || isFunction(options.complete)) {
|
|
|
return wrapperReturnValue(name, invokeApi(name, api, options, rest));
|
|
|
}
|
|
|
- return wrapperReturnValue(name, handlePromise(new Promise((resolve, reject) => {
|
|
|
+ return wrapperReturnValue(name, handlePromise(new Promise((resolve2, reject) => {
|
|
|
invokeApi(name, api, extend({}, options, {
|
|
|
- success: resolve,
|
|
|
+ success: resolve2,
|
|
|
fail: reject
|
|
|
}), rest);
|
|
|
})));
|
|
@@ -6418,13 +6474,13 @@ function initRuntimeSocket(hosts, port, id) {
|
|
|
}
|
|
|
const SOCKET_TIMEOUT = 500;
|
|
|
function tryConnectSocket(host2, port, id) {
|
|
|
- return new Promise((resolve, reject) => {
|
|
|
+ return new Promise((resolve2, reject) => {
|
|
|
const socket = index.connectSocket({
|
|
|
url: `ws://${host2}:${port}/${id}`,
|
|
|
multiple: true,
|
|
|
// 支付宝小程序 是否开启多实例
|
|
|
fail() {
|
|
|
- resolve(null);
|
|
|
+ resolve2(null);
|
|
|
}
|
|
|
});
|
|
|
const timer = setTimeout(() => {
|
|
@@ -6432,19 +6488,19 @@ function tryConnectSocket(host2, port, id) {
|
|
|
code: 1006,
|
|
|
reason: "connect timeout"
|
|
|
});
|
|
|
- resolve(null);
|
|
|
+ resolve2(null);
|
|
|
}, SOCKET_TIMEOUT);
|
|
|
socket.onOpen((e2) => {
|
|
|
clearTimeout(timer);
|
|
|
- resolve(socket);
|
|
|
+ resolve2(socket);
|
|
|
});
|
|
|
socket.onClose((e2) => {
|
|
|
clearTimeout(timer);
|
|
|
- resolve(null);
|
|
|
+ resolve2(null);
|
|
|
});
|
|
|
socket.onError((e2) => {
|
|
|
clearTimeout(timer);
|
|
|
- resolve(null);
|
|
|
+ resolve2(null);
|
|
|
});
|
|
|
});
|
|
|
}
|
|
@@ -6876,7 +6932,7 @@ function initOnError() {
|
|
|
function initRuntimeSocketService() {
|
|
|
const hosts = "192.168.225.1,192.168.189.1,192.168.171.80,127.0.0.1";
|
|
|
const port = "8090";
|
|
|
- const id = "mp-weixin_DtJ2X4";
|
|
|
+ const id = "mp-weixin_UhCft6";
|
|
|
const lazy = typeof swan !== "undefined";
|
|
|
let restoreError = lazy ? () => {
|
|
|
} : initOnError();
|
|
@@ -7822,5 +7878,8 @@ exports.f = f;
|
|
|
exports.index = index;
|
|
|
exports.n = n;
|
|
|
exports.o = o;
|
|
|
+exports.p = p;
|
|
|
+exports.resolveComponent = resolveComponent;
|
|
|
exports.t = t;
|
|
|
+exports.wx$1 = wx$1;
|
|
|
//# sourceMappingURL=../../.sourcemap/mp-weixin/common/vendor.js.map
|