<template>
  <DialogLayout
    title="文件预览"
    :visible="$store.resource_preview_dialog .visible"
    :actionBarOption="{ noCencel: true, right: true, confirmTxt: '关闭' }"
    @onConfirm="onClose"
    @onCancel="onClose"
  ><Preview timeline :resource="$store.resource_preview_dialog.resource" /></DialogLayout>
</template>

<script>
import DialogLayout from '@/components/layout/DialogLayout.vue'
import Preview from '@/components/business/Preview.vue'

export default {
  components: { DialogLayout, Preview },

  methods: {
    onClose () {
      this.$store.resource_preview_dialog.visible = false
    }
  }
}
</script>
