提交 8719f55c 编写于 作者: fxy060608's avatar fxy060608

chore: build

上级 3cbbd7a5
......@@ -130,7 +130,17 @@ const invokeArrayFns = (fns, arg) => {
ret = fns[i](arg);
}
return ret;
};
};
function once(fn, ctx = null) {
let res;
return ((...args) => {
if (fn) {
res = fn.apply(ctx, args);
fn = null;
}
return res;
});
}
const encode = encodeURIComponent;
function stringifyQuery(obj, encodeStr = encode) {
......@@ -388,6 +398,27 @@ function initRuntimeHooks(mpOptions, runtimeHooks) {
initHook$1(mpOptions, hook, []);
}
});
}
const findMixinRuntimeHooks = /*#__PURE__*/ once(() => {
const runtimeHooks = [];
const app = getApp({ allowDefault: true });
if (app && app.$vm && app.$vm.$) {
const mixins = app.$vm.$.appContext.mixins;
if (isArray(mixins)) {
const hooks = Object.keys(MINI_PROGRAM_PAGE_RUNTIME_HOOKS);
mixins.forEach((mixin) => {
hooks.forEach((hook) => {
if (hasOwn(mixin, hook) && !runtimeHooks.includes(hook)) {
runtimeHooks.push(hook);
}
});
});
}
}
return runtimeHooks;
});
function initMixinRuntimeHooks(mpOptions) {
initHooks(mpOptions, findMixinRuntimeHooks());
}
const HOOKS = [
......@@ -905,6 +936,7 @@ function parsePage(vueOptions, parseOptions) {
initHooks(methods, PAGE_INIT_HOOKS);
initUnknownHooks(methods, vueOptions);
initRuntimeHooks(methods, vueOptions.__runtimeHooks);
initMixinRuntimeHooks(methods);
parse && parse(miniProgramPageOptions, { handleLink });
return miniProgramPageOptions;
}
......
......@@ -105,7 +105,17 @@ const invokeArrayFns = (fns, arg) => {
ret = fns[i](arg);
}
return ret;
};
};
function once(fn, ctx = null) {
let res;
return ((...args) => {
if (fn) {
res = fn.apply(ctx, args);
fn = null;
}
return res;
});
}
const encode = encodeURIComponent;
function stringifyQuery(obj, encodeStr = encode) {
......@@ -363,6 +373,27 @@ function initRuntimeHooks(mpOptions, runtimeHooks) {
initHook$1(mpOptions, hook, []);
}
});
}
const findMixinRuntimeHooks = /*#__PURE__*/ once(() => {
const runtimeHooks = [];
const app = getApp({ allowDefault: true });
if (app && app.$vm && app.$vm.$) {
const mixins = app.$vm.$.appContext.mixins;
if (isArray(mixins)) {
const hooks = Object.keys(MINI_PROGRAM_PAGE_RUNTIME_HOOKS);
mixins.forEach((mixin) => {
hooks.forEach((hook) => {
if (hasOwn(mixin, hook) && !runtimeHooks.includes(hook)) {
runtimeHooks.push(hook);
}
});
});
}
}
return runtimeHooks;
});
function initMixinRuntimeHooks(mpOptions) {
initHooks(mpOptions, findMixinRuntimeHooks());
}
const HOOKS = [
......@@ -869,6 +900,7 @@ function parsePage(vueOptions, parseOptions) {
initHooks(methods, PAGE_INIT_HOOKS);
initUnknownHooks(methods, vueOptions);
initRuntimeHooks(methods, vueOptions.__runtimeHooks);
initMixinRuntimeHooks(methods);
parse && parse(miniProgramPageOptions, { handleLink });
return miniProgramPageOptions;
}
......
......@@ -105,7 +105,17 @@ const invokeArrayFns = (fns, arg) => {
ret = fns[i](arg);
}
return ret;
};
};
function once(fn, ctx = null) {
let res;
return ((...args) => {
if (fn) {
res = fn.apply(ctx, args);
fn = null;
}
return res;
});
}
const encode = encodeURIComponent;
function stringifyQuery(obj, encodeStr = encode) {
......@@ -362,6 +372,27 @@ function initRuntimeHooks(mpOptions, runtimeHooks) {
initHook$1(mpOptions, hook, []);
}
});
}
const findMixinRuntimeHooks = /*#__PURE__*/ once(() => {
const runtimeHooks = [];
const app = getApp({ allowDefault: true });
if (app && app.$vm && app.$vm.$) {
const mixins = app.$vm.$.appContext.mixins;
if (isArray(mixins)) {
const hooks = Object.keys(MINI_PROGRAM_PAGE_RUNTIME_HOOKS);
mixins.forEach((mixin) => {
hooks.forEach((hook) => {
if (hasOwn(mixin, hook) && !runtimeHooks.includes(hook)) {
runtimeHooks.push(hook);
}
});
});
}
}
return runtimeHooks;
});
function initMixinRuntimeHooks(mpOptions) {
initHooks(mpOptions, findMixinRuntimeHooks());
}
const HOOKS = [
......@@ -842,6 +873,7 @@ function parsePage(vueOptions, parseOptions) {
initHooks(methods, PAGE_INIT_HOOKS);
initUnknownHooks(methods, vueOptions);
initRuntimeHooks(methods, vueOptions.__runtimeHooks);
initMixinRuntimeHooks(methods);
parse && parse(miniProgramPageOptions, { handleLink });
return miniProgramPageOptions;
}
......
......@@ -105,7 +105,17 @@ const invokeArrayFns = (fns, arg) => {
ret = fns[i](arg);
}
return ret;
};
};
function once(fn, ctx = null) {
let res;
return ((...args) => {
if (fn) {
res = fn.apply(ctx, args);
fn = null;
}
return res;
});
}
const encode = encodeURIComponent;
function stringifyQuery(obj, encodeStr = encode) {
......@@ -359,6 +369,27 @@ function initRuntimeHooks(mpOptions, runtimeHooks) {
initHook$1(mpOptions, hook, []);
}
});
}
const findMixinRuntimeHooks = /*#__PURE__*/ once(() => {
const runtimeHooks = [];
const app = getApp({ allowDefault: true });
if (app && app.$vm && app.$vm.$) {
const mixins = app.$vm.$.appContext.mixins;
if (isArray(mixins)) {
const hooks = Object.keys(MINI_PROGRAM_PAGE_RUNTIME_HOOKS);
mixins.forEach((mixin) => {
hooks.forEach((hook) => {
if (hasOwn(mixin, hook) && !runtimeHooks.includes(hook)) {
runtimeHooks.push(hook);
}
});
});
}
}
return runtimeHooks;
});
function initMixinRuntimeHooks(mpOptions) {
initHooks(mpOptions, findMixinRuntimeHooks());
}
const HOOKS = [
......@@ -831,6 +862,7 @@ function parsePage(vueOptions, parseOptions) {
initHooks(methods, PAGE_INIT_HOOKS);
initUnknownHooks(methods, vueOptions);
initRuntimeHooks(methods, vueOptions.__runtimeHooks);
initMixinRuntimeHooks(methods);
parse && parse(miniProgramPageOptions, { handleLink });
return miniProgramPageOptions;
}
......
......@@ -105,7 +105,17 @@ const invokeArrayFns = (fns, arg) => {
ret = fns[i](arg);
}
return ret;
};
};
function once(fn, ctx = null) {
let res;
return ((...args) => {
if (fn) {
res = fn.apply(ctx, args);
fn = null;
}
return res;
});
}
const encode = encodeURIComponent;
function stringifyQuery(obj, encodeStr = encode) {
......@@ -362,6 +372,27 @@ function initRuntimeHooks(mpOptions, runtimeHooks) {
initHook$1(mpOptions, hook, []);
}
});
}
const findMixinRuntimeHooks = /*#__PURE__*/ once(() => {
const runtimeHooks = [];
const app = getApp({ allowDefault: true });
if (app && app.$vm && app.$vm.$) {
const mixins = app.$vm.$.appContext.mixins;
if (isArray(mixins)) {
const hooks = Object.keys(MINI_PROGRAM_PAGE_RUNTIME_HOOKS);
mixins.forEach((mixin) => {
hooks.forEach((hook) => {
if (hasOwn(mixin, hook) && !runtimeHooks.includes(hook)) {
runtimeHooks.push(hook);
}
});
});
}
}
return runtimeHooks;
});
function initMixinRuntimeHooks(mpOptions) {
initHooks(mpOptions, findMixinRuntimeHooks());
}
const HOOKS = [
......@@ -842,6 +873,7 @@ function parsePage(vueOptions, parseOptions) {
initHooks(methods, PAGE_INIT_HOOKS);
initUnknownHooks(methods, vueOptions);
initRuntimeHooks(methods, vueOptions.__runtimeHooks);
initMixinRuntimeHooks(methods);
parse && parse(miniProgramPageOptions, { handleLink });
return miniProgramPageOptions;
}
......
......@@ -40,7 +40,17 @@ const invokeArrayFns = (fns, arg) => {
ret = fns[i](arg);
}
return ret;
};
};
function once(fn, ctx = null) {
let res;
return ((...args) => {
if (fn) {
res = fn.apply(ctx, args);
fn = null;
}
return res;
});
}
const encode = encodeURIComponent;
function stringifyQuery(obj, encodeStr = encode) {
......@@ -231,6 +241,27 @@ function initRuntimeHooks(mpOptions, runtimeHooks) {
initHook$1(mpOptions, hook, []);
}
});
}
const findMixinRuntimeHooks = /*#__PURE__*/ once(() => {
const runtimeHooks = [];
const app = getApp({ allowDefault: true });
if (app && app.$vm && app.$vm.$) {
const mixins = app.$vm.$.appContext.mixins;
if (isArray(mixins)) {
const hooks = Object.keys(MINI_PROGRAM_PAGE_RUNTIME_HOOKS);
mixins.forEach((mixin) => {
hooks.forEach((hook) => {
if (hasOwn(mixin, hook) && !runtimeHooks.includes(hook)) {
runtimeHooks.push(hook);
}
});
});
}
}
return runtimeHooks;
});
function initMixinRuntimeHooks(mpOptions) {
initHooks(mpOptions, findMixinRuntimeHooks());
}
const HOOKS = [
......@@ -703,6 +734,7 @@ function parsePage(vueOptions, parseOptions) {
initHooks(methods, PAGE_INIT_HOOKS);
initUnknownHooks(methods, vueOptions);
initRuntimeHooks(methods, vueOptions.__runtimeHooks);
initMixinRuntimeHooks(methods);
parse && parse(miniProgramPageOptions, { handleLink });
return miniProgramPageOptions;
}
......
......@@ -105,7 +105,17 @@ const invokeArrayFns = (fns, arg) => {
ret = fns[i](arg);
}
return ret;
};
};
function once(fn, ctx = null) {
let res;
return ((...args) => {
if (fn) {
res = fn.apply(ctx, args);
fn = null;
}
return res;
});
}
const encode = encodeURIComponent;
function stringifyQuery(obj, encodeStr = encode) {
......@@ -359,6 +369,27 @@ function initRuntimeHooks(mpOptions, runtimeHooks) {
initHook$1(mpOptions, hook, []);
}
});
}
const findMixinRuntimeHooks = /*#__PURE__*/ once(() => {
const runtimeHooks = [];
const app = getApp({ allowDefault: true });
if (app && app.$vm && app.$vm.$) {
const mixins = app.$vm.$.appContext.mixins;
if (isArray(mixins)) {
const hooks = Object.keys(MINI_PROGRAM_PAGE_RUNTIME_HOOKS);
mixins.forEach((mixin) => {
hooks.forEach((hook) => {
if (hasOwn(mixin, hook) && !runtimeHooks.includes(hook)) {
runtimeHooks.push(hook);
}
});
});
}
}
return runtimeHooks;
});
function initMixinRuntimeHooks(mpOptions) {
initHooks(mpOptions, findMixinRuntimeHooks());
}
const HOOKS = [
......@@ -820,6 +851,7 @@ function parsePage(vueOptions, parseOptions) {
initHooks(methods, PAGE_INIT_HOOKS);
initUnknownHooks(methods, vueOptions);
initRuntimeHooks(methods, vueOptions.__runtimeHooks);
initMixinRuntimeHooks(methods);
parse && parse(miniProgramPageOptions, { handleLink });
return miniProgramPageOptions;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册