You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

69 lines
1.2 KiB

10 months ago
  1. <template>
  2. <div class="content" ref="content">
  3. <view class="text-area">
  4. <text class="title">{{title}}</text>
  5. <button @click="goDetail" style="margin-top: 20px;"> {{' 跳转 '}} </button>
  6. </view>
  7. </div>
  8. </template>
  9. <script>
  10. import Watermark from "./waterMark";
  11. export default {
  12. data() {
  13. return {
  14. title: 'Hello'
  15. }
  16. },
  17. mounted() {
  18. /* 给系统所有页面加水印*/
  19. // 第一个参数:水印文字 第二个参数: 加水印的底图,默认body 给所有页面加水印, 第三个参数:水印颜色
  20. Watermark.set("cc-innovation.gd", '', 'blue');
  21. // /* 给当前页面加水印*/
  22. // // 第一个参数:水印文字 第二个参数: 加水印的底图,默认body 给所有页面加水印, 第三个参数:水印颜色
  23. // Watermark.set("cc-innovation.gd", this.$refs.content, 'red');
  24. },
  25. methods: {
  26. goDetail() {
  27. uni.navigateTo({
  28. url: './Detail'
  29. })
  30. }
  31. }
  32. }
  33. </script>
  34. <style>
  35. .content {
  36. display: flex;
  37. flex-direction: column;
  38. align-items: center;
  39. justify-content: center;
  40. }
  41. .text-area {
  42. display: flex;
  43. justify-content: center;
  44. flex-direction: column;
  45. margin-top: 30px;
  46. }
  47. .title {
  48. font-size: 36rpx;
  49. color: #8f8f94;
  50. text-align: center;
  51. }
  52. </style>