1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- <template>
- <view class="as-layout-horizontal as-gravity-center-start" v-if="!hide">
- <text class="label">{{label}}</text>
- <text class="value" @click="copy(value,label)">{{value}}</text>
- </view>
- </template>
-
- <script setup lang="ts">
- defineProps({
- label: {
- type: String,
- default: ''
- },
-
- value: {
- type: String,
- default: ''
- },
- hide: {
- type: Boolean,
- default: false
- }
- })
- const copy = (value, lable) => {
- console.log(value, lable)
- if (lable == "物流单号:") {
- uni.setClipboardData({
- data: value,
- success(res) {
- uni.getClipboardData({
- success(res) {
- console.log(res.data) // data
- }
- })
- }
- })
- }
- }
- </script>
-
- <style lang="scss" scoped>
- .label {
- font-size: 26rpx;
- color: #999999;
- min-width: 112rpx;
- }
-
- .value {
- font-size: 26rpx;
- color: #333333;
- padding: 0 30rpx
- }
- </style>
|