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.

order-info-item.vue 873B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <template>
  2. <view class="as-layout-horizontal as-gravity-center-start" v-if="!hide">
  3. <text class="label">{{label}}</text>
  4. <text class="value" @click="copy(value,label)">{{value}}</text>
  5. </view>
  6. </template>
  7. <script setup lang="ts">
  8. defineProps({
  9. label: {
  10. type: String,
  11. default: ''
  12. },
  13. value: {
  14. type: String,
  15. default: ''
  16. },
  17. hide: {
  18. type: Boolean,
  19. default: false
  20. }
  21. })
  22. const copy = (value, lable) => {
  23. console.log(value, lable)
  24. if (lable == "物流单号:") {
  25. uni.setClipboardData({
  26. data: value,
  27. success(res) {
  28. uni.getClipboardData({
  29. success(res) {
  30. console.log(res.data) // data
  31. }
  32. })
  33. }
  34. })
  35. }
  36. }
  37. </script>
  38. <style lang="scss" scoped>
  39. .label {
  40. font-size: 26rpx;
  41. color: #999999;
  42. min-width: 112rpx;
  43. }
  44. .value {
  45. font-size: 26rpx;
  46. color: #333333;
  47. padding: 0 30rpx
  48. }
  49. </style>