RunSpiderDialog.vue 669 B

123456789101112131415161718192021222324252627282930
  1. <template>
  2. <el-dialog title="调试/运行" v-model="dialogVisible" :close-on-click-modal="false" destroy-on-close width="80%">
  3. <RunSpiderContent ref="runSpiderContent" />
  4. </el-dialog>
  5. </template>
  6. <script setup>
  7. import { ref, nextTick } from 'vue';
  8. import RunSpiderContent from "./RunSpider.vue"
  9. const dialogVisible = ref(false)
  10. const runSpiderContent = ref({})
  11. const setPageData = (e) => {
  12. nextTick(() => {
  13. runSpiderContent.value.setPageData(e)
  14. })
  15. }
  16. const getPageData = () => {
  17. return runSpiderContent.value.getPageData()
  18. }
  19. defineExpose({
  20. dialogVisible,
  21. setPageData,
  22. getPageData,
  23. })
  24. </script>
  25. <style scoped>
  26. </style>