提交 72f7019a 编写于 作者: fxy060608's avatar fxy060608

chore: build

上级 291323d6
......@@ -15963,10 +15963,14 @@ var serviceContext = (function (vue) {
errCode: err.code,
});
});
// @ts-ignore
audio.addEventListener('prev', () => publish('onBackgroundAudioPrev'));
// @ts-ignore
audio.addEventListener('next', () => publish('onBackgroundAudioNext'));
// @ts-expect-error
audio.addEventListener('prev', () => {
onBackgroundAudioStateChange({ state: 'prev' });
});
// @ts-expect-error
audio.addEventListener('next', () => {
onBackgroundAudioStateChange({ state: 'next' });
});
}
function getBackgroundAudioState() {
let data = {
......@@ -16055,7 +16059,7 @@ var serviceContext = (function (vue) {
}
function onBackgroundAudioStateChange({ state, errMsg, errCode, dataUrl, }) {
callbacks[state].forEach((callback) => {
if (typeof callback === 'function') {
if (isFunction(callback)) {
callback(state === 'error'
? {
errMsg,
......@@ -17285,7 +17289,10 @@ var serviceContext = (function (vue) {
}
function initHooks(options, instance, publicThis) {
const mpType = options.mpType || publicThis.$mpType;
// 为了组件也可以监听部分生命周期,故不再判断mpType,统一添加on开头的生命周期
if (!mpType) {
// 仅 App,Page 类型支持在 options 中配置 on 生命周期,组件可以使用组合式 API 定义页面生命周期
return;
}
Object.keys(options).forEach((name) => {
if (name.indexOf('on') === 0) {
const hooks = options[name];
......
......@@ -6561,6 +6561,9 @@ function injectLifecycleHook(name, hook, publicThis, instance) {
}
function initHooks(options, instance, publicThis) {
const mpType = options.mpType || publicThis.$mpType;
if (!mpType) {
return;
}
Object.keys(options).forEach((name) => {
if (name.indexOf("on") === 0) {
const hooks = options[name];
......
......@@ -13587,6 +13587,9 @@ function injectLifecycleHook(name, hook, publicThis, instance2) {
}
function initHooks(options, instance2, publicThis) {
const mpType = options.mpType || publicThis.$mpType;
if (!mpType) {
return;
}
Object.keys(options).forEach((name) => {
if (name.indexOf("on") === 0) {
const hooks = options[name];
......
......@@ -5111,8 +5111,11 @@ function injectLifecycleHook(name, hook, publicThis, instance) {
}
}
function initHooks(options, instance, publicThis) {
options.mpType || publicThis.$mpType;
// 为了组件也可以监听部分生命周期,故不再判断mpType,统一添加on开头的生命周期
const mpType = options.mpType || publicThis.$mpType;
if (!mpType) {
// 仅 App,Page 类型支持在 options 中配置 on 生命周期,组件可以使用组合式 API 定义页面生命周期
return;
}
Object.keys(options).forEach((name) => {
if (name.indexOf('on') === 0) {
const hooks = options[name];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册