index.vue 725 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <script>
  2. import Running from './Running'
  3. import ScreenShot from './ScreenShot'
  4. import Download from './Download'
  5. export default {
  6. name: 'DeviceRuntime',
  7. components: {
  8. Running,
  9. ScreenShot,
  10. Download
  11. },
  12. props: {
  13. online: {
  14. type: [Boolean, String],
  15. default: false
  16. }
  17. },
  18. render (h) {
  19. if (!this.online) {
  20. return h(
  21. 'div',
  22. {
  23. staticClass: 'u-font-size--lg u-color--info u-text--center'
  24. },
  25. '设备当前未上线'
  26. )
  27. }
  28. return h(
  29. 'div',
  30. {
  31. staticClass: 'l-grid--info'
  32. },
  33. [
  34. h('Running'),
  35. h('ScreenShot', { props: this.$attrs }),
  36. h('Download')
  37. ]
  38. )
  39. }
  40. }
  41. </script>