showSrcBtn.vue 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <!--
  2. * @Description:
  3. * @Version: 1.668
  4. * @Autor: 地虎降天龙
  5. * @Date: 2023-12-15 09:11:09
  6. * @LastEditors: 地虎降天龙
  7. * @LastEditTime: 2025-10-10 09:18:25
  8. -->
  9. <template>
  10. <template v-if="detectDeviceType() !== 'Mobile'">
  11. <div class="rbts">
  12. <FButton type="info" class="absolute home-btn" size="small" @click="tohome()">
  13. <template #icon>
  14. <HomeOutlined />首页
  15. </template>
  16. </FButton>
  17. <FButton type="info" class="absolute" size="small" style="right: 10px; bottom: 10px" @click="jump()">
  18. <template #icon>
  19. <ProductOutlined />
  20. </template>源码Src
  21. </FButton>
  22. </div>
  23. </template>
  24. </template>
  25. <script setup lang="ts">
  26. import { ProductOutlined, HomeOutlined } from '@fesjs/fes-design/icon'
  27. import { FButton } from '@fesjs/fes-design'
  28. import { detectDeviceType } from '../../common/utils'
  29. const props = withDefaults(
  30. defineProps<{
  31. parts: any
  32. }>(),
  33. {},
  34. )
  35. let baseUrl = 'https://gitee.com/ice-gl/icegl-three-vue-tres/blob/master/src'
  36. let newUrl = `${baseUrl}/${props.parts[1]}/${props.parts[2]}/pages/${props.parts.slice(3).join('/')}.vue`
  37. const jump = () => {
  38. window.open(newUrl)
  39. }
  40. const tohome = () => {
  41. window.open('https://github.com/hawk86104/three-vue-tres')
  42. }
  43. </script>
  44. <style lang="less" scoped>
  45. .home-btn {
  46. right: 93px;
  47. bottom: 10px;
  48. --f-btn-min-width: auto;
  49. border-right-width: 0px;
  50. }
  51. .rbts {
  52. z-index: 10001;
  53. position: absolute;
  54. bottom: 0px;
  55. right: 0px;
  56. }
  57. </style>