bd-notice.vue 830 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <template>
  2. <view class="bd-notice">
  3. <view class="notice">
  4. <image :src="notice" @click="show"></image>
  5. </view>
  6. </view>
  7. </template>
  8. <script>
  9. import appRichText from "../../basic-component/app-rich/parse";
  10. export default {
  11. name: 'bd-notice',
  12. components: {
  13. 'app-rich-text': appRichText,
  14. },
  15. props: {
  16. notice: {
  17. type: String,
  18. default () {
  19. return '';
  20. }
  21. },
  22. },
  23. onLoad(){
  24. },
  25. methods: {
  26. show() {
  27. let imgArr = [];
  28. imgArr.push(this.notice);
  29. uni.previewImage({
  30. current: imgArr[0],
  31. urls: imgArr,
  32. });
  33. }
  34. }
  35. }
  36. </script>
  37. <style lang="scss">
  38. .bd-notice {
  39. width: 702upx;
  40. padding: 20upx 0;
  41. background-color: #ffffff;
  42. border-radius: 15upx;
  43. margin: 24upx 24upx 0 24upx;
  44. image {
  45. width: 100%;
  46. height: 900upx;
  47. display: block;
  48. }
  49. }
  50. </style>