WebViewPreview.vue 413 B

1234567891011121314151617181920212223242526
  1. <template>
  2. <view>
  3. <web-view :src="url"></web-view>
  4. </view>
  5. </template>
  6. <script>
  7. import {
  8. getConfig
  9. } from '@/utils/auth';
  10. export default {
  11. data() {
  12. return {
  13. url: '',
  14. }
  15. },
  16. onLoad(options) {
  17. this.file_preview_url = getConfig() ? getConfig().doc_preview_service_address : '';
  18. this.url = `${this.file_preview_url}/onlinePreview?url=` + options.path;
  19. }
  20. }
  21. </script>
  22. <style>
  23. </style>