提交 a66c5fdb 编写于 作者: D DCloud_LXH

fix(nvue): The video.pause method is invalid question/151933

上级 9d2820c7
import { ComponentPublicInstance } from 'vue'
import { findElmById, invokeVmMethod, invokeVmMethodWithoutArgs } from '../util'
import { getPageById } from '../../framework/page/getCurrentPages'
type Methords = Record<string, (ctx: any, args: any) => void>
......@@ -64,7 +65,7 @@ export function operateMap(
data?: unknown,
operateMapCallback?: (res: any) => void
) {
const page = getCurrentPages().find((page) => page.$page.id === pageId)
const page = getPageById(pageId)
if (page?.$page.meta.isNVue) {
const pageVm = (page as any).$vm as ComponentPublicInstance
return METHODS[type as keyof typeof METHODS](
......
import { ComponentPublicInstance } from 'vue'
import { findElmById, invokeVmMethod, invokeVmMethodWithoutArgs } from '../util'
import { getPageById } from '../../framework/page/getCurrentPages'
const METHODS = {
play(ctx: any) {
......@@ -43,7 +44,7 @@ export function operateVideoPlayer(
type: string,
data?: unknown
) {
const page = getCurrentPages().find((page) => page.$page.id === pageId)
const page = getPageById(pageId)
if (page?.$page.meta.isNVue) {
const pageVm = (page as any).$vm as ComponentPublicInstance
return METHODS[type as keyof typeof METHODS](
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册