AddData.vue 858 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <template>
  2. <view class="add-view" @click="addPage(url, type)" v-if="access"><text class="custom-icon custom-icon-xinzeng"></text></view>
  3. </template>
  4. <script>
  5. export default {
  6. props: {
  7. url: {
  8. type: String,
  9. default: ''
  10. },
  11. type: {
  12. type: String,
  13. default: ''
  14. },
  15. access: {
  16. type: Boolean,
  17. default: true
  18. }
  19. },
  20. data() {
  21. return {};
  22. },
  23. methods: {
  24. addPage(url, type) {
  25. if (url) {
  26. this.goPage(url, type);
  27. } else {
  28. this.$emit('click');
  29. }
  30. }
  31. }
  32. };
  33. </script>
  34. <style lang="scss">
  35. .add-view {
  36. background: $uni-color-primary;
  37. width: 64upx;
  38. height: 64upx;
  39. text-align: center;
  40. line-height: 64upx;
  41. position: fixed;
  42. bottom: 150upx;
  43. right: 30upx;
  44. z-index: 99;
  45. color: #ffffff;
  46. border-radius: 100%;
  47. box-shadow: 0px 9rpx 76rpx 0px rgba(3, 122, 255, 0.55);
  48. .custom-icon-xinzeng {
  49. font-size: 32upx;
  50. }
  51. }
  52. </style>