提交 98ef4cb2 编写于 作者: Q qiang

fix(App): video slot

上级 bc26fdc8
...@@ -171,7 +171,7 @@ export default /*#__PURE__*/ defineBuiltInComponent({ ...@@ -171,7 +171,7 @@ export default /*#__PURE__*/ defineBuiltInComponent({
name: 'Video', name: 'Video',
props, props,
emits, emits,
setup(props, { emit, slots }) { setup(props, { emit }) {
const rootRef: Ref<HTMLElement | null> = ref(null) const rootRef: Ref<HTMLElement | null> = ref(null)
const trigger = useCustomEvent<EmitEvent<typeof emit>>(rootRef, emit) const trigger = useCustomEvent<EmitEvent<typeof emit>>(rootRef, emit)
const containerRef: Ref<HTMLElement | null> = ref(null) const containerRef: Ref<HTMLElement | null> = ref(null)
...@@ -253,7 +253,7 @@ export default /*#__PURE__*/ defineBuiltInComponent({ ...@@ -253,7 +253,7 @@ export default /*#__PURE__*/ defineBuiltInComponent({
return ( return (
<uni-video ref={rootRef} id={props.id}> <uni-video ref={rootRef} id={props.id}>
<div ref={containerRef} class="uni-video-container" /> <div ref={containerRef} class="uni-video-container" />
<div class="uni-video-slot">{slots.default && slots.default()}</div> <div class="uni-video-slot"></div>
</uni-video> </uni-video>
) )
} }
......
...@@ -11,6 +11,14 @@ export class UniVideo extends UniComponent { ...@@ -11,6 +11,14 @@ export class UniVideo extends UniComponent {
refNodeId: number, refNodeId: number,
nodeJson: Partial<UniNodeJSON> nodeJson: Partial<UniNodeJSON>
) { ) {
super(id, 'uni-video', Video, parentNodeId, refNodeId, nodeJson) super(
id,
'uni-video',
Video,
parentNodeId,
refNodeId,
nodeJson,
'.uni-video-slot'
)
} }
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册