cs.uvue 861 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <template>
  2. <cl-page>
  3. <view class="p-10 flex flex-col items-center justify-center">
  4. <cl-text :pt="{ className: 'text-center mb-5' }"
  5. >我们期待与您携手,共同探索技术的边界,共同推动技术的进步</cl-text
  6. >
  7. <view class="p-2 bg-white mb-5 rounded-xl">
  8. <cl-image
  9. src="/static/cs.png"
  10. :height="320"
  11. :width="320"
  12. show-menu-by-longpress
  13. ></cl-image>
  14. </view>
  15. <!-- #ifndef H5 -->
  16. <cl-button type="light" icon="download-line" @tap="saveImage">保存图片</cl-button>
  17. <!-- #endif -->
  18. </view>
  19. </cl-page>
  20. </template>
  21. <script setup lang="ts">
  22. import { useUi } from "@/uni_modules/cool-ui";
  23. const ui = useUi();
  24. function saveImage() {
  25. uni.saveImageToPhotosAlbum({
  26. filePath: "/static/cs.png",
  27. success: () => {
  28. ui.showToast({
  29. message: "保存成功"
  30. });
  31. }
  32. });
  33. }
  34. </script>