App.vue 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <script setup lang="ts">
  2. import { onLaunch, onShow, onHide } from '@dcloudio/uni-app'
  3. import { useAnalysis } from '@/composables/analysis'
  4. useAnalysis(true, true)
  5. onLaunch(() => {
  6. console.log('App Launch')
  7. })
  8. onShow(() => {
  9. console.log('App Show')
  10. })
  11. onHide(() => {
  12. console.log('App Hide')
  13. })
  14. </script>
  15. <style lang="scss">
  16. /* stylelint-disable selector-type-no-unknown */
  17. button::after {
  18. border: none;
  19. }
  20. swiper,
  21. scroll-view {
  22. flex: 1;
  23. height: 100%;
  24. overflow: hidden;
  25. }
  26. image {
  27. width: 100%;
  28. height: 100%;
  29. vertical-align: middle;
  30. }
  31. // 单行省略,优先使用 unocss: text-ellipsis
  32. .ellipsis {
  33. overflow: hidden;
  34. text-overflow: ellipsis;
  35. white-space: nowrap;
  36. }
  37. // 两行省略
  38. .ellipsis-2 {
  39. display: -webkit-box;
  40. overflow: hidden;
  41. text-overflow: ellipsis;
  42. -webkit-line-clamp: 2;
  43. -webkit-box-orient: vertical;
  44. }
  45. // 三行省略
  46. .ellipsis-3 {
  47. display: -webkit-box;
  48. overflow: hidden;
  49. text-overflow: ellipsis;
  50. -webkit-line-clamp: 3;
  51. -webkit-box-orient: vertical;
  52. }
  53. </style>