<template>
    <hc-new-dialog v-model="isShow" is-table widths="95%" title="修改报表模板" @save="modalSave">
        <hc-online-office :src="docxUrl" title="测试的文档.docx" />
    </hc-new-dialog>
</template>

<script setup>
import { ref, watch } from 'vue'

const props = defineProps({
    ids: {
        type: [String, Number],
        default: '',
    },
})

//事件
const emit = defineEmits(['finish', 'close'])

//双向绑定
// eslint-disable-next-line no-undef
const isShow = defineModel('modelValue', {
    default: false,
})

//监听
watch(() => [
    props.ids,
], ([ids]) => {
    console.log('ids', ids)
}, { immediate: true })

//监听
watch(isShow, (val) => {
    if (val) {
        console.log('处理数据')
    }
})

const docxUrl = ref('https://bladex-chongqing-info.oss-cn-hangzhou.aliyuncs.com//upload/20231023/0663b9e290b8d038003cc95bbe3d9422.xlsx')

const modalSave = () => {
    emit('finish')
}
</script>
