<template>
  <div v-if="selectedNode?.data.url">
    <div
      v-if="selectedNode?.type === 'video'"
      class="h-60 w-400 round-10"
      style="background: red"
    >
      我是顶部视频编辑组件
    </div>
    <div
      v-if="selectedNode?.type === 'image'"
      class="h-60 w-400 round-10"
      style="background: red"
    >
      我是顶部图片编辑组件
    </div>
  </div>
  <ElButton v-else @click="onUploadFile">⬆上传</ElButton>
</template>

<script setup lang="ts">
const props = defineProps({
  selectedNode: {
    type: Object,
  },
});
console.log(333333, props.selectedNode);

const onUploadFile = () => {
  console.log('onUploadFile');
}
</script>

<style lang="scss" scoped></style>
